Fri, 25 Dec 2020 09:32:43 +0300 időpontban Andrei Borzenkov írta:
24.12.2020 20:53, Andrei Borzenkov пишет:
24.12.2020 20:08, Istvan Gabor пишет:
Hello:
I would like to set up a Leap 15.1 system that boots from a md raid1 array.
I have a sample configuration from a working debian system that boots from raid1 array. However there are 2 things in the sample configuration I don't understand.
The working debian grub.cfg has this:
### BEGIN /etc/grub.d/10_linux ### menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-686-pae' --class debian --class gnu-linux --class gnu --class os { load_video insmod gzio insmod raid insmod mdraid1x insmod part_msdos insmod part_msdos insmod ext2 set root='(mduuid/4245........a8)' search --no-floppy --fs-uuid --set=root 68b........26e echo 'Loading Linux 3.2.0-4-686-pae ...' linux /boot/vmlinuz-3.2.0-4-686-pae root=UUID=68b........26e ro nomodeset quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-4-686-pae }
My questions:
...
What occurs if the the fs-uuid of the mduuid device's file system is not equal to the one given in the search command?
The value of "root" variable does not change.
That's not quite correct. If fs-uuid in search command is found on some other device than mduuid device then "root" variable will be set to refer to this other device. If fs-uuid in search command is not found anywhere, the value if "root" variable does not change.
Thank you Andrei. I understand this. I still could not make grub2 raid1 chainloading. I could install grub2 on the raid1 (/dev/md113) device: # grub2-install --force /dev/md113 Installing for i386-pc platform. grub2-install: warning: the drive name `mduuid/b...f6' in device.map is incorrect. Using hostdisk//dev/md113 instead. Please use the form [hfc]d[0-9]* (E.g. `hd0' or `cd'). grub2-install: warning: File system `ext2' doesn't support embedding. grub2-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. Installation finished. No error reported. This is grub.cfg: set timeout=3 menuentry "openSUSE Leap 15.1" { insmod part_msdos insmod ext2 insmod mdraid1x set root='mduuid/b...f6' search --no-floppy -l Leap -s linux /boot/vmlinuz root=LABEL=Leap noresume initrd /boot/initrd } In grub2-emu the correct menu appears in the emulator, that is grub is installed on the raid1 (/dev/md113) device. I installed the chainloader on the mbrs of /dev/sda and /dev/sdb. # grub2-install --boot-directory=/boot/grub2.chainload /dev/sda Installing for i386-pc platform. Installation finished. No error reported. # grub2-install --boot-directory=/boot/grub2.chainload /dev/sdb Installing for i386-pc platform. Installation finished. No error reported. The chainloader's config is this: set timeout=3 menuentry "openSUSE Leap 15.1" { insmod part_msdos insmod ext2 insmod mdraid1x insmod chain set root='mduuid/b...f6' search --no-floppy -l Leap -s chainloader +1 } This shows the correct menu when I start the computer. But when it tries to boot/chainload the raid1 device, grub hangs, only showing: GRUB It seems that the chainloader can't find or load grub installed on the raid1 device? How can I solve this? I tried the above configurations with commented search lines and insmod lines but there was no difference. Thanks, Istvan