[Bug 445367] [NEW] os-prober entries do not use correct /boot device
Marien Zwart
m_zwart at 123mail.org
Wed Oct 7 11:44:43 UTC 2009
Public bug reported:
Binary package hint: grub2
I'm encountering this on a system using lvm with a separate /boot
partition outside of lvm used by jaunty but no separate /boot for
karmic, but I think it will affect every system with grub 1 on a
separate /boot partition, not just those also using lvm.
"sudo os-prober" gives me:
/dev/sda1:Microsoft Windows XP Home Edition:Windows:chain
/dev/mapper/main-jaunty_chroot:Ubuntu 9.04 (9.04):Ubuntu:linux
/dev/mapper/main-root:Ubuntu 9.04 (9.04):Ubuntu1:linux
which as far as I know is correct: main/jaunty_chroot is an sbuild-lvm
chroot, main/root is a regular jaunty install.
"sudo linux-boot-prober /dev/mapper/main-root" gives me:
/dev/mapper/main-root:/dev/sda2:Ubuntu 9.04, kernel 2.6.28-15-generic:/boot/vmlinuz-2.6.28-15-generic:/boot/initrd.img-2.6.28-15-generic:root=/dev/mapper/main-root ro quiet splash
/dev/mapper/main-root:/dev/sda2:Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode):/boot/vmlinuz-2.6.28-15-generic:/boot/initrd.img-2.6.28-15-generic:root=/dev/mapper/main-root ro single
/dev/mapper/main-root:/dev/sda2:Ubuntu 9.04, kernel 2.6.28-3-rt:/boot/vmlinuz-2.6.28-3-rt:/boot/initrd.img-2.6.28-3-rt:root=/dev/mapper/main-root ro quiet splash
/dev/mapper/main-root:/dev/sda2:Ubuntu 9.04, kernel 2.6.28-3-rt (recovery mode):/boot/vmlinuz-2.6.28-3-rt:/boot/initrd.img-2.6.28-3-rt:root=/dev/mapper/main-root ro single
/dev/mapper/main-root:/dev/sda2:Ubuntu 9.04, memtest86+:/boot/memtest86+.bin::
which again I think is correct. Notice /dev/sda2 is my separate /boot
partition.
However /etc/grub/30_os-prober completely ignores the /boot partition
information supplied by linux-os-prober ($LBOOT in the script) and
generates a grub.cfg that looks for the kernel on the root device, which
does not work. That is: it generates entries like:
menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (on /dev/mapper/main-root)" {
insmod lvm
insmod ext2
set root=(main-root)
search --no-floppy --fs-uuid --set 096600f3-ffce-445c-8cd7-588461a4894e
linux /boot/vmlinuz-2.6.28-15-generic root=/dev/mapper/main-root ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
}
while a manually added entry that works is:
menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (on /dev/mapper/main-root)" {
insmod lvm
insmod ext2
set root=(hd0,2)
linux /vmlinuz-2.6.28-15-generic root=/dev/mapper/main-root ro quiet splash
initrd /initrd.img-2.6.28-15-generic
}
Notice that just changing the prepare_grub_to_access_device call to use
${LBOOT} instead of ${DEVICE} does not quite suffice: the leading /boot
component needs to be removed from the initrd and vmlinuz paths too.
Since it looks like /usr/lib/linux-boot-probes/mounted/40grub actually
prepends /boot if there's a separate /boot partition it might make sense
to have linux-boot-probe pass the path grub uses unchanged (instead of
having another check for a separate /boot partition to chop off the path
component 40grub added).
ProblemType: Bug
Architecture: i386
Date: Wed Oct 7 13:24:42 2009
DistroRelease: Ubuntu 9.10
Package: grub2 (not installed)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.39-generic
SourcePackage: grub2
Uname: Linux 2.6.31-12-generic i686
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-bug i386
--
os-prober entries do not use correct /boot device
https://bugs.launchpad.net/bugs/445367
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list