Version: 1.77 Severity: important I noticed when running update-grub on Debian stable and testing, that the resulting grub.cfg has lines as part of menuentres like: "linux [..] root=/dev/dm-X" for found linux installations on other block devices - in my case residing on LVs - ,instead of "root=UUID=[XXX]", which I'd have expected (and would favour). This is due to `linux-boot-prober` calling `mapdevfs` defined in "/usr/share/os-prober/common.sh". `mapdevfs` does a simple `readlink` on the path given. The other lines within the menuentry look fine, e.g.: "set root='lvmid/XXXXXX/YYYYYY'" or "search [..] --set=root [UUID]" GRUB_DISABLE_LINUX_UUID is undefined. Is this intentional and if so, why?
Just adding, this isn't only a feature request but results in
non-bootable systems.
If one of the os-probe'd systems e.g. is also a Debian, it will drop
into an initramfs due to not finding the root device.
This is due to - within the initramfs - the VGs as part of the the LVM
system only get activated by certain naming schemes
("/usr/share/initramfs-tools/scripts/local-top/lvm2").
It tries ti figure out whether the rootfs resides on a LVM and if it
thinks it doesn't, the respective VG won't be activated, resulting in
the passed /dev/dm-X block device not being available.
Mirko Vogt <bugs-debian@nanl.de> writes:
The first thing that comes to mind is:
For a given UUID
run blkid, and exclude all lines that do not match the UUID
count lines and error if there are duplicates
(it probably already does this, and I think the risk of collisions
most significant for short UUIDs like FAT has)
as part of that regex, check for ^/dev/mapper, with that anchor
use /dev/mapper/X for the truly unique UUID
Cheers,
Nicholas