Outils pour utilisateurs

Outils du site


tech:systemd_mode_recovery_single_mode_linux_kernel_param

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 à

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

  • 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.
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.
restorecon -v /etc/shadow
setenforce 1 ; getenforce
tech/systemd_mode_recovery_single_mode_linux_kernel_param.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki