[Bug 1574107] Re: busybox-initramfs: modinfo reports "can't open '/${VERSION}/': No such file or directory"

Launchpad Bug Tracker 1574107 at bugs.launchpad.net
Mon May 27 08:28:01 UTC 2019


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: busybox (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to busybox in Ubuntu.
https://bugs.launchpad.net/bugs/1574107

Title:
  busybox-initramfs: modinfo reports "can't open '/${VERSION}/': No such
  file or directory"

Status in busybox package in Ubuntu:
  Confirmed

Bug description:
  Working on 16.04 and trying to solve some unrelated issues due to a
  complex initrd set-up I discovered that the included "modinfo" tool
  doesn't work, whether given just a module name or an absolute path to
  the .ko file.

  In this case it always reports, e.g:

  (initramfs) pwd
  /lib/modules/4.4.0-21-generic/kernel/drivers/md

  (initramfs) modinfo dm-crypt
  modinfo: can't open '/4.4.0-21-generic/': No such file or directory

  (initramfs) modinfo /lib/modules/4.4.0-21-generic/kernel/drivers/md/dm-crypt.ko
  modinfo: can't open '/4.4.0-21-generic/': No such file or directory

  There seems there may be a related issue with modprobe too, as I've
  found it doesn't always insert a module when instructed to - also
  using either just name, or absolute path. In the specific case here I
  was working with a LUKS/dm-crypt rootfs, where the initrd.img had been
  generated using "MODULES=dep" and hadn't included dm-crypt.ko.

  I connected a USB storage device with an identical root file-system
  (same kernel version, etc.) at /mnt/USB/ and was trying to use:

  (initramfs) modprobe -v -d /mnt/USB dm-crypt 
  modprobe: FATAL: Module dm-crypt not found in directory /mnt/USB/lib/modules/4.4.0-21-generic

  I'm *assuming* this is because despite setting the alternate root
  directory with "-d" it is still looking at the "modules.dep" in
  /lib/modules/4.4.0-21-generic rather than prefixing the "-d" alternate
  root.

  Using a chroot the module(s) can be loaded and the block device
  unlocked:

  (initramfs) chroot /mnt/USB
  (initramfs) modprobe dm-crypt
  (initramfs) modprobe aesni-intel
  (initramfs) modprobe xts
  (initramfs) exit
  (initramfs) grep dm_crypt /proc/modules
  dm_crypt 28672 0 - Live 0xffffffffc02fa000

  (initramfs) LD_LIBRARY_PATH=/mnt/USB/lib/x86_64-gnu-linux
  /mnt/USB/sbin/cryptsetup open /dev/sda4 LUKS_VG02 --type luks

  (initramfs) blkid /dev/mapper/LUKS_VG02
  /dev/mapper/LUKS_VG02: UUID="xxxx...xxxx" TYPE="LVM2_member"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1574107/+subscriptions



More information about the foundations-bugs mailing list