#565953 os-prober: when using a shared /boot, should somehow exclude entries with a different root= from the root directory currently being examined

Package:
os-prober
Source:
os-prober
Description:
utility to detect other OSes on a set of drives
Submitter:
Julien Bellion
Date:
2010-07-13 02:33:06 UTC
Severity:
important
#565953#5
Date:
2010-01-19 23:55:27 UTC
From:
To:
Hello,

My system have several partitions :

/dev/sda1 : root partition for a Debian testing 64 bits
/dev/sda2 : /boot partition
/dev/sda3 : root partition for a Debian testing 32 bits
/dev/sda6 : home partition
/dev/sda7 : opt partition

When I run update-grub2 from the 64 bits version, the 32 bits version entries are not bootable.
They all point to /dev/sda1 partition, while 32 bits root is sda3.
The problem is the same, but inversed, if I run update-grub2 from the 32 bits version.

My grub.cfg generated entries :

menuentry "Debian GNU/Linux, avec Linux 2.6.32-trunk-686-bigmem" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux	//vmlinuz-2.6.32-trunk-686-bigmem root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118 ro ipv6.disable=1 quiet
	initrd	//initrd.img-2.6.32-trunk-686-bigmem
}
menuentry "Debian GNU/Linux, avec Linux 2.6.32-trunk-amd64" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux	//vmlinuz-2.6.32-trunk-amd64 root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118 ro ipv6.disable=1 quiet
	initrd	//initrd.img-2.6.32-trunk-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Debian GNU/Linux, avec Linux 2.6.32-trunk-686-bigmem (on /dev/sda3)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux //vmlinuz-2.6.32-trunk-686-bigmem root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118 ro ipv6.disable=1 quiet
	initrd //initrd.img-2.6.32-trunk-686-bigmem
}
menuentry "Debian GNU/Linux, avec Linux 2.6.32-trunk-amd64 (on /dev/sda3)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux //vmlinuz-2.6.32-trunk-amd64 root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118 ro ipv6.disable=1 quiet
	initrd //initrd.img-2.6.32-trunk-amd64
}
menuentry "Julien - Linux 2.6.32-trunk-amd64 (on /dev/sda3)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux /vmlinuz-2.6.32-trunk-amd64 root=/dev/sda1 ro quiet rootfstype=ext4
	initrd /initrd.img-2.6.32-trunk-amd64
}
menuentry "Julien - Linux 2.6.32-trunk-686-bigmem (on /dev/sda3)" {
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set c5a6e206-dac1-45ca-8a21-1216fbc16473
	linux /vmlinuz-2.6.32-trunk-686-bigmem root=/dev/sda3 ro ipv6.disable=1 quiet
	initrd /initrd.img-2.6.32-trunk-686-bigmem
}

Regards,

Julien

#565953#10
Date:
2010-01-20 09:34:30 UTC
From:
To:
Am Mittwoch, den 20.01.2010, 00:55 +0100 schrieb Julien Bellion:

Does `sudo linux-boot-prober /dev/sda3' on the 64bit one or `sudo
linux-boot-prober /dev/sda1' on the other one get it right?
It should read the correct value for root= parameter from the grub.cfg
on the device you give it.

#565953#15
Date:
2010-01-20 09:46:57 UTC
From:
To:
Le 20/01/2010 10:34, Felix Zielcke a écrit :
On the 64bit :
linux-boot-prober /dev/sda3

/dev/sda3:/dev/sda2:Debian GNU/Linux, avec Linux
2.6.32-trunk-686-bigmem:/boot//vmlinuz-2.6.32-trunk-686-bigmem:/boot//initrd.img-2.6.32-trunk-686-bigmem:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro ipv6.disable=1 quiet
/dev/sda3:/dev/sda2:Debian GNU/Linux, avec Linux 2.6.32-trunk-686-bigmem
(mode de
dépannage):/boot//vmlinuz-2.6.32-trunk-686-bigmem:/boot//initrd.img-2.6.32-trunk-686-bigmem:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro single ipv6.disable=1
/dev/sda3:/dev/sda2:Debian GNU/Linux, avec Linux
2.6.32-trunk-amd64:/boot//vmlinuz-2.6.32-trunk-amd64:/boot//initrd.img-2.6.32-trunk-amd64:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro ipv6.disable=1 quiet
/dev/sda3:/dev/sda2:Debian GNU/Linux, avec Linux 2.6.32-trunk-amd64
(mode de
dépannage):/boot//vmlinuz-2.6.32-trunk-amd64:/boot//initrd.img-2.6.32-trunk-amd64:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro single ipv6.disable=1
/dev/sda3:/dev/sda2:Julien - Linux
2.6.32-trunk-amd64:/boot/vmlinuz-2.6.32-trunk-amd64:/boot/initrd.img-2.6.32-trunk-amd64:root=/dev/sda1
ro ipv6.disable=1 quiet rootfstype=ext4
/dev/sda3:/dev/sda2:Julien - Linux
2.6.32-trunk-686-bigmem:/boot/vmlinuz-2.6.32-trunk-686-bigmem:/boot/initrd.img-2.6.32-trunk-686-bigmem:root=/dev/sda3
ro ipv6.disable=1 quiet

But /dev/sda3 is the 32bit root.
The results of this command gives root as
UUID=cfe65d23-6e74-407b-af61-a80d40eff118 but it is not correct :
# ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 janv. 19 09:23
75262850-1103-4869-8dcf-62ac3bf642b6 -> ../../sda3
lrwxrwxrwx 1 root root 10 janv. 19 09:23
c5a6e206-dac1-45ca-8a21-1216fbc16473 -> ../../sda2
lrwxrwxrwx 1 root root 10 janv. 19 09:23
cf636a6d-72ab-4bef-84b5-9c3b95dd4627 -> ../../sda7
lrwxrwxrwx 1 root root 10 janv. 19 09:23
cfe65d23-6e74-407b-af61-a80d40eff118 -> ../../sda1
lrwxrwxrwx 1 root root 10 janv. 19 09:23
fde6420a-e314-4f26-bf14-b3f04c04bc66 -> ../../sda6

I will try this command on /dev/sda1 at midday.

#565953#20
Date:
2010-01-21 00:00:33 UTC
From:
To:
Le 20/01/2010 10:51, Debian Bug Tracking System a écrit :
On the 32bit one :

# linux-boot-prober /dev/sda1
/dev/sda1:/dev/sda2:Debian GNU/Linux, avec Linux
2.6.32-trunk-686-bigmem:/boot//vmlinuz-2.6.32-trunk-686-bigmem:/boot//initrd.img-2.6.32-trunk-686-bigmem:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro ipv6.disable=1 quiet
/dev/sda1:/dev/sda2:Debian GNU/Linux, avec Linux 2.6.32-trunk-686-bigmem
(mode de
dépannage):/boot//vmlinuz-2.6.32-trunk-686-bigmem:/boot//initrd.img-2.6.32-trunk-686-bigmem:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro single ipv6.disable=1
/dev/sda1:/dev/sda2:Debian GNU/Linux, avec Linux
2.6.32-trunk-amd64:/boot//vmlinuz-2.6.32-trunk-amd64:/boot//initrd.img-2.6.32-trunk-amd64:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro ipv6.disable=1 quiet
/dev/sda1:/dev/sda2:Debian GNU/Linux, avec Linux 2.6.32-trunk-amd64
(mode de
dépannage):/boot//vmlinuz-2.6.32-trunk-amd64:/boot//initrd.img-2.6.32-trunk-amd64:root=UUID=cfe65d23-6e74-407b-af61-a80d40eff118
ro single ipv6.disable=1
/dev/sda1:/dev/sda2:Julien - Linux
2.6.32-trunk-amd64:/boot/vmlinuz-2.6.32-trunk-amd64:/boot/initrd.img-2.6.32-trunk-amd64:root=/dev/sda1
ro ipv6.disable=1 quiet rootfstype=ext4
/dev/sda1:/dev/sda2:Julien - Linux
2.6.32-trunk-686-bigmem:/boot/vmlinuz-2.6.32-trunk-686-bigmem:/boot/initrd.img-2.6.32-trunk-686-bigmem:root=/dev/sda3
ro ipv6.disable=1 quiet

And the command "linux-boot-prober /dev/sda3" does not return anything.

Regards

Julien