Forked from agilepoodle/mount-encrypted-partition-fedora-live-usb.sh
Created
January 15, 2023 16:32
-
-
Save manics/a62311ccd03ce40bea5baf3e5d9eb76f to your computer and use it in GitHub Desktop.
When you need to access LUKS encrypted partition with a Fedora Live CD or USB
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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment