I solved this issue with two modifications.

In first place, I wrote a grub detector based on /usr/lib/os-
probes/mounted/90linux-distro with sequence number 89 to run before
linux distribution detection:

/usr/lib/os-probes/mounted/89grub is attached

Then, I modified /etc/grub.d/30_os-prober to deal with the grub case. I
set the following before the *) default option:


grub)
      found_other_os=1
      cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class linux --class gnu --class os {
EOF
      GDRIVE="`grub-probe -d /dev/sda4 -t drive 2> /dev/null`"
      cat <<EOF
        insmod ext2
        set root='${GDRIVE}'
        chainloader +1
}
EOF
    ;;
*)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/446764

Title:
  os-prober should chainload other linux if there is bootloader on the
  partition

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/446764/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to