[Bug 172465] Re: Can't create initramfs for module-less kernel
Benjamin Drung
172465 at bugs.launchpad.net
Tue Dec 19 23:02:57 UTC 2023
I tested on Ubuntu 24.04 "noble":
```
$ schroot-wrapper -p linux-image-generic,initramfs-tools,zstd -c noble -u root
$ rm -r /lib/modules/6.5.0-9-generic/
$ update-initramfs -u -k 6.5.0-9-generic
W: missing /lib/modules/6.5.0-9-generic
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/6.5.0-9-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_VFqof8/lib/modules/6.5.0-9-generic/modules.builtin: No such file or directory
W: Can't find modules.builtin.modinfo (for locating built-in drivers' firmware, supported in Linux >=5.2)
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_VFqof8/lib/modules/6.5.0-9-generic: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_VFqof8/lib/modules/6.5.0-9-generic: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /var/tmp/mkinitramfs_VFqof8/lib/modules/6.5.0-9-generic: No such file or directory
$ echo $?
0
```
So it spits out some warning/error, but it produces the correct
initramfs and exits with 0.
** Changed in: initramfs-tools (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/172465
Title:
Can't create initramfs for module-less kernel
Status in initramfs-tools package in Ubuntu:
Fix Released
Bug description:
Binary package hint: initramfs-tools
I want to create an initramfs for a kernel without modules (actually
without module support) on Gutsy (using initramfs-tool 0.85eubuntu20).
update-initramfs fails because mkinitramfs-kpkg can't handle the
missing /lib/modules/<kernel-version> directory.
If I create an empty /lib/modules/<kernel-version> dir, everything
works fine. That means, I get a working initramfs without any modules.
(The reason for creating an initramfs for a module-less kernel is that
my / is on LVM2. The volume needs to get activated by the initramfs.)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/172465/+subscriptions
More information about the foundations-bugs
mailing list