Using a chroot Environment
A chroot (change root) environment lets you temporarily switch the root directory of your current session — allowing you to enter your main operating system from within the rescue system and run commands as if it had booted normally.
Prerequisite: Your server must be booted into the Linux Rescue System and you must be connected via SSH. → Starting rescue mode
Step 1: Mount the System Partitions
Non-RAID Server
Use lsblk to identify your root and boot partitions, then mount them:
If there is no separate boot partition, the second line can be omitted. Adjust the device names to match your lsblk output.
RAID Server
Assemble the RAID arrays first, then mount the root and boot partitions:
/dev/md2 and /dev/md1 are examples — use lsblk to identify your actual RAID devices.
Step 2: Bind-Mount System Directories
Bind-mount the essential system directories:
Step 3: Enter the chroot Environment
Run the chroot command to switch into your server's filesystem:
Your prompt will change — from this point on, all commands you run (such as passwd, grub-install or update-grub; on AlmaLinux and Rocky Linux grub2-install and grub2-mkconfig) will act directly on your server's actual operating system.
Step 4: Exit the chroot Environment
Type exit to leave the chroot environment and return to the rescue prompt:
Then log out of your SSH session and cancel rescue mode via the PowerPanel. → Cancelling rescue mode
Further Documentation
For more information on the chroot command, refer to the official Linux man page.