Table des matières

, , ,

SystemD mode recovery single mode linux kernel param

Parametre Kernel

pour allez dans le tty8 ou tty9

ce qui revient à

systemctl enable debug-shell.service

Avec init=/bin/bash (à l'ancienne)

Dans le grub, ligne commençant par linux

init=/bin/bash
mount -n -o remount,rw /
passwd
reboot -f

rd.break

kernel param rd.break Si SeLinux : ajouter : enforcing=0

Exemple :

rd.break enforcing=0

Puis

loadkeys fr
chroot /sysroot

Sur RedHat

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  

Alternative à touch /.autorelabel

mount –o remount,rw /sysroot
chroot /sysroot
passwd root
restorecon -v /etc/shadow
setenforce 1 ; getenforce