I have done this for quite a while, and it works without modifying /etc/grub.d/40_custom
. I don't have UEFI so this is pure MBR booting. You may need to run fsck on the root file system from the other system before running grub2-mkconfig
.
I could also select to boot from the other disk in the BIOS boot setup, and that workes perfectly as well.
os-prober
is used by grub2-mkconfig
to locate the other installed operating systems. Following shows that it found one.
# os-prober
/dev/sdb5:Fedora 28 (Twenty Eight):Fedora:linux
grub2-mkconfig
will then read the information from sdb5
and sdb2
, which in this case contains the boot partition corresponding to the root partition sdb5
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/starfield/theme.txt
Found linux image: /boot/vmlinuz-4.16.5-300.fc28.x86_64
Found initrd image: /boot/initramfs-4.16.5-300.fc28.x86_64.img
Found linux image: /boot/vmlinuz-4.16.4-300.fc28.x86_64
Found initrd image: /boot/initramfs-4.16.4-300.fc28.x86_64.img
Found linux image: /boot/vmlinuz-4.16.4-200.fc27.x86_64
Found initrd image: /boot/initramfs-4.16.4-200.fc27.x86_64.img
Found linux image: /boot/vmlinuz-4.16.3-200.fc27.x86_64
Found initrd image: /boot/initramfs-4.16.3-200.fc27.x86_64.img
Found linux image: /boot/vmlinuz-4.15.17-300.fc27.x86_64
Found initrd image: /boot/initramfs-4.15.17-300.fc27.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-dc5c0cbdda03c984024a73e54bad769b
Found initrd image: /boot/initramfs-0-rescue-dc5c0cbdda03c984024a73e54bad769b.img
Found memtest image: /boot/elf-memtest86+-5.01
Found Fedora 28 (Twenty Eight) on /dev/sdb5
done
Notice this line Found Fedora 28 (Twenty Eight) on /dev/sdb5
which tells me it created menu entries for loading linux from sdb5.
Keep 40_custom
as it was at install time:
# cat 40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
Can you explain this a bit more? I'd understand if the issue were reversed, and you needed F27 to keep your application running, but since it works in F28, why not just upgrade?
F28 is still beta so don't want to fedup just yet as i have too much reliance on the data in the machine.