0

Ubuntu 16.04, when I try to update initramfs (or apt does), I am getting some errors. I looks like it is trying to generate a 'new' kernel version which is kicking an error. Any ideas on how to fix this?

PC:/boot$ sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-new
WARNING: missing /lib/modules/new
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed new
dpkg: warning: version 'new' has bad syntax: version number does not start with digit
depmod: ERROR: Bad version passed new
update-initramfs: Generating /boot/initrd.img-4.4.0-23-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-23-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_dFsQMd/lib/modules/4.2.0-23-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_dFsQMd/lib/modules/4.2.0-23-generic/modules.builtin: No such file or directory
update-initramfs: Generating /boot/initrd.img-4.2.0-23
WARNING: missing /lib/modules/4.2.0-23
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.2.0-23: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_J6fvxO/lib/modules/4.2.0-23/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_J6fvxO/lib/modules/4.2.0-23/modules.builtin: No such file or directory
2

I had a similar problem, and I fixed it like this:

sudo update-initramfs -d -k new

That should remove the bogus /boot/initrd.img-new. Then try your command again:

sudo update-initramfs -u -k all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.