Linux/Rescue

Linux/Rescue

单用户模式 (init.d)

Linux 本地启动单用户模式(绕过验证,不加载任何启动项):开机时在 grub 引导界面按任意键中断自动启动,按 a 键编辑内核启动参数,在显示的当前启动参数末尾加上 " 1" (数字1前面有个空格),回车即可

单用户模式 (systemd)

Method 1

在 grub 界面按 e 编辑当前项,Append " rd.break" to the end of line which begins with linux16 and then press "ctrl+x"

mount -o remount,rw /sysroot
chroot /sysroot
echo "New-root-password" | passwd --stdin root

Method 2

In grub, press e, Replace "ro" with "rw init=/sysroot/bin/sh", CTRL + x,

chroot /sysroot

Last update: 2020-09-28 04:12:36 UTC