Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:interrupt_the_boot_process_in_order_to_gain_access_to_a_system [2016/02/29 21:23] billdozor created |
linux_wiki:interrupt_the_boot_process_in_order_to_gain_access_to_a_system [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
**General Information** | **General Information** | ||
- | About this page/ | + | **If you cannot perform |
---- | ---- | ||
Recover the root user's password | Recover the root user's password | ||
- | - Interrupt boot process at grub menu | + | - Interrupt boot process at grub menu (move an arrow key up or down to stop the grub boot countdown) |
- | - Press " | + | - Press " |
- | - Navigate to the " | + | - Navigate to the line starting with " |
- | - Append | + | - Append |
+ | - rd.break => stops early in the boot process (when initramfs is in memory and has not mounted the root file system as rw yet) | ||
+ | - enforcing=0 => set SELinux to permissive mode | ||
- Ctrl+x to continue boot process, it will stop within the initramfs shell | - Ctrl+x to continue boot process, it will stop within the initramfs shell | ||
- | - Remount sysroot file system as read/write: mount -o remount,rw /sysroot | + | - Remount |
- | - Change root to that root file system: chroot /sysroot | + | - Change root to that root file system<code bash>chroot /sysroot</ |
- | - Change root password: passwd | + | - Change root password<code bash>passwd</ |
- | - Have system relabel at boot: touch /.autorelabel | + | - Exit the chroot jail and initramfs shell< |
- | - If this is not done, SELinux will prevent the /etc/passwd file from being changed | + | switch_root:/# exit</ |
- | - Exit the chroot jail: exit | + | - The system will continue to boot |
- | - Exit the initramfs shell: exit | + | - **Note**: There may be a considerable delay where it looks like nothing |
- | - System will reboot after a delay | + | - Login as root with the new password |
+ | - Restore SELinux file context to / | ||
+ | - Set SELinux to enforcing again< | ||
---- | ---- | ||