copymods puts modules out of modprobe's path

Bug #1766723 reported by dann frazier on 2018-04-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-initramfs-tools
Medium
Unassigned

Bug Description

After copymods runs, modules can be found under /lib/modules/$(uname -r)/$(uname -r):

(initramfs) ls /lib/modules/4.15.0-15-generic/4.15.0-15-generic/
modules.symbols modules.dep modules.symbols.bin modules.alias
modules.order modules.dep.bin modules.builtin modules.alias.bin
kernel modules.devname modules.builtin.bin modules.softdep

modprobe does not know to look for them there, so modules cannot easily be loaded:

(initramfs) modprobe hclge
(initramfs) echo $?
1

If I adjust the symlink, things work fine:
(initramfs) rm /lib/modules/4.15.0-15-generic
(initramfs) ln -s /root/lib/modules/4.15.0-15-generic /lib/modules
(initramfs) ls -l /lib/modules
lrwxrwxrwx 1 35 4.15.0-15-generic -> /root/lib/modules/4.15.0-15-generic
(initramfs) modprobe hclge
[ 660.823780] hclge is initializing
[ 660.827238] hns3 0000:7d:00.0: The firmware version is b0100201
[ 660.836064] hns3 0000:7d:00.0: active VFs(7) found, enabling SRIOV

I'm not sure if this is just a thinko, or if something relies on this behavior. I did hot-add this fix to my MAAS server and verify that I was still able to successfully commission a system.

Related branches

Scott Moser (smoser) on 2018-11-07
Changed in cloud-initramfs-tools:
status: New → Fix Committed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers