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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...