View Issue Details

IDProjectCategoryView StatusLast Update
0015837CentOS-7os-proberpublic2019-02-17 14:21
Reportersg4rb0 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0015837: Dual Booting CentOS with Debian - Doesn't take into account linux/initrd commmands
DescriptionCentOS's /etc/grub.d/30_os-prober script fails to take into account that the CentOS GRUB uses Secure Boot-compatible linuxefi/initrdefi keywords and omits support for the traditional linux/initrd ones.

So when dual booting a system, let's say I install Debian and then CentOS, CentOS os-prober copies the configuration of my Debian GRUB configuration as-is, without applying a change to the for the Debian menuentry lines beginning with linux and initrd. Once I change these lines in the grub.cfg to linuxefi and initrdefi, I can then boot into the Debian system.
Steps To ReproduceTo explain how I attempted to set this up, I'll show what I did with the partitioning. Below is a picture of my initial Debian partitioning (note I left some spare space at the end to put the CentOS "/" mount point on).

https://imgur.com/a/zaJ6lyq

After that ran and installed it worked fine. I then put a USB drive in, to boot and install CentOS. When I got to the partition screen, this is what it looked like (before any modification):

https://imgur.com/a/JGd2FNN

I then made one 20GiB partition for the / of CentOS. Additionally, under the Debian partition section, I modified the /boot/efi partition to have the "mount point (see far right of the image)" of /boot/efi. This then seemed to duplicate itself over to the CentOS partition section. The result is shown below:

https://imgur.com/a/Q4r5Ru8

Upon boot, I see two options, one for CentOS and one for Debian. If I select CentOS it works fine. If I select Debian, I get the error shown below:

https://imgur.com/a/hmPmOIW

Thus the error occurs. I made a workaround by editing the CentOS file: /boot/efi/EFI/centos/grub.cfg. Note the changes in the ## comments. Literally just changing a few lines from linux to linuxefi, and changing initrd to initrdefi will make it work. But why is the 30_os-prober script not doing this automatically?



### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Debian GNU/Linux (9.8) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-9a0b0533-9320-45f1-9b3d-0860da8822be' {
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 9a0b0533-9320-45f1-9b3d-0860da8822be
    else
      search --no-floppy --fs-uuid --set=root 9a0b0533-9320-45f1-9b3d-0860da8822be
    fi
############################################# CHANGE LINE BELOW THIS LIN TO START: linuxefi #############################################
    linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=9a0b0533-9320-45f1-9b3d-0860da8822be ro quiet
############################################# CHANGE LINE BELOW THIS LIN TO START: initrdefi ##########################################
    initrd /boot/initrd.img-4.9.0-8-amd64
}
submenu 'Advanced options for Debian GNU/Linux (9.8) (on /dev/sda2)' $menuentry_id_option 'osprober-gnulinux-advanced-9a0b0533-9320-45f1-9b3d-0860da8822be' {
    menuentry 'Debian GNU/Linux (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64--9a0b0533-9320-45f1-9b3d-0860da8822be' {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 9a0b0533-9320-45f1-9b3d-0860da8822be
        else
          search --no-floppy --fs-uuid --set=root 9a0b0533-9320-45f1-9b3d-0860da8822be
        fi
############################################# CHANGE LINE BELOW THIS LIN TO START: linuxefi #############################################
        linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=9a0b0533-9320-45f1-9b3d-0860da8822be ro quiet
############################################# CHANGE LINE BELOW THIS LIN TO START: initrdefi ##########################################
        initrd /boot/initrd.img-4.9.0-8-amd64
    }
    menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64 (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64--9a0b0533-9320-45f1-9b3d-0860da8822be' {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 9a0b0533-9320-45f1-9b3d-0860da8822be
        else
          search --no-floppy --fs-uuid --set=root 9a0b0533-9320-45f1-9b3d-0860da8822be
        fi
############################################# CHANGE LINE BELOW THIS LIN TO START: linuxefi #############################################
        linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=9a0b0533-9320-45f1-9b3d-0860da8822be ro quiet
############################################# CHANGE LINE BELOW THIS LIN TO START: initrdefi ##########################################
        initrd /boot/initrd.img-4.9.0-8-amd64
    }
    menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64 (recovery mode) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64-root=UUID=9a0b0533-9320-45f1-9b3d-0860da8822be ro single-9a0b0533-9320-45f1-9b3d-0860da8822be' {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 9a0b0533-9320-45f1-9b3d-0860da8822be
        else
          search --no-floppy --fs-uuid --set=root 9a0b0533-9320-45f1-9b3d-0860da8822be
        fi
############################################# CHANGE LINE BELOW THIS LIN TO START: linuxefi #############################################
        linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=9a0b0533-9320-45f1-9b3d-0860da8822be ro single
############################################# CHANGE LINE BELOW THIS LIN TO START: initrdefi ##########################################
        initrd /boot/initrd.img-4.9.0-8-amd64
    }
}

TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-02-17 14:21 sg4rb0 New Issue