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 partition 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 (/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 arch-chroot, and to be able to do that you need to have root permissions, so type the following command:

sudo su

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 one where the system is installed.

The next step is to mount the boot partition into the already mounted filesystem, in most setups, there isn’t a separate boot partition, if that is the case you can skip this step.

mount /dev/sdXn /mnt/boot

Now we’re going to mount the ESP UEFI (FAT32) partition

mount /dev/sdXn /mnt/boot/efi

Then type the following:

arch-chroot /mnt

Now you’ve chrooted into your installed system, and you are able to access your files, installing packages, or alter scripts to rescue your system. To make sure arch-chroot is working check after your users home folder ls /home

Connect with us:

Arch-chroot for EFI/UEFI systems

  • by