os-prober should chainload other linux if there is bootloader on the partition
Bug #446764 reported by
Andrew Jorgensen
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-prober (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: os-prober
I have two Linux distributions installed. SUSE prefers to install it's bootloader on it's root partition rather than on the MBR. Ideally os-prober / grub-common would see that the partition has a bootloader (grub) on it and chainload instead of loading the other distro's kernel directly.
This approach would be a lot safer than the current approach because it would allow the other distro to fully control the kernel parameters used to boot and would (assuming the distro takes care of this itself) allow the other distro to upgrade it's kernel or change parameters without os-prober needing to re-detect.
To post a comment you must log in.
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) other_os= 1 "`grub- probe -d /dev/sda4 -t drive 2> /dev/null`"
found_
cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class linux --class gnu --class os {
EOF
GDRIVE=
cat <<EOF
insmod ext2
set root='${GDRIVE}'
chainloader +1
}
EOF
;;
*)