Bug#534644: os-prober: ignores separate boot partition when mounted
Package: os-prober
Version: 1.29
Severity: normal
I have a second install of Debian Lenny on an other partion. It boots off yet an other partition.
It's relevant /etc/fstab entries are
/dev/sda2 /boot ext3 defaults,noatime 0 0
/dev/sda6 / auto defaults,noatime 0 0
On my running sid, I have these partitions mounted
/dev/sda2 /mnt/sandbox/boot
/dev/sda6 /mnt/sandbox
The relevant menu entry in /mnt/sandbox/boot/grub/grub.cfg (i.e., residing on /dev/sda2) is
menuentry "Debian GNU/Linux, linux 2.6.30.012" {
set root=(hd0,2)
search --fs-uuid --set 234cc6d9-e0ef-4105-b817-f1c83edbc1a2
linux /vmlinuz-2.6.30.012 root=/dev/sda5 ro i915.modeset=1 selinux=0 enforcing=0 resume=/dev/sda3 clocksource=hpet quiet
}
When I run
linux-boot-prober /dev/sda6
on standard output I see
/dev/sda6:/dev/sda6::/boot/vmlinuz-2.6.26-2-amd64:/boot/initrd.img-2.6.26-2-amd64:root=/dev/sda6
and in /var/log/syslog
linux-boot-prober: debug: /usr/lib/linux-boot-probes/mounted/90fallback succeeded
However I expect to see
/dev/sda6:/dev/sda2:Debian GNU/Linux, linux 2.6.30.012:/boot/vmlinuz-2.6.30.012::root=/dev/sda5 ro i915.modeset=1 selinux=0 enforcing=0 resume=/dev/sda3 clocksource=hpet quiet
Which I do see with the attached patch applied to /usr/bin/linux-boot-prober.
Kevin
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (600, 'unstable'), (500, 'testing'), (400, 'stable'), (300, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30.012 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
-- no debconf information
--- /usr/bin/linux-boot-prober 2008-12-26 05:48:07.000000000 -0800
+++ /usr/local/bin/linux-boot-prober 2009-06-25 16:33:12.105222571 -0700
@@ -32,7 +32,7 @@
bootpart="${mountboot%% *}"
bootmounted="${mountboot#* }"
else
- bootpart="$partition"
+ bootpart=$(cat $mpoint/etc/fstab | parsefstab | grep " /boot " | cut -d' ' -f1)
bootmounted=0
fi
for test in /usr/lib/linux-boot-probes/mounted/*; do
Reply to: