[Bug 446764] Re: os-prober should chainload other linux if there is bootloader on the partition

David 446764 at bugs.launchpad.net
Sat Dec 29 19:46:55 UTC 2012


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
Foundations Bugs, which is subscribed to os-prober in Ubuntu.
https://bugs.launchpad.net/bugs/446764

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

Status in “os-prober” package in Ubuntu:
  Confirmed

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 manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/os-prober/+bug/446764/+subscriptions




More information about the foundations-bugs mailing list