{{tag>Brouillon Kernel Systemd CA}} # SystemD mode recovery single mode linux kernel param Parametre Kernel * ''systemd.unit=rescue.target'' * ''systemd.debug-shell=1'' * ''systemd.unit=emergency.target'' pour allez dans le tty8 ou tty9 ce qui revient à ~~~bash systemctl enable debug-shell.service ~~~ ## Avec init=/bin/bash (à l'ancienne) Dans le grub, ligne commençant par **linux** ~~~ init=/bin/bash ~~~ ~~~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 ~~~bash loadkeys fr chroot /sysroot ~~~ ## Sur RedHat **rd.break** \\ ? **enforcing=0** ~~~bash mount -o remount,rw /sysroot chroot /sysroot passwd touch /.autorelabel # ou alors (plus rapide) : load_policy -i #puis restorecon -Rv /etc ~~~ ### Alternative à touch /.autorelabel * Remove rhgb quiet using the backspace key. * You can change "ro" to "rw" in this grub line to avoid having to do a remount (shown below). * IMPORTANT Add to the kernel line: ''rd.break enforcing=0'' NOTE: you might have to make "console=tty0" above as well depending if it's virtual or not. * Press Ctrl x to resume the boot process. NOTE: If you did not change "ro" to "rw" above, make sure to remount the /sysroot partition as shown below. ~~~bash mount –o remount,rw /sysroot chroot /sysroot passwd root ~~~ * Type exit twice to continue the boot process * Log in, open a terminal and enter the root account. ~~~bash restorecon -v /etc/shadow setenforce 1 ; getenforce ~~~