When booting the ISO in hard-disk mode udev's
'udevadm test-builtin' emits this error message:
| calling: test-builtin
| error reading /lib/udev/hwdb.bin: No such file or directory
| load module index
| unload module index
and fails to boot because using udevadm test-builtin in the
is_nice_device function no longer recognizes proper DEVICES.
Including the /lib/udev/hwdb.bin file in the initramfs doesn't
help either as udevadm test-builtin was a debug interface and
never supposed to be used public.
This patch addresses the issue by using udevadm info and checking
if the DEVTYPE of the device is 'disk'. This should work with the
majority of DEVICES.
Closes: https://github.com/grml/live-boot-grml/pull/3
Thanks: Ulrich Dangel <mru@spamt.net> for the initial patch
Thanks: Michael Biebl <biebl@debian.org> for helping in resolve this issue
--- /dev/null
+--- a/scripts/boot/9990-misc-helpers.sh
++++ b/scripts/boot/9990-misc-helpers.sh
+@@ -117,7 +117,7 @@
+ {
+ sysfs_path="${1#/sys}"
+
+- if /sbin/udevadm test-builtin path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci)"
++ if /sbin/udevadm info --query=all --path="${sysfs_path}" | egrep -q "DEVTYPE=disk"
+ then
+ return 0
+ elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$'
40_support_multiple_hooks.patch
41_drop_nameserver_from_ip_option.patch
42_restore_support_for_old_persistence.patch
+43_fix_udev_usage_in_is_nice_device.patch