[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Banishing UUIDs from grub



On Thu, Jan 18, 2018 at 11:11:32AM +0100, Stephan Seitz wrote:
> On Do, Jan 18, 2018 at 03:31:30 -0600, Dave Sherohman wrote:
> >What is the recommended method for preventing grub from using UUIDs to
> >refer to filesystems in the current Debian stable distribution?
> 
> In /etc/default/grub I have the option:
> 
> # Uncomment if you don’t want GRUB to pass „root=UUID=xxx” parameter to Linux
> #GRUB_DISABLE_LINUX_UUID=true

That doesn't seem to be a complete solution for booting from an LVM
volume.  I've enabled it:

$ grep UUID /etc/default/grub 
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
# Linux
GRUB_DISABLE_LINUX_UUID=true

and re-run update-grub, but /boot/grub/grub.cfg still has a mix of
device names and UUIDs:

menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c5bb6082-0b8b-46e5-a253-c4811a1f011a' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod lvm
        insmod ext2
        set root='lvmid/wf5YhU-vt2F-uZM9-cVso-qn6Z-fdY9-iQO26v/sBd6ej-DTMK-RUxu-LuRW-MjLj-rRLf-C6OwT2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='lvmid/wf5YhU-vt2F-uZM9-cVso-qn6Z-fdY9-iQO26v/sBd6ej-DTMK-RUxu-LuRW-MjLj-rRLf-C6OwT2'  c5bb6082-0b8b-46e5-a253-c4811a1f011a
        else
          search --no-floppy --fs-uuid --set=root c5bb6082-0b8b-46e5-a253-c4811a1f011a
        fi
        echo    'Loading Linux 4.9.0-5-amd64 ...'
        linux   /boot/vmlinuz-4.9.0-5-amd64 root=/dev/mapper/system ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.9.0-5-amd64
}


My guess at explaining this would be that the GRUB_DISABLE_LINUX_UUID
flag is very literal and *only* affects whether "GRUB [passes]
"root=UUID=xxx" parameter to Linux", but not how grub itself identifies
the root device ("set root='lvmid/[UUID]').


-- 
Dave Sherohman


Reply to: