Can't create initramfs for module-less kernel

Bug #172465 reported by Jürgen Kreileder
4
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned

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.)

Revision history for this message
Paolo Sammicheli (xdatap1) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in initramfs-tools (Ubuntu):
status: New → Incomplete
assignee: nobody → Paolo Sammicheli (xdatap1)
Revision history for this message
Jürgen Kreileder (jk) wrote :

Still happens on Jaunty.

Revision history for this message
Paolo Sammicheli (xdatap1) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in initramfs-tools (Ubuntu):
status: Incomplete → Confirmed
assignee: Paolo Sammicheli (xdatap1) → nobody
Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Is this still an issue for you? Which Ubuntu version do you use? Thank you for telling us!

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Malte Swart (malte.swart) wrote :

I recently built a initramfs without modules on presice.
I got a lot of error output:
grep: /boot/config-3.2.33: No such file or directory
WARNING: missing /lib/modules/3.2.33
Device driver support needs thus be built-in linux image!
WARNING: Couldn't open directory /lib/modules/3.2.33: No such file or directory
FATAL: Could not open /lib/modules/3.2.33/modules.dep.temp for writing: No such file or directory
FATAL: Could not load /lib/modules/3.2.33/modules.dep: No such file or directory
[last line 20+ times more]

but update-initramfs built a working initramfs.
So the FATAL error message is not a fatal one.

Changed in initramfs-tools (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.