xcp icon indicating copy to clipboard operation
xcp copied to clipboard

Raid Grub mduuid not found

Open BoarderEB opened this issue 5 years ago • 13 comments

The sytem starts in the grub rescue mode. With the error: disk`mduuid/TheUuidOfTheDisk,1´ not found.

With this in the rescue mode the system boots*¹:

set prefix=(hd0,gpt1)/boot/grub
set root=(hd0,gpt1)
insmod linux
insmod normal
normal

To fix the problem, a device map of the md127 raid must be created. *² $ echo "($(sudo grub-probe -t bios_hints -d /dev/md127)) /dev/md127" | sudo tee -a /boot/grub/device.map

And grub has to be rewritten:

grub-mkconfig
grub-install /dev/md127

With help from this pages: *¹: https://it-muecke.de/grub-rescue *²: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1756517

BoarderEB avatar Nov 24 '19 17:11 BoarderEB

Can you give us more information about what was done before the system failed to boot?

stormi avatar Nov 25 '19 10:11 stormi

Nothing special. Normal installation, packages via net-install. /dev/sda + /dev/sdb via installer as md-raid 1 Grub rescue mode on the first startup.

BoarderEB avatar Nov 25 '19 12:11 BoarderEB

Are you booting in UEFI mode or MBR mode?

There may be interesting logs in /var/log/installer/install-log

stormi avatar Nov 25 '19 16:11 stormi

MBR, and I do not see anything really interesting in the log. The raid is successfully created.


INFO     [2019-11-24 18:39:30] ran ['chroot', '/tmp/root', '/usr/sbin/grub-install', '--target=i386-pc', '/dev/sda']; rc 0
STANDARD ERROR:
Installing for i386-pc platform.
Installation finished. No error reported.

INFO     [2019-11-24 18:40:00] ran ['chroot', '/tmp/root', '/usr/sbin/grub-install', '--target=i386-pc', '/dev/sdb']; rc 0
STANDARD ERROR:
Installing for i386-pc platform.
Installation finished. No error reported.

That is the work around to install grub on a md raid, but it don't works on my system, without a Devicemap.

I don't find a CentOS Devicemap-Creater script. And I think that's the problem.

'chroot', '/tmp/root', '/usr/sbin/grub-install', '--target=i386-pc', '/dev/sda'] --grub-mkdevicemap=thescript.sh

Ubuntu has also a

/usr/sbin/grub-mkdevicemap

Maybe you can do a look on this.

install.log

BoarderEB avatar Nov 26 '19 08:11 BoarderEB

According to the logs, grub was correctly installed to /dev/sda and /dev/sdb.

INFO     [2019-11-24 18:39:30] ran ['chroot', '/tmp/root', '/usr/sbin/grub-install', '--target=i386-pc', '/dev/sda']; rc 0
STANDARD ERROR:
Installing for i386-pc platform.
Installation finished. No error reported.

INFO     [2019-11-24 18:40:00] ran ['chroot', '/tmp/root', '/usr/sbin/grub-install', '--target=i386-pc', '/dev/sdb']; rc 0
STANDARD ERROR:
Installing for i386-pc platform.
Installation finished. No error reported.

Of course, it was not installed with a devicemap, but usually this just works. Why is it necessary to use a device map in your situation according to you?

stormi avatar Nov 26 '19 11:11 stormi

Yes, if i do by hand the grub-install on sda + sdb, i get also a "Installation finished. No error reported." But the startup end in the grub rescue mode. I have no idea why this is necessary at my system. But I suspect that this is not just for me necessary. I found the same problem on different websites with a md-raid as boot device in different Linux versions. And I think the easyst way to exclude this for XCP-NG is always to create a devicemap. For me it is enough by hand.

I report only the bug and show the way of the solution.. It's your choice.

BoarderEB avatar Nov 26 '19 16:11 BoarderEB

We'll leave this bug report open to gather more feedback about this. This is the first time that I see it become necessary, while many have used our installer to install on a software RAID, so I'm interested in feedback from others too.

Thanks for your report, it may prove useful in due time.

stormi avatar Nov 26 '19 17:11 stormi

I am having this same problem with a raid fresh install of 8.0, on first boot I am stuck with just “GRUB” at the top left corner of my screen, till tonight I thought that it was just me. I do not have the experience to troubleshoot. Where can I find the failed boot logs, mount the raid?!? On my old non raid boot drive?

hydromike avatar Dec 06 '19 03:12 hydromike

Hmm, the symptoms are different from those of the original reporter, because their grub enters rescue mode (which means grub could start but not boot the system) when yours can't even start. To my knowledge, there won't be any boot logs with a failure so early in the boot stage. I suggest to create a thread on the forum first so that experienced users can help you debug the issue.

stormi avatar Dec 06 '19 09:12 stormi

I encountered the same problem like in the first post. After a clean install from a USB stick (made with rufus and the provided 8.2 iso) the installation finished without error, but the reboot ended in grub rescue mode.

The mentioned steps in the first post got the system to work.

There was nothing fancy about the setup I would think. I used an ASUS Z9DA-P8 mainboard with latest BIOS. I entered the BIOS and changed the SATA Mode to RAID instead of AHCI. After the reboot I started the RAID configuration utility and created a RAID1 with two disks.

Right after this I used the usb stick as boot device and installed XCP-ng without a problem. I didn't create a local storage repository as this is not needed and there was a previous installation of xenserver 6.5 on the disks, but those were not used for a RAID in the old setup. Don't know if this is relevant.

After the installation the boot ended with the grub rescue mode as mentioned above.

The same procedure and result I got on a second system with identical setup and the same installation steps.

@BoarderEB : Thanks for sharing the workaround or solution.

One addition: Using the above solution works, but a warning is thrown during the grub-install execution. warning: the drive name mduuid/<uuid> in device.map is incorrect. Using hostdisk//dev/md127 instead. Please use the form [hfc]d[0-9]* (E.g. hd0 or 'cd).

karstenmtr avatar Dec 28 '20 14:12 karstenmtr

I entered the BIOS and changed the SATA Mode to RAID instead of AHCI.

I know the post is quite old but: Never ever use that function on anything except for Windows. It's called fakeRAID for good reason and has potential for lots of troubly with any system not having the proper driver (which means every other OS than Windows), as it else may report just 2 independend disks to OS and you end up with inconsistency and other problems.

nagilum99 avatar May 03 '21 17:05 nagilum99

The sytem starts in the grub rescue mode. With the error: disk`mduuid/TheUuidOfTheDisk,1´ not found.

With this in the rescue mode the system boots*¹:

set prefix=(hd0,gpt1)/boot/grub
set root=(hd0,gpt1)
insmod linux
insmod normal
normal

To fix the problem, a device map of the md127 raid must be created. *² $ echo "($(sudo grub-probe -t bios_hints -d /dev/md127)) /dev/md127" | sudo tee -a /boot/grub/device.map

And grub has to be rewritten:

grub-mkconfig
grub-install /dev/md127

With help from this pages: *¹: https://it-muecke.de/grub-rescue *²: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1756517

@BoarderEB Thank you so much. You save my time.

rajibdpi avatar Jan 10 '22 10:01 rajibdpi

The sytem starts in the grub rescue mode. With the error: disk`mduuid/TheUuidOfTheDisk,1´ not found.

With this in the rescue mode the system boots*¹:

set prefix=(hd0,gpt1)/boot/grub
set root=(hd0,gpt1)
insmod linux
insmod normal
normal

To fix the problem, a device map of the md127 raid must be created. *² $ echo "($(sudo grub-probe -t bios_hints -d /dev/md127)) /dev/md127" | sudo tee -a /boot/grub/device.map

And grub has to be rewritten:

grub-mkconfig
grub-install /dev/md127

With help from this pages: *¹: https://it-muecke.de/grub-rescue *²: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1756517

@BoarderEB Thank you so much! You saved my time too!

SNIP4 avatar Nov 12 '22 10:11 SNIP4