Skip to content

Instantly share code, notes, and snippets.

@leoheck
Last active October 21, 2018 18:13
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 leoheck/dabf3f757b32ec2c2e3a45cd2f6dda1e to your computer and use it in GitHub Desktop.
Save leoheck/dabf3f757b32ec2c2e3a45cd2f6dda1e to your computer and use it in GitHub Desktop.
Chroot from Live USB
efi_partition=/dev/nvm0n1p1
root_partition=/dev/nvm0n1p2
sudo mount ${root_partition} /mnt
sudo mount ${efi_partition} /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /usr/ /mnt/usr
sudo ln -s /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment