CachyOS chroot Helper
cachy-chroot is a simple helper program to ease the process of chrooting into an existing
CachyOS or Arch-based install. It lists all the partitions discovered on the machine and also supports listing BTRFS subvolumes.
Last but not least, cachy-chroot also supports encrypted systems via LUKS. It will map each fstab entries to its designated crypttab
entries and will gracefully close all LUKS volumes when exiting the chroot.
- Boot into a live ISO of CachyOS
- Open a terminal and enter the root user with
sudo su - Make sure you have the latest
cachy-chrootinstalled by running:Terminal window pacman -Sy cachy-chroot - Run
cachy-chrootby typing:Terminal window cachy-chrootcachy-chrootwill scan and list all available partitions.Terminal window Info: Found 3 block devicesInfo: Found partition: Partition: /dev/nvme0n1p1: FS: vfat UUID: EDA6-ED98Info: Found partition: Partition: /dev/nvme0n1p2: FS: btrfs UUID: b09a027e-a61d-424f-858f-2e02be61b342Info: Found partition: Partition: /dev/nvme0n1p4: FS: btrfs UUID: 66e84339-8c77-4131-afce-50ec2cf67a80? Select the block device for the root partition (use arrow keys): ›Partition: /dev/nvme0n1p1: FS: vfat UUID: EDA6-ED98❯ Partition: /dev/nvme0n1p2: FS: btrfs UUID: b09a027e-a61d-424f-858f-2e02be61b342Terminal window Info: Found 8 block devicesInfo: Found partition: Partition: /dev/sda1: FS: ext4 UUID: b7fef200-fbb8-4783-9fad-46c5e8b7ca0eInfo: Found partition: Partition: /dev/sda2: FS: vfat UUID: CA0D-2D5AInfo: Found partition: Partition: /dev/sdb1: FS: ntfs UUID: A4763F77763F48F6Info: Found partition: Partition: /dev/sdc1: FS: ntfs UUID: C4CA216BCA215B46Info: Found partition: Partition: /dev/sdc2: FS: ntfs UUID: 060C28590C284651Info: Found partition: Partition: /dev/sdc3: FS: ntfs UUID: 3A3CF8B13CF86971Info: Found partition: Partition: /dev/sdd1: FS: exfat UUID: 4FDC-0AABInfo: Found partition: Partition: /dev/sdd2: FS: vfat UUID: 3105-B091? Select the block device for the root partition (use arrow keys): ›❯ Partition: /dev/sda1: FS: ext4 UUID: b7fef200-fbb8-4783-9fad-46c5e8b7ca0ePartition: /dev/sda2: FS: vfat UUID: CA0D-2D5APartition: /dev/sdb1: FS: ntfs UUID: A4763F77763F48F6Partition: /dev/sdc1: FS: ntfs UUID: C4CA216BCA215B46Partition: /dev/sdc2: FS: ntfs UUID: 060C28590C284651Partition: /dev/sdc3: FS: ntfs UUID: 3A3CF8B13CF86971Partition: /dev/sdd1: FS: exfat UUID: 4FDC-0AABPartition: /dev/sdd2: FS: vfat UUID: 3105-B091In this example, the root partition is
/dev/sda1withext4filesystem. The other partitions are not relevant for the chroot. - Select the partition that contains the root filesystem:
Selecting root partition ✔ Select the block device for the root partition (use arrow keys): · Partition: /dev/nvme0n1p2: FS: btrfs UUID: b09a027e-a61d-424f-858f-2e02be61b342Info: Selected BTRFS partition, mounting and listing subvolumes...Info: Mounting partition /dev/nvme0n1p2 at /tmp/cachyos-chroot-temp-mount-b09a027e-a61d-424f-858f-2e02be61b342-hwAeIm with options: []Info: Unmounting partition at /tmp/cachyos-chroot-temp-mount-b09a027e-a61d-424f-858f-2e02be61b342-hwAeIm? Do you want to use CachyOS BTRFS preset to auto mount root subvolume? (y/n) › # Enter yes if on CachyOSIf using CachyOS with BTRFS, enter
yto use the CachyOS BTRFS preset. This will automatically mount the root subvolume and other important subvolumes such as/home,/var,/tmpand/srv. If you’re using a custom BTRFS layout or non-CachyOS system, enternto manually select subvolumes.Selecting root partition ✔ Select the block device for the root partition (use arrow keys): · Partition: /dev/sda1: FS: ext4 UUID: b7fef200-fbb8-4783-9fad-46c5e8b7ca0eInfo: Mounting partition /dev/sda1 at /tmp/cachyos-chroot-root-mount-b7fef200-fbb8-4783-9fad-46c5e8b7ca0e-LtsXXC with options: []Info: Mounting additional partitions based on /etc/fstab...Info: Found 3 entries in /etc/fstabWarning: Partition UUID=b7fef200-fbb8-4783-9fad-46c5e8b7ca0e already mounted, skipping...Info: Mounting partition /dev/sda2 at /tmp/cachyos-chroot-root-mount-b7fef200-fbb8-4783-9fad-46c5e8b7ca0e-LtsXXC/boot with options: []Info: Finished mounting additional partitions✔ Do you want to mount additional partitions? · noInfo: Chrooting into the configured root partition...Info: To exit the chroot, type 'exit' or press Ctrl+D cachy-chrootwill attempt to automatically mount all the partitions and subvolumes listed under/etc/fstabof the root device. If any partitions fail to mount, you will be notified and given the option to mount them manually if needed. You can choosenoto skip mounting additional partitions.- You are now in the chroot environment.
You can now run commands as if you were booted into the installed system. For example, you can update the system with:
Terminal window [root@CachyOS /]#or perform other maintenance tasks as needed.Updating system in chroot pacman -Syu - When finished, exit the chroot environment by passing
exitto the prompt or pressingCTRL+Don the keyboard.Exiting chroot exit - After exiting,
cachy-chrootwill automatically clean up mounted partitions and close any LUKS containers. You’ll return to the live environment shell.
Troubleshooting
Section titled “Troubleshooting”- No partitions found: Ensure that the disk containing your installation is connected and recognized by the live system. You can check with
lsblkorfdisk -l. - Automount fails for some partitions: You can try mounting them manually from within the chroot environment.
cachy-chrootwill ignore failures and continue.
- Q: What is the use for mounting additional partitions?
- A: There are several use cases for manually mounting additional partitions, including:
- Broken or missing fstab file: You can manually mount necessary partitions (such as
/bootor/home) to perform repairs or data recovery. - Updated partition UUIDs: If your system is not booting because you changed the UUID of a prtition, you can use
cachy-chrootto mount the partitions and then update the fstab accordingly.
- Broken or missing fstab file: You can manually mount necessary partitions (such as
- A: There are several use cases for manually mounting additional partitions, including: