3

I tried to remove this manually installed, unsupported 4.5.3 Xubuntu kernel. Now, my friend installed it for me, so I'm not sure how he did it. I looked up a similar answer, and followed the steps.

Afterwards when I tried to install some modules they aren't taking effect, I suspect the messages I'm receiving here suggest the cause...?

There's probably something I forgot to do, right?

Chris@Chris-crackle:/boot$ rm vmlinuz-4.5.3-040503-generic 
rm: remove write-protected regular file 'vmlinuz-4.5.3-040503-generic'? y
rm: cannot remove 'vmlinuz-4.5.3-040503-generic': Permission denied
chris@Chris-crackle:/boot$ sudo rm vmlinuz-4.5.3-040503-generic 
[sudo] password for chris: 
chris@Chris-crackle:/boot$ sudo rm initrd.img-4.5.3-040503-generic 
chris@Chris-crackle:/boot$ sudo rm System.map-4.5.3-040503-generic 
chris@Chris-crackle:/boot$ sudo rm config-4.5.3-040503-generic 
chris@Chris-crackle:/boot$ cd /lib
chris@Chris-crackle:/lib$ ls
apparmor   init                                  recovery-mode
brltty     klibc-k3La8MUnuzHQ0_kG8hokcGAC0PA.so  systemd
cgmanager  ld-linux.so.2                         sysvinit
cpp        linux-sound-base                      terminfo
crda       lsb                                   udev
firmware   modprobe.d                            ufw
hdparm     modules                               x86_64-linux-gnu
ifupdown   plymouth                              xtables
chris@Chris-crackle:/lib$ cd modules/
chris@Chris-crackle:/lib/modules$ ls
3.19.0-25-generic  4.4.0-29-generic  4.5.3-040503-generic
3.19.0-64-generic  4.4.0-30-generic
chris@Chris-crackle:/lib/modules$ sudo rm -rf 4.5.3-040503-generic/
chris@Chris-crackle:/lib/modules$ sudo update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-30-generic
Found initrd image: /boot/initrd.img-4.4.0-30-generic
Found linux image: /boot/vmlinuz-4.4.0-29-generic
Found initrd image: /boot/initrd.img-4.4.0-29-generic
Found linux image: /boot/vmlinuz-3.19.0-64-generic
Found initrd image: /boot/initrd.img-3.19.0-64-generic
Found linux image: /boot/vmlinuz-3.19.0-25-generic
Found initrd image: /boot/initrd.img-3.19.0-25-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done
chris@Chris-crackle:/lib/modules$ cd /
chris@Chris-crackle:/$ sudo dpkg -i dkms*.deb rtlwifi*.deb
(Reading database ... 315543 files and directories currently installed.)
Preparing to unpack dkms_2.2.0.3-2ubuntu11_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11) over (2.2.0.3-2ubuntu11) ...
Preparing to unpack rtlwifi-new-dkms_0.10_all.deb ...

------------------------------
Deleting module version: 0.10
completely from the DKMS tree.
------------------------------
Done.
Unpacking rtlwifi-new-dkms (0.10) over (0.10) ...
Setting up dkms (2.2.0.3-2ubuntu11) ...
Setting up rtlwifi-new-dkms (0.10) ...
Loading new rtlwifi-new-0.10 DKMS files...
First Installation: checking all kernels...
It is likely that 4.5.3-040503-generic belongs to a chroot's host
Building only for 4.4.0-30-generic
Building for architecture x86_64
Building initial module for 4.4.0-30-generic
Done.

rtl_pci:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl_usb.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtlwifi.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

btcoexist.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8188ee.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192c-common.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192ce.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192cu.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192de.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192ee.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8192se.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8723ae.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8723be.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

rtl8821ae.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/4.4.0-30-generic/updates/dkms/

depmod........

Backing up initrd.img-4.4.0-30-generic to /boot/initrd.img-4.4.0-30-generic.old-dkms
Making new initrd.img-4.4.0-30-generic
(If next boot fails, revert to initrd.img-4.4.0-30-generic.old-dkms image)
update-initramfs....

DKMS: install completed.
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: Generating /boot/initrd.img-4.5.3-040503-generic
WARNING: missing /lib/modules/4.5.3-040503-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.5.3-040503-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_xlAFmF/lib/modules/4.5.3-040503-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_xlAFmF/lib/modules/4.5.3-040503-generic/modules.builtin: No such file or directory
2

Almost there, you just need to remove the address for the initrd.img of the kernel you removed in /var/lib/initramfs.tools

sudo rm /var/lib/initramfs-tools/4.5.3-040503-generic

That will stop update-initramfs (invoked by the module change you did) from trying to regenerate the initrd for a non-existent kernel.

Run the install command you did again afterwards to complete the configuration.

2

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.