删除RootShell后用Bootloader救援
fish很好用,所以删除zsh,但是忘记RootShell依然是zsh。
接着尝试了数十次正确密码无法登录,事实上是因为找不到Shell导致的失败orz
使用systemd-boot的话
Step 1: Reboot and Access systemd-boot
Restart your system
When the systemd-boot menu appears, press e to edit the
current boot entry
Look for the kernel parameters line - it usually starts with
something like linux /vmlinuz-... root=...
Step 2: Modify Kernel Parameters for Rescue Mode
Add rw init=/bin/sh at end
rw- mounts the filesystem as read-writeinit=/bin/sh- tells the kernel to start sh instead of the normal init system
Step 3: chsh or reinstall shell
1 | chsh -s /usr/bin/bash |
Or
1 | paru -Syu zsh |