web-dev-qa-db-ja.com

4.5.3Xubuntuカーネルのアンインストールの問題

この手動でインストールされた、サポートされていない4.5.3Xubuntuカーネルを削除しようとしました。今、私の友人が私のためにそれをインストールしたので、彼がそれをどのようにしたのかわかりません。私は同様の答えを調べて、手順に従いました。

その後、いくつかのモジュールをインストールしようとしても効果がないのですが、ここで受け取ったメッセージが原因を示唆しているのではないかと思います...?

おそらく私がするのを忘れたことがありますよね?

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

ほぼそこに、/var/lib/initramfs.toolsで削除したカーネルのinitrd.imgのアドレスを削除する必要があります。

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

これにより、update-initramfs(行ったモジュールの変更によって呼び出されます)が、存在しないカーネルのinitrdを再生成しようとするのを防ぎます。

その後、再度インストールコマンドを実行して設定を完了します。

2
Zanna