Arch-chroot for Bios (legacy) systems
by </joekamprad> Edited by Bryanpwo 24 March 2021
If your machine doesn’t boot because of issues with GRUB, there is a way to get into your system through the terminal with “Change of root” or also known as Chroot. All you need is the ISO with our live-environment to get the job done.
To be able to chroot, you need to know on which partitions your boot and your root partition reside. To uncover that information boot up our ISO, open the terminal, and type:
sudo fdisk -l
Now your terminal displays the partition schemes of the disks it is connected with. This means, it also displays the partition scheme of the USB key (shown as /dev/loop in the example), your machine info usually looks like this:
In this case, the system partitions are on
/dev/sda but in your case it can be marked with another letter followed by another number, also the hierarchy can be different in your case.
With this information, you are able to chroot, and to be able to do that you need to have root permissions, so type the following command:
now you have root permissions.
For BTRFS subvol schemes:
you need to know your subvol names and their associated mount points inside the system path. You can find the info in systems /etc/fstab and the subvolumes can be listed after mounting the RFS (Root File System) on
sudo mount /dev/sdnX /mnt (where /dev/sdnX needs to fit your installed system device)
sudo btrfs subvolume list -p /
In case you have p.e. subvols for / (root) , /home, /var/cache, and /var/log on UEFI systems you will have the ESP (fat32) partition in addition. Make sure to mount the volumes in the right directories under /mnt… and do not forget to first unmount your partition after checking subvol list:
sudo umount /mnt
sudo mount -o subvol=@ /dev/sdXn /mnt
sudo mount -o subvol=@log /dev/sdXn /mnt/var/log e.t.c.
On encrypted systems:
In this case /dev/sda1 is the encrypted root partition you need to unlock:
sudo cryptsetup open /dev/sda1 mycryptdevice
It will ask for your luks passphrase and unlocks the device into
This path can be used to mount the device.
The first thing we’re going to do is to mount the root partition by entering the following:
mount /dev/sdXn /mnt
The place that says Xn should be replaced by the letter and the number corresponding your situation.
The next step is to mount the boot partition, in some setups there isn’t a separate boot partition, if that is the case you can skip this step.
mount /dev/sdXn /mnt/boot
Then type the following:
To make sure arch-chroot is working check after your users home folder
ls /home that should give your username from the installed system.