Skip to content

Instantly share code, notes, and snippets.

@bor8
Forked from uglide/chroot.sh
Last active January 3, 2019 10:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bor8/b6629225a09f47cd193cfe3b45bd88d5 to your computer and use it in GitHub Desktop.
Chroot to Installed system on LVM
#!/bin/bash
fdisk -lu
pvscan
vgscan
vgchange -a y
lvscan
mount /dev/template99-vg/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev/pts /mnt/dev/pts
mount --bind /run /mnt/run
mount /dev/sda1 /mnt/boot
# mkdir /mnt/boot/efi || true
# mount /dev/sda1 /mnt/boot/efi
chroot /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment