str*_*ker 3 grub arch-linux pacman linux-kernel
我在通过pacman -Syu.
在升级过程中,我遇到了python包冲突,导致升级事务中止。所以我解决了冲突:通过删除python包pip uninstall pkg_name,然后重试pacman -Syu。这一次没有更多的错误。
然后我重新启动了我的系统,问题出现了:
Warning: /lib/modules/4.19.1-arch1-1-ARCH/modules.devname not found - ignoring
starting version 239
/dev/nvme0n1p2: clean, 968023/31227904 files, 27066236/124895569 blocks
mount: /new_root: unknown filesystem type 'ext4'
You are now being dropped into an emergency shell,
sh: can't access tty: job control turned off
[rootfs] #
Run Code Online (Sandbox Code Playgroud)
顺便说一句:正如警告所示,我正在将内核 4.18 升级到 4.19
如果更新被中止并且内核正在更新过程中,您可能仍然拥有旧内核的 initramfs,/boot同时安装了新内核,这会阻止启动。如果您忘记正确安装/boot分区,这也可能发生在新安装的系统上。
解决此问题的最简单方法是使用 archlinux 安装介质启动,执行 achroot并使用以下命令重新安装内核pacman
# mount /dev/yourrootdisk /mnt
# mount /dev/yourbootdisk /mnt/boot # if needed
# mount /dev/yourefipartition /mnt/boot/EFI # if you use EFI (optionnal)
# arch-chroot /mnt
# pacman -S linux
Run Code Online (Sandbox Code Playgroud)
应该修改的文件是/boot/initramfs-linux.img,/boot/initramfs-linux-fallback.img所以你可能不需要挂载 EFI 分区
如果由于某种原因无法使用pacman,也可以mkinitcpio手动启动重新生成initramfs以使用新内核