archlinux 内核损坏 修复记录

内核损坏

无法启动系统时, 屏幕输出的信息类似kernel panic - not syncing: no working init found,判断是内核坏了。

修复步骤

  1. 制作一个arch系统盘。
  2. 链接网络。
    1. iwctl 进入网络选择环境
    2. 查看显卡device list
    3. 扫描存在的网络 station wlan0 scan
    4. 显示扫描到的网络station wlan0 get-networks
    5.链接网络(假设网络名为 ABC),必要时输入密码station wlan0 connect ABC
    6. exit 退出
  3. 内核修复
    1. 显示系统分区fdisk -l,找出启动分区和根分区。
    2. 将根分区和启动分区依次挂载到/mnt,/mnt/boot
    3. 切换到受损系统 arch-chroot /mnt
    4. 重新安装内核 pacman -S linux
    5. 更新grub配置 grub-mkconfig -o /boot/grub/grub.cfg
    6. 重启尝试进入系统

参考

https://poemdear.com/2019/05/09/arch-linux系统修复指南/
https://zhuanlan.zhihu.com/p/138951848

如有不当,欢迎指正 :)
原文地址:https://www.cnblogs.com/lif323/p/15041913.html