カーネルをインストールできません

カーネルをインストールできません

私はこのガイドに従っていますhttps://kernelnewbies.org/OutreachyfirstpatchSetupカーネルをインストールしようとすると失敗します。

update-initramfs: Generating /boot/initrd.img-5.9.0
W: Possible missing firmware /lib/firmware/i915/rkl_dmc_ver2_01.bin for module i915
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.9.0 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
make[1]: *** [arch/x86/boot/Makefile:160: install] Error 1
make: *** [arch/x86/Makefile:274: install] Error 2

ただし、次の理由で/bootスペースとは何の関係もない可能性があります。

Filesystem                  Size  Used Avail Use% Mounted on
tmpfs                       2,4G  2,1M  2,4G   1% /run
/dev/mapper/vgkubuntu-root  232G  201G   19G  92% /
tmpfs                        12G   16K   12G   1% /dev/shm
tmpfs                       5,0M  4,0K  5,0M   1% /run/lock
tmpfs                       4,0M     0  4,0M   0% /sys/fs/cgroup
/dev/nvme0n1p2              705M  153M  501M  24% /boot
/dev/nvme0n1p1              511M   44M  468M   9% /boot/efi
tmpfs                       2,4G   80K  2,4G   1% /run/user/1000

そこにファイル(testという名前)を作成して保存できます。

4,0K .                        244K config-5.9.0      4,0K grub                         180K memtest86+.bin            5,4M System.map-5.8.0-63-generic  4,0K test                       12M vmlinuz-5.9.0
4,0K ..                       244K config-5.9.0.old   90M initrd.img-5.8.0-63-generic  184K memtest86+.elf            5,2M System.map-5.9.0                0 vmlinuz                    12M vmlinuz-5.9.0.old
244K config-5.8.0-63-generic  4,0K efi                16K lost+found                   184K memtest86+_multiboot.bin  5,2M System.map-5.9.0.old          14M vmlinuz-5.8.0-63-generic     0 vmlinuz.old

現在5.8.0-63-genericを実行しています。

誰でも私を助けることができますか?

ベストアンサー1

同じ問題が発生し、回避策は次のとおりです。

$ sudo rm /var/lib/dpkg/info/linux-firmware.*

記録のためにいくつかの法医学的証拠があります。私が受け取ったエラーメッセージは次のとおりです。

$ sudo apt upgrade
...
Setting up linux-firmware (1.200+system76~1632347857~21.04~9a6d09b) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7633-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7633-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)

このエラーは、デフォルトですべてのaptコマンド(インストール、自動削除など)で発生します。

/bootに41MBの空き容量があります。sudo apt-get remove linux-image-5.4.0-7642-generic同じ問題が発生するため、一部(または同様の項目)を削除してスペースを増やすことはできません。

私のシステム情報:

$  lsb_release -a
No LSB modules are available.
Distributor ID: Pop
Description:    Pop!_OS 21.04
Release:    21.04
Codename:   hirsute

$ uname -a
Linux thinkpad 5.11.0-7633-generic #35~1630100930~21.04~ae2753e-Ubuntu SMP Mon Aug 30 18:26:54 UTC  x86_64 x86_64 x86_64 GNU/Linux

次のファイルを削除して問題を解決します。

$ cd /var/lib/dpkg/info

$ ls -l linux-firmware.*
-rw-r--r-- 1 root root 119010 Sep 29 19:42 linux-firmware.list
-rw-r--r-- 1 root root 179422 Sep 22 23:57 linux-firmware.md5sums
-rwxr-xr-x 1 root root    105 Sep 22 23:57 linux-firmware.postinst

$ cat linux-firmware.postinst 
#!/bin/sh

set -e

if [ -x /usr/sbin/update-initramfs ]; then
    /usr/sbin/update-initramfs -u -k all
fi

(もちろん、それを削除せずに/ tmpに移動しました)

ここに解決策が提案されています:https://itsfoss.com/dpkg-returned-an-error-code-1/

おすすめ記事