如正文所示:
[ 0.187279] Initramfs unpacking failed: invalid magic at start of compressed
archive
[ 0.373537] Kernel panic - not syncing: UFS: Unable to mount root fs on unknown
wn-block(0,0)
[ 0.3736011 CPU: 0 PID: 1 Comm: swapper/0 Mot tainted 5.4.0-146-generic #163-
Ubuntu
[ 0.373661] Hardware name: To Be Filled By 0.E.M. To Be Filled By 0.E.M./AB35
0 Pro1, BIOS P5.80 06/14/2019
[ 0.3737241 Call Trace:
[ 0.373777] dump_stack+0x6d/0x8b
[ 0.3738291 panic+0x101/0x2e3
[ 0.373880] mount_block_root+0x23f/0x2e8
[ 0.373933] mount_root+0x38/0x3a
[ 0.3739841 prepare_namespace+0x13f/0x194
[ 0.374036] kernel_init_freeable+0x265/0x289
[ 0.374090] ? rest_init+0xb0/0xb0
[ 0.374141] kernel_init+0xe/0x110
[ 0.3741921 ret_from_fork+0x35/0x10
[ 0.374263] Kernel Offset: 0x31200000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 0.3743341 ---[ end Kernel panic - not syncing: UFS: Unable to mount root fs on unknown-block(0,0) ]---
我在我的 Ubuntu SSD 驱动器上使用 LUKS + LVM。
我尝试使用 livecd、mount、chroot 和更新 initramfs + grub 进行启动,但这并不能解决问题。
mint@mint:~$ sudo cryptsetup luksOpen /dev/sdc5 sda5_crypt
Enter passphrase for /dev/sdc5:
mint@mint:~$ sudo mount /dev/mapper/ubuntu--vg-root /mnt
mint@mint:~$ sudo mount --bind /dev /mnt/dev
mint@mint:~$ sudo mount --bind /dev/pts /mnt/dev/pts
mint@mint:~$ sudo mount --bind /proc /mnt/proc
mint@mint:~$ sudo mount --bind /sys /mnt/sys
mint@mint:~$ sudo mount /dev/sdc1 /mnt/boot
mint@mint:~$ sudo chroot /mnt
root@mint:/# sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-5.4.0-146-generic
root@mint:/# sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-146-generic
Found initrd image: /boot/initrd.img-5.4.0-146-generic
Found linux image: /boot/vmlinuz-5.4.0-144-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows 10 on /dev/nvme0n1p1
done
root@mint:/#
答案1
几个小时后,我找到了解决方案......只需安装新的内核版本,之后我就能成功启动。
完整命令列表:
# My ubuntu uses LUKS + LVM with separate boot partition
# sdc - my SSD in LiveCD
# sdc5 my root partition name in LiveCD
# sda5_crypt - should be same as in /etc/crypttab in system for restoring
sudo cryptsetup luksOpen /dev/sdc5 sda5_crypt
sudo mount /dev/mapper/ubuntu--vg-root /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
# Mount boot partition
sudo mount /dev/sdс1 /mnt/boot
# chroot to /mnt
sudo chroot /mnt
# Install new kernel
cd /home/username
mkdir kern
cd kern
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-headers-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-headers-5.10.0-051000_5.10.0-051000.202012132330_all.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-image-unsigned-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-modules-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
sudo dpkg -i *.deb
之后我得到了这个日志:
Selecting previously unselected package linux-headers-5.10.0-051000-generic.
(Reading database ... 295073 files and directories currently installed.)
Preparing to unpack linux-headers-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-headers-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-headers-5.10.0-051000.
Preparing to unpack linux-headers-5.10.0-051000_5.10.0-051000.202012132330_all.deb ...
Unpacking linux-headers-5.10.0-051000 (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-image-unsigned-5.10.0-051000-generic.
Preparing to unpack linux-image-unsigned-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-modules-5.10.0-051000-generic.
Preparing to unpack linux-modules-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-modules-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Setting up linux-headers-5.10.0-051000 (5.10.0-051000.202012132330) ...
Setting up linux-headers-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.10.0-051000-generic
Kernel preparation unnecessary for this kernel. Skipping...
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 118 (offset 47 lines).
Building module:
cleaning build area...(bad exit status: 2)
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.10.0-051000-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.10.0-051000-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules...................
cleaning build area...(bad exit status: 2)
nvidia.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
nvidia-peermem.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
depmod...
...done.
Setting up linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-146-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-146-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.10.0-051000-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.10.0-051000-generic
Setting up linux-modules-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Processing triggers for linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.10.0-051000-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.10.0-051000-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.0-051000-generic
Found initrd image: /boot/initrd.img-5.10.0-051000-generic
Found linux image: /boot/vmlinuz-5.4.0-146-generic
Found initrd image: /boot/initrd.img-5.4.0-146-generic
Found linux image: /boot/vmlinuz-5.4.0-144-generic
Found initrd image: /boot/initrd.img-5.4.0-144-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows 10 on /dev/nvme0n1p1
done
启动系统后,我运行了更新检查并安装了“5.15.0-69-generic”。
祝你好运!