Red Hat Bugzilla – Bug 204742
mkinitrd heuristics for setting 'needusb' break for LVM
Last modified: 2014-12-01 18:08:23 EST
With root on an LVM VG that includes a USB attached disk, it's not possible to have mkinitrd
automatically generate a working initrd image (it is possible if you manually specify the appropriate
modules with --preload).
The problem is largely the small block of code that attempts to figure out whether or not the USB
modules are necessary by explicitly checking to see if /boot or /root is on a USB attached device. This
test is far too clever by half, and in an LVM environment will never succeed.
Rather than trying to "fix" the test so that it works correctly, I think the best solution is to simply
remove this test and have the "--with-usb" command line option simply cause mkinitrd to include the
USB modules. Trying to outsmart the sysadmin with clever shell scripts is generally a recipe doomed to
I've attached a patch to mkinitrd that makes this change.
Created attachment 135277 [details]
Patch for simpler building of usb-enabled initrd images.