1. Home
  2. Docs
  3. System rescue
  4. Rescue non-booting system with Arch-chroot.

Rescue non-booting system with Arch-chroot.

by joekamprad

chroot stands for “change root” and is a feature on Unix systems to change the root directory. It only affects the current process and its child processes.
“Chroot” itself can refer both to the system call chroot and to the utility chroot.

On Archlinux they have arch-chroot:



The bash script arch-chroot is part of the arch-install-scripts package.

Before it runs /usr/bin/chroot, the script mounts api filesystems like /proc and makes /etc/resolv.conf available from the chroot.



If your EndeavourOS installation does not boot at all, caused by an issue with an update or some not working tinkering,
it is easy to get into your installed system by using arch-chroot from a live-ISO session:

Boot up with our LiveIso. mount System to /mnt You need to know which device is the right one check with:

 sudo fdisk -l
 

 sudo su

/dev/sdXn should be replaced with the right device information, and depending on your installation you may have or have not a seperate /boot partition.

If not /boot is a folder under / on the same partition as the filesystem root.

mount /dev/sdXn /mnt

( your “/” root partition)

mount /dev/sdXn /mnt/boot

(your /boot partition –> without extra /boot partition you do not need this step! )

mount /dev/sdXn /mnt/boot/efi

(your EFI-boot (fat32) partition {from dualboot windows maybe})

arch-chroot /mnt

More details about arch-chroot on the Arch wiki:

Using arch-chroot@archwiki

Now you are inside a root command line from your installed EndeavourOS, and you can start fulfilling a failing update, edit configs, reinstall/uninstall packages, rebuild grub files or kernel images e.t.c.

Was this article helpful to you? Yes 1 No

How can we help?