Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save agilepoodle/f1a40c58395c7170e2525fe9fbbc0276 to your computer and use it in GitHub Desktop.
Save agilepoodle/f1a40c58395c7170e2525fe9fbbc0276 to your computer and use it in GitHub Desktop.
When you need to access LUKS encrypted partition with a Fedora Live CD or USB
# make sure crypt module in use
sudo modprobe dm-crypt
# Find out which drive it was with the following command:
sudo fdisk -l
# You must mount /dev/sda3 myvolume
# use cryptsetup, device is accessible under /dev/mapper/myvolume
sudo cryptsetup luksOpen /dev/sde3 myvolume
# scan for LVM volumes and choose the right volume group name that you are looking for:
sudo vgscan
# If it is eg. Fedora, activate it
sudo vgchange -ay system
# find out root volume
sudo lvs
# mount it with the following command:
sudo mount /dev/system/root /mnt/
# to work in the volume use the following commands
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 chroot /mnt
# consider mounting /boot also
@alvarlagerlof
Copy link

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment