Skip to content

Instantly share code, notes, and snippets.

@bperel
Created July 16, 2015 13:41
Show Gist options
  • Save bperel/8603b1e6637a1a6c6625 to your computer and use it in GitHub Desktop.
Save bperel/8603b1e6637a1a6c6625 to your computer and use it in GitHub Desktop.
chroot mount and unmount
mkdir server
mount /dev/sda2 server
mount /dev/sda1 server/boot
mount --bind /proc server/proc
mount --bind /sys server/sys
mount --bind /dev server/dev
mount --bind /lib server/lib/modules
umount server/proc
umount server/sys
umount server/dev
umount server/lib/modules
umount server/boot
umount server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment