initramfs-tools trigger fails if modules aren't installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools |
New
|
Undecided
|
Unassigned | ||
initramfs-tools (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I upgraded a system from gutsy to hardy. Before starting the do-release-upgrade -d, I removed all the kernel and modules packages that were installed under gutsy (I use my own kernel, because 2.6.24 has kernel bug 10118, and I was running out of disk space on /boot).
During the "setting up" stage, I hit problems: apt refused to do anything further and told me to run dpkg --configure -a. but dpkg --configure -a failed because the initramfs-tools trigger couldn't find the appropriate /lib/modules directory.
I eventually found a workaround:
rm /var/lib/
If initramfs-tools can't install without kernel modules installed, shouldn't it have a dependency on some modules package? Or, better still, maybe have the initramfs-tools trigger exit gracefully if it doesn't see any modules.
Changed in initramfs-tools (Ubuntu): | |
status: | New → Confirmed |
I also had this problem show up out of the blue on me last night. I removed a custom kernel several months ago and thought nothing of it until a recent update was pushed down to my system which caused dpkg to fail. The error:
Processing triggers for initramfs-tools ... img-2.6. 25-custom- pae-xeon 2.6.25- custom- pae-xeon img-2.6. 25-custom- pae-xeon
update-initramfs: Generating /boot/initrd.
Cannot find /lib/modules/
update-initramfs: failed for /boot/initrd.
dpkg: subprocess post-installation script returned error exit status 1
Like I said, this kernel image hasn't been installed in months, and I removed it via synaptic. Even when I did a purge, of this package I couldn't get dpkg to finish what it had started with initramfs.
I renamed the /var/lib/ dpkg/triggers/ initramfs- tools file and that resolve the issue.
Where is initramfs-tools reading information from to know which initrd's it needs to create during the update process?