1.5 KiB
arch-chroot
Also known as Chroot or Change Root. Is a command that lets you use a Root file system of another partition to do manual maintanance. A chroot is an operation that changes the apparent root directory for the current running process and their children. A program that is run in such a modified environment cannot access files and commands outside that environmental directory tree. This modified environment is called a chroot jail. Changing root is commonly done for performing system maintenance on systems where booting and/or logging in is no longer possible. Common examples are:
- Reinstalling the boot loader.
- Rebuilding the initramfs image.
- Upgrading or downgrading packages.
- Resetting a forgotten password.
- Building packages in a clean chroot.
To change the Root File System, log into a Shell and input the following commands:
lsblk
sudo mount /dev/<name of home root partition> /mnt
sudo mount /dev/<name of boot partition> /mnt/boot/efi
sudo arch-chroot /mnt
Attention: Do not try to mount the partition of your live environment, as it is already mounted After this the root of the other system is mounted and the prompt shows the root user indication for the mounted system. The system in use is no longer the home system.
After you did the system maintenance and did an update use the command exit to disconnect