Cul*_*rox 4 initramfs-tools boot-partition
我几个月来一直在运行自定义内核,没有模块,没有 initramfs,没有 initrd。
\n我已经安装了一个新的网络摄像头(锁定...),当然它不起作用,因为我没有正确的模块。我从 5.7.9 开始构建新内核。
\n(...)copying an oldconfig from the original kernel from the distribution (linux mint) into the source rep(...)\nmake oldconfig\nmake\nmake modules_install\nRun Code Online (Sandbox Code Playgroud)\n但最后一步失败了
\nmake install\n\nsh ./arch/x86/boot/install.sh 5.9.7 arch/x86/boot/bzImage \\\n System.map "/boot"\nrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.9.7 /boot/vmlinuz-5.9.7\nrun-parts: executing /etc/kernel/postinst.d/dkms 5.9.7 /boot/vmlinuz-5.9.7\n * dkms: running auto installation service for kernel 5.9.7 [ OK ] \nrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.9.7 /boot/vmlinuz-5.9.7\nupdate-initramfs: Generating /boot/initrd.img-5.9.7\nW: Possible missing firmware /lib/firmware/rtl_nic/rtl8125b-2.fw for module r8169\nI: The initramfs will attempt to resume from /dev/sda3\nI: (UUID=8630d321-f53f-410f-a44a-8d6e91235129)\nI: Set the RESUME variable to override this.\nError 24 : Write error : cannot write compressed block \nE: mkinitramfs failure cpio 141 lz4 -9 -l 24\nupdate-initramfs: failed for /boot/initrd.img-5.9.7 with 1.\nrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1\nmake[1]: *** [arch/x86/boot/Makefile:160 : install] Erreur 1\nmake: *** [arch/x86/Makefile:274 : install] Erreur 2\nRun Code Online (Sandbox Code Playgroud)\n我在启动时见过很多空间问题,但似乎不是我的情况。
\n欲了解信息:
\nmore /etc/fstab \xe2\x9c\x94 15m 55s 10:09:59 \n# /etc/fstab: static file system information.\n#\n# Use 'blkid' to print the universally unique identifier for a\n# device; this may be used with UUID= as a more robust way to name devices\n# that works even if disks are added and removed. See fstab(5).\n#\n# <file system> <mount point> <type> <options> <dump> <pass>\n# / was on /dev/sda4 during installation\nUUID=8b16e804-06d3-4291-a33f-227b961e9b8e / ext4 errors=remount\n-ro 0 1\n# /boot was on /dev/sda2 during installation\nUUID=6c6fe91d-c3df-4580-ba40-e19dd31710d4 /boot ext4 defaults \n 0 2\n# /boot/efi was on /dev/sda1 during installation\nUUID=43E1-4AD4 /boot/efi vfat umask=0077 0 1\n# /home was on /dev/sdb3 during installation\nUUID=c189cd20-50ff-4ec8-ae61-cbc870fb8926 /home ext4 defaults \n 0 2\n# swap was on /dev/sda3 during installation\nUUID=8630d321-f53f-410f-a44a-8d6e91235129 none swap sw \n 0 0\nRun Code Online (Sandbox Code Playgroud)\n和磁盘使用情况...
\ndf -h \xe2\x9c\x94 10s 10:21:15 \nSys. de fichiers Taille Utilis\xc3\xa9 Dispo Uti% Mont\xc3\xa9 sur\nudev 3,9G 0 3,9G 0% /dev\ntmpfs 790M 3,2M 787M 1% /run\n/dev/sda4 91G 16G 70G 19% /\ntmpfs 3,9G 114M 3,8G 3% /dev/shm\ntmpfs 5,0M 4,0K 5,0M 1% /run/lock\ntmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup\n/dev/sda2 923M 249M 611M 29% /boot\n/dev/sda1 197M 7,8M 190M 4% /boot/efi\n/dev/sdb3 484G 237G 223G 52% /home\ntmpfs 790M 16K 790M 1% /run/user/1000\nRun Code Online (Sandbox Code Playgroud)\n我也修改了一些Grub2参数,我不知道这是否会导致问题......
\n实际上,我可以在任何内核上启动(原始内核、使用 initramfs 启动、我的自定义内核...),但我就是无法安装这个新内核。\n有什么想法吗?
\n小智 6
回复中的重要反馈sudo apt upgrade是:
Error 24 : Write error : cannot write compressed block
Run Code Online (Sandbox Code Playgroud)
换句话说,可能没有足够的空间来/boot写出并完成升级。要检查,请键入:
df -h | grep boot
Run Code Online (Sandbox Code Playgroud)
如果您已经使用了大约 90% 的空间并且只有几十兆字节的可用空间,这显然是您的问题。但是,这取决于您的自定义内核所需的空间。
修复方法是删除不需要的内核映像。输入sudo apt list --installed | grep linux-image,你会得到类似这样的信息:
linux-image-5.4.0-54-generic/focal-updates,now 5.4.0-54.60 amd64 [installed,auto-removable]
linux-image-5.4.0-56-generic/now 5.4.0-56.62 amd64 [installed,local]
linux-image-5.4.0-58-generic/focal-updates,focal-security,now 5.4.0-58.64 amd64 [installed,automatic]
linux-image-5.4.0-59-generic/focal-updates,now 5.4.0-59.65 amd64 [installed,automatic]
linux-image-generic/focal-updates,now 5.4.0.59.62 amd64 [installed,automatic]
Run Code Online (Sandbox Code Playgroud)
使用以下方法删除不需要的图像:
sudo apt remove linux-headers-5.4.0-54 linux-headers-5.4.0-54-generic linux-image-5.4.0-54-generic linux-modules-5.4.0-54-generic
Run Code Online (Sandbox Code Playgroud)
替换5.4.0-54您的内核映像。您无需重新运行sudo apt upgrade -y. 但是,如果你这样做,你会看到类似这样的东西:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-5.4.0-56 linux-headers-5.4.0-56-generic linux-image-5.4.0-56-generic linux-modules-5.4.0-56-generic
linux-modules-extra-5.4.0-56-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)
因此,执行sudo apt autoremove并在将来阅读输出,apt upgrade并确保做好你的家务工作!
| 归档时间: |
|
| 查看次数: |
9290 次 |
| 最近记录: |