Created
April 9, 2017 07:37
-
-
Save nnfuzzy/6315c250c84f43f7c78ca0fb58d7d837 to your computer and use it in GitHub Desktop.
Get chroot access with a ubuntu livecd in an encrypted volume + internet (resolv.conf)!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Get chroot access with a ubuntu livecd in an encrypted volume + internet (resolv.conf)! | |
sudo modprobe dm-crypt | |
sudo fdisk -l | |
sudo cryptsetup luksOpen /dev/sda3 myvol | |
sudo vgscan | |
sudo vgchange -ay ubuntu-mate-vg | |
sudo lvs | |
sudo mount /dev/ubuntu-mate-vg/root /mnt/ | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo mount --bind /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