最近更新了 arch 在开机 Loading inital ramdisk 后会 kernel panic

最近 paru -Syyu 后 arch 无法正常开机,屏幕上输出了 Loading initial ramdisk 以及一行 rust_binder: Loaded Rust Binder 日志后就 kernel panic 了,我试着用 Live CD 进了 arch-chroot,装了 linux-lts 并执行 mkinitcpio -P 后选择 linux-lts 内核也无法启动。我也确认了 efi 分区空间还有很多余量,下面是 panic 的截图,如果还有需要提供的信息还请告知,希望有高手指点一二

发文本日志呀……

我那个链接打开后加载不出来文本日志,,我试一下能不能下载下来

全选、复制,然后过来敲代码块(```)往里边粘贴。

Panic Report
Arch: x86_64
Version: 6.19.9-zen1-1-zen
[    0.851569] NET: Registered PF_PACKET protocol family
[    0.853325] x86/amd: Previous system reset reason [0x00080800]: software wrote 0x6 to reset control register 0xCF9
[    0.853338] microcode: Current revision: 0x0a500012
[    0.853340] microcode: Updated early from: 0x0a50000d
[    0.853678] resctrl: L3 allocation detected
[    0.853680] resctrl: MB allocation detected
[    0.853681] resctrl: L3 monitoring detected
[    0.853706] IPI shorthand broadcast: enabled
[    0.857940] sched_clock: Marking stable (855730090, 1299120)->(873280538, -16251328)
[    0.858239] registered taskstats version 1
[    0.858953] Loading compiled-in X.509 certificates
[    0.862182] Loaded X.509 cert 'Build time autogenerated kernel key: e83ad1f570d498c6febee8eddae81b1b52987dcb'
[    0.866584] zswap: loaded using pool zstd
[    0.866633] Demotion targets for Node 0: null
[    0.866772] Key type .fscrypt registered
[    0.866774] Key type fscrypt-provisioning registered
[    0.867085] Btrfs loaded, zoned=yes, fsverity=yes
[    0.867118] Key type big_key registered
[    0.867498] PM:   Magic number: 2:782:81
[    0.867576] memory memory238: hash matches
[    0.868414] RAS: Correctable Errors collector initialized.
[    0.872323] clk: Disabling unused clocks
[    0.872325] PM: genpd: Disabling unused power domains
[    1.056996] usb 3-3: new full-speed USB device number 2 using xhci_hcd
[    1.057007] usb 1-1: new full-speed USB device number 2 using xhci_hcd
[    1.209176] usb 3-3: New USB device found, idVendor=8087, idProduct=0029, bcdDevice= 0.01
[    1.209184] usb 3-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.220036] usb 1-1: New USB device found, idVendor=36b0, idProduct=3002, bcdDevice= 1.03
[    1.220042] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.220044] usb 1-1: Product: Wireless 2.4G Dongle
[    1.220047] usb 1-1: Manufacturer: RDMCTMZT
[    1.220050] usb 1-1: SerialNumber: 19971217
[    1.253596] input: RDMCTMZT Wireless 2.4G Dongle as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1:1.0/0003:36B0:3002.0001/input/input3
[    1.280724] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    1.281105] ata1.00: ATA-9: TOSHIBA THNSNJ128GCSU, JURA0101, max UDMA/100
[    1.281251] ata1.00: 250069680 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    1.282764] ata1.00: Features: Dev-Sleep HIPM DIPM
[    1.285546] ata1.00: configured for UDMA/100
[    1.286020] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA THNSNJ12 0101 PQ: 0 ANSI: 5
[    1.286865] sd 0:0:0:0: [sda] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[    1.286879] sd 0:0:0:0: [sda] Write Protect is off
[    1.286884] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.286904] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.286931] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[    1.305607] hid-generic 0003:36B0:3002.0001: input,hidraw0: USB HID v1.11 Keyboard [RDMCTMZT Wireless 2.4G Dongle] on usb-0000:04:00.3-1/input0
[    1.306328]  sda: sda1 sda2 sda3 sda4
[    1.306579] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.308155] Freeing unused decrypted memory: 2028K
[    1.308951] Freeing unused kernel image (initmem) memory: 4916K
[    1.308966] Write protecting the kernel read-only data: 43008k
[    1.309486] Freeing unused kernel image (text/rodata gap) memory: 1092K
[    1.309869] Freeing unused kernel image (rodata/data gap) memory: 1960K
[    1.315005] hid-generic 0003:36B0:3002.0002: hiddev96,hidraw1: USB HID v1.11 Device [RDMCTMZT Wireless 2.4G Dongle] on usb-0000:04:00.3-1/input1
[    1.326524] input: RDMCTMZT Wireless 2.4G Dongle Mouse as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1:1.2/0003:36B0:3002.0003/input/input4
[    1.326585] input: RDMCTMZT Wireless 2.4G Dongle System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1:1.2/0003:36B0:3002.0003/input/input5
[    1.356766] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    1.356772] rodata_test: all tests were successful
[    1.356779] Run /init as init process
[    1.356780]   with arguments:
[    1.356782]     /init
[    1.356784]   with environment:
[    1.356785]     HOME=/
[    1.356786]     TERM=linux
[    1.357341] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    1.357349] CPU: 10 UID: 0 PID: 1 Comm: init Not tainted 6.19.9-zen1-1-zen #1 PREEMPT(full)  6f8c72287e80f03c3bf09eb245fa9f7bb8d741fb
[    1.357357] Hardware name: Maxtang FP650/FP650, BIOS FP650H506 08/09/2024
[    1.357363] Call Trace:
[    1.357368]  <TASK>
[    1.357371]  dump_stack_lvl+0x5d/0x80
[    1.357383]  vpanic+0xdb/0x2d0
[    1.357390]  panic+0x6b/0x6b
[    1.357394]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357401]  do_exit.cold+0x3d/0x57
[    1.357407]  do_group_exit+0x2d/0xc0
[    1.357416]  __x64_sys_exit_group+0x18/0x20
[    1.357420]  x64_sys_call+0x14fd/0x1510
[    1.357427]  do_syscall_64+0x81/0x600
[    1.357436]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357440]  ? generic_fillattr+0x4d/0x130
[    1.357447]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357451]  ? dput+0x34/0x170
[    1.357456]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357460]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357463]  ? mntput+0x21/0x60
[    1.357468]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357472]  ? vfs_statx+0xec/0x160
[    1.357476]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357480]  ? vfs_fstatat+0xc8/0x110
[    1.357484]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357487]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357491]  ? __x64_sys_newfstatat+0x1af/0x1f0
[    1.357499]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357503]  ? do_syscall_64+0x81/0x600
[    1.357506]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357510]  ? do_syscall_64+0x81/0x600
[    1.357513]  ? srso_alias_return_thunk+0x5/0xfbef5
[    1.357518]  ? exc_page_fault+0x7e/0x180
[    1.357524]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[    1.357529] RIP: 0033:0x7fc251a151f7
[    1.357534] Code: 00 00 00 b8 ca 00 00 00 0f 05 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 90 66 66 2e 0f 1f 84 00 00 00 00 00 b8 e7 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 09 f4 eb ee 66 0f 1f 44 00 00 f7 d8 89 05 90
[    1.357541] RSP: 002b:00007ffed3419258 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7
[    1.357548] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc251a151f7
[    1.357552] RDX: 000000000000000a RSI: 00007ffed3418920 RDI: 000000000000007f
[    1.357556] RBP: 00007ffed3419330 R08: 00007fc251a1d216 R09: 0000000000000020
[    1.357560] R10: 00007fc251a1ca9d R11: 0000000000000206 R12: 00007fc2519e7b1f
[    1.357564] R13: 0000000000000000 R14: 0000000000000000 R15: 00007fc2519e7b30
[    1.357570]  </TASK>
[    1.358504] Kernel Offset: 0x6800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)

这个报错说明你的initramfs没有成功加载。去你的/boot下检查你的initramfs-linux-zen.img文件大小是否正常。使用lsinitramfs命令可以检查它包含的文件列表。

注意你的/boot是不是单独挂载的。如果是,arch-chroot前别忘记了挂载它。

对了,在我安装内核之前是不是应该先把 efi 那个分区挂载到 /mnt/boot 上面,我这会儿发现如果我挂载 /dev/{我的efi分区} 到 /mnt/boot 上面后,里面只有一个 EFI 目录,在挂载前的 /mnt/boot 下面有这些文件,另外我这边没有 lsinitramfs 命令,我试了一下 lsinitcpio 命令输出了很多行信息

这取决于你选择的分区布局。

如果你把ESP挂载到/boot,那么你的内核放在ESP里,启动方便。如果不这么做,把ESP挂载到/efi或者/boot/efi,那么你的引导器需要能够读取你的/boot所在的文件系统以加载内核和initramfs。

ESP里如果不放内核的话,是只有一个EFI目录的。里边应该有引导器的目录。

我把 ESP 挂载到 /mnt/boot 上了,EFI 目录下有一个 GRUB 和 grubx64.efi 我是不是需要重新生成一次这个?

我感觉似乎是这个 grub 读取不到我的 /boot

你这个/boot是什么文件系统?btrfs吗?

vfat,nvme5 是我的主系统目录,nvme3 是我的 esp 分区

那就不知道是怎么回事了。你在grub引导菜单那里,按e键看看引导的命令?

仔细看了一下,难道是initramfs里的/init文件有问题?你的initramfs是基于systemd的吗?如果是,pacman -Qkk systemd看看文件都正常不?

另外我的 root 目录下面有这些东西,不知道是啥,我之前系统也是没什么问题,还有一个反常的事情是我使用了 Appimage 的 navicat 软件,但是用非 root 帐户运行时会因为 /tmp 目录下存在权限问题导致应用崩溃,后来我换了 root 去运行就没有这个问题了,但是之后就出现了数次 kernel panic,这次直接是没法开机了

呃,你的系统病情加重了啊……

好怪哦。


要不你pacman -Qkk不加包名,看看所有系统包文件的完整性?重点看哪些非配置文件有修改。

好的,另外我想问一下能在尽量不影响 /home 目录下的数据重新安装一次系统吗

能。大不了你把/home先备份了,装完再恢复回去。