![更新 initramfs:失败](https://linux22.com/image/1207341/%E6%9B%B4%E6%96%B0%20initramfs%EF%BC%9A%E5%A4%B1%E8%B4%A5.png)
最近,我通过从实时 复制来恢复意外删除的/share
文件夹,并以某种方式设法启动了计算机。从那时起,计算机运行正常,但出现以下问题:Ubuntu-21.04
Ubuntu-21.04
第1部分
我的计算机 ( Ubuntu-21.04
) 只能以内核启动5.11.0-25
,有三个内核5.11.0-37
,5.11.0-34
和5.11.0-25
。
启动卡在内核(*37*, *34*
),出现错误:
end kernel panic -not sync: vfs : unable to mount root fs on unknown block [0 0]
第2部分
如果我启动内核5.11.0-25
,那么问题是我无法安装任何软件包,或升级 ubunutu。任何安装或升级都会出现以下错误。
输出sudo apt update
Hit:1 http://in.archive.ubuntu.com/ubuntu hirsute InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu groovy InRelease
Get:5 http://security.ubuntu.com/ubuntu hirsute-security InRelease [110 kB]
Fetched 110 kB in 1s (146 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
输出sudo apt upgrade
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.139ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.11.0-37-generic (5.11.0-37.41) ...
Processing triggers for initramfs-tools (0.139ubuntu3) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-25-generic
Error: /sbin/zdb is not executable.
Error: /sbin/zpool is not executable.
Error: /sbin/zfs is not executable.
Error: /sbin/mount.zfs is not executable.
Error: /lib/udev/vdev_id is not executable.
Error: /lib/udev/zvol_id is not executable.
E: /usr/share/initramfs-tools/hooks/zfs failed with return 2.
update-initramfs: failed for /boot/initrd.img-5.11.0-25-generic with 2.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 2
Processing triggers for linux-image-5.11.0-37-generic (5.11.0-37.41) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-37-generic
Error: /sbin/zdb is not executable.
Error: /sbin/zpool is not executable.
Error: /sbin/zfs is not executable.
Error: /sbin/mount.zfs is not executable.
Error: /lib/udev/vdev_id is not executable.
Error: /lib/udev/zvol_id is not executable.
E: /usr/share/initramfs-tools/hooks/zfs failed with return 2.
update-initramfs: failed for /boot/initrd.img-5.11.0-37-generic with 2.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 2
dpkg: error processing package linux-image-5.11.0-37-generic (--configure):
installed linux-image-5.11.0-37-generic package post-installation script subprocess returned error exit
status 1
Errors were encountered while processing:
initramfs-tools
linux-image-5.11.0-37-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
文件系统
/dev/sdb2 ext4 19G 16G 1.6G 92% /
/dev/sdb1 vfat 380M 6.9M 373M 2% /boot/efi