Bug#614143: os-prober: generated linux entries don't use UUIDs for root= parameter
On Sat, Feb 19, 2011 at 11:36:00PM +0100, Matthias Berndt wrote:
> As you probably know, os-prober is used by grub-mkconfig to generate grub.cfg
> entries for other operating systems. Today I ran update-grub in order for it to
> pick up the Fedora 14 Kernel I had installed today. The command line it
> generated looked like this:
> linux /boot/vmlinuz-2.6.35.6-45.fc14.x86_64 root=/dev/sdb3
> But with the Fedora kernel the relevant device isn't called /dev/sdb3 but
> /dev/sda3, so this command line doesn't work, and I guess UUIDs should be used
> instead. The following change to /usr/share/os-prober/common.sh did the trick
> for me: replace
>
> mapdevfs () {
> readlink -f "$1"
> }
>
> with
>
> mapdevfs() {
> echo "/dev/disk/by-uuid/$(blkid -o value -s UUID "$1")"
> }
>
> Perhaps this can be applied upstream?
I don't think this is generally safe. It relies on the kernel in
question coming with an initramfs with suitable UUID support; os-prober
can't reliably know this.
os-prober presumably picked this kernel up from some other boot loader's
configuration file - perhaps /boot/grub/grub.conf in your Fedora system.
Could you please attach that file?
Thanks,
--
Colin Watson [cjwatson@debian.org]
Reply to: