Parametre Kernel
systemd.unit=rescue.targetsystemd.debug-shell=1systemd.unit=emergency.targetpour allez dans le tty8 ou tty9
ce qui revient à
systemctl enable debug-shell.service
Dans le grub, ligne commençant par linux
init=/bin/bash
mount -n -o remount,rw / passwd reboot -f
kernel param rd.break Si SeLinux : ajouter : enforcing=0
Exemple :
rd.break enforcing=0
Puis
loadkeys fr chroot /sysroot
rd.break \ ? enforcing=0
mount -o remount,rw /sysroot chroot /sysroot passwd touch /.autorelabel # ou alors (plus rapide) : load_policy -i #puis restorecon -Rv /etc
rd.break enforcing=0 NOTE: you might have to make “console=tty0” above as well depending if it's virtual or not.mount –o remount,rw /sysroot chroot /sysroot passwd root
restorecon -v /etc/shadow setenforce 1 ; getenforce