Skip to content

Instantly share code, notes, and snippets.

@wget
Created June 8, 2018 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wget/4c5dc931bf658ec409282b0bb8cb2c4f to your computer and use it in GitHub Desktop.
Save wget/4c5dc931bf658ec409282b0bb8cb2c4f to your computer and use it in GitHub Desktop.
# Chroot to the system. But since the location of binutils are not in the same directories (Arch's default PATH only has "/usr/local/sbin", "/usr/local/bin", and "/usr/bin", whereas debian uses these directories as well as "/bin", "/sbin" and "/usr/sbin"), you should source the profile after chrooting otherwise, even simplest tools like `ls` won't be available directly other than specifying their whole path.
mount -t proc none /mnt/install/proc
mount -o bind /dev /mnt/install/dev
chroot /mnt/install /bin/bash
source /etc/profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment