Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dracut-install --kerneldir puts kernel modules in wrong directory #194

Closed
marmarek opened this issue Jan 12, 2017 · 2 comments
Closed

dracut-install --kerneldir puts kernel modules in wrong directory #194

marmarek opened this issue Jan 12, 2017 · 2 comments

Comments

@marmarek
Copy link
Contributor

--kerneldir option should only be about where to get kernel modules from, not about where to place them inside initramfs. But the actual result is that modules are copied preserving the full path, effectively making the modules "missing" in the initramfs (because are placed outside of /lib/modules).

Example test case:

$ dracut --nomdadmconf --nolvmconf --kmoddir ~/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64 --modules 'kernel-modules qubes-vm-simple' --conf '/dev/null' --confdir '/var/empty' -d 'xenblk xen-blkfront cdrom ext4 jbd2 crc16 dm_snapshot' -f initrd.test 4.4.38-11.pvops.qubes.x86_64
$ lsinitrd initrd.test |grep /lib/modules
Arguments: --nomdadmconf --nolvmconf --kmoddir '/home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64' --modules 'kernel-modules qubes-vm-simple' --conf '/dev/null' --confdir '/var/empty' -d 'xenblk xen-blkfront cdrom ext4 jbd2 crc16 dm_snapshot' -f
drwxr-xr-x   3 root     root            0 Nov  7 09:59 home/user/install-mod/lib/modules
drwxr-xr-x   3 root     root            0 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64
drwxr-xr-x   6 root     root            0 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel
drwxr-xr-x   3 root     root            0 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto
drwxr-xr-x   2 root     root            0 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto/async_tx
-rw-r--r--   1 root     root         6904 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto/async_tx/async_memcpy.ko
-rw-r--r--   1 root     root        13288 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto/async_tx/async_pq.ko
-rw-r--r--   1 root     root        13144 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto/async_tx/async_raid6_recov.ko
-rw-r--r--   1 root     root         8120 Nov  7 09:59 home/user/install-mod/lib/modules/4.4.38-11.pvops.qubes.x86_64/kernel/crypto/async_tx/async_tx.ko
(...)
drwxr-xr-x   3 root     root            0 Nov  7 09:59 usr/lib/modules
drwxr-xr-x   2 root     root            0 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64
-rw-r--r--   1 root     root           45 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.alias
-rw-r--r--   3 root     root            0 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.alias.bin
-rw-r--r--   1 root     root         6933 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.builtin
-rw-r--r--   1 root     root         9440 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.builtin.bin
-rw-r--r--   1 root     root            0 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.dep
-rw-r--r--   3 root     root            0 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.dep.bin
-rw-r--r--   1 root     root            0 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.devname
-rw-r--r--   1 root     root       122893 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.order
-rw-r--r--   1 root     root           55 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.softdep
-rw-r--r--   1 root     root           49 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.symbols
-rw-r--r--   3 root     root           12 Nov  7 09:59 usr/lib/modules/4.4.38-11.pvops.qubes.x86_64/modules.symbols.bin

Full debug output: https://gist.github.com/marmarek/2efecb1e4f74ce3a42bcc3e7c7aa64af

haraldh added a commit that referenced this issue Jan 16, 2017
Specifying a different kernel module directory with --kmoddir would
result in the same directory being the destination directory.

Strip everything before the "/lib/modules" for the destination dir.

#194
@haraldh
Copy link
Collaborator

haraldh commented Jan 16, 2017

should be fixed with commit be5025b

@haraldh haraldh closed this as completed Jan 16, 2017
danimo pushed a commit to danimo/dracut that referenced this issue Feb 15, 2017
Specifying a different kernel module directory with --kmoddir would
result in the same directory being the destination directory.

Strip everything before the "/lib/modules" for the destination dir.

dracutdevs#194
marmarek added a commit to marmarek/qubes-linux-kernel that referenced this issue May 20, 2017
dracut --kmoddir is broken in dracut-044 (mangles module path inside
initramfs). This is already fixed upstream, but updated package still
haven't been uploaded to Fedora 25.
For now, postprocess the initramfs fixing the path.

https://bugzilla.redhat.com/show_bug.cgi?id=1431317
dracutdevs/dracut#194
QubesOS/qubes-issues#2574
@dedekind
Copy link

dedekind commented Jul 29, 2017

Just for record, the problem also exists in F26. Here is the RH bugzilla ticket.

LaszloGombos pushed a commit to LaszloGombos/dracut that referenced this issue Jan 27, 2023
fix(i18n): add required includes for keymaps (bsc#1200950)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants