Outils pour utilisateurs

Outils du site


tech:systemd_mode_recovery_single_mode_linux_kernel_param

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:systemd_mode_recovery_single_mode_linux_kernel_param [2025/04/14 09:28] Jean-Baptistetech:systemd_mode_recovery_single_mode_linux_kernel_param [2026/06/30 21:45] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{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
 +~~~
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki