Jump to content
funtoo forums
Sign in to follow this  
lego12239

grub2 doesn't see mdraid by mduuid

Recommended Posts

Hi, all!

My grub doesn't see mdraid (raid1) by mduuid. /boot/grub/grub.cfg:

set timeout=2

menuentry 'Funtoo, 4.14.97' {
        insmod gzio
        insmod mdraid1x
        insmod part_msdos
        insmod ext2
        set root='(mduuid/232d2317:1469bc36:e85fd34c:9136eb63,msdos1)'
        echo    'Loading kernel...'
        linux   /boot/vmlinuz-4.14.97-nat root=LABEL=rootfs ro domdadm
        echo    'Loading initial ramdisk...'
        initrd  /boot/initramfs-genkernel-x86_64-4.14.97-nat
}

If i replace "set root='(mduuid/232d2317:1469bc36:e85fd34c:9136eb63,msdos1)'" with "set root='(md/0,msdos1)'", then grub boot the system.

Grub was installed with the next command(sda and sdb are raid component devices):
 

grub-install --boot-directory=/boot/ --modules='part_msdos mdraid1x' /dev/sda

grub-install --boot-directory=/boot/ --modules='part_msdos mdraid1x' /dev/sdb

 mdraid UUID:

mdadm --detail /dev/md127 | grep UUID
              UUID : 232d2317:1469bc36:e85fd34c:9136eb63

 

How can i fix this?

Share this post


Link to post
Share on other sites

I have never tried to make grub see a RAID created with mdadm.  I always keep /boot somewhere off of the RAID.  So I don't know if either of these two suggestion will work.

 

1.)  Tell grub to use /dev/sda as it's root. Something like "set root=(hostdisk//dev/sda,msdos1)" in you grub.cfg would work for that.

2.)  Try installing grub on the RAID itself:  "grub-install --boot-directory=/boot/ --modules='part_msdos mdraid1x' /dev/md127"  Honestly though, I am not really sure that will work.

 

For easy recovery in the event of catastrophic error I have learned the hard way (HINT: Don't make typos when executing a wipefs command) that having /boot accessible without any bells and whistles is the best way to go.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×