How to chroot into encrypted Arch Linux instance
Piotr Pliszko
Anyone who manually installed Arch Linux for sure knows chroot
- it's an operation that changes the apparent root directory for the current running process and their children. To do so, we can use the arch-chroot
command:
arch-chroot /path/to/new/root
It can be tricky if we are trying to chroot
into an encrypted environment. Fortunately, there is an easy way to do this. To open encrypted device use cryptsetup luksOpen
. For example:
cryptsetup luksOpen /dev/sdX2 sdX2
Then, just mount the opened device, and chroot into it using arch-chroot
as usual.