LUKS Hard Drive Encryption on Linux Mint Ubuntu Debian etc how to mount encrypted hard drive

The key thing here is to know the actual partition that is encrypted.

Often in Linux Mint's installer that ends up being partition 5 or /dev/sda5

sudo cryptsetup luksOpen /dev/sda5 anynamehere

You will then be prompted for your irrecoverable passphrase:

Enter passphrase for /dev/sda5:

If all goes well it won't say anything further.  If it says ""No key available with this passphrase." it means you have entered the wrong password.

How to mount

The above command will create a device based on the third argument that you passed to cryptsetup (anynamehere) in the above example.

So you would see i/dev/mapper/anynamehere

From there just go ahead and mount it (assuming it is not using LVM-read on if you are).

mount /dev/mapper/anynamehere /mnt/crypteddisk

Chroot

To make it more practical perhaps you are trying to modify or fix your OS.

From here if we were using many OS's we would then do an "lvscan".  It will then show us the LVM volumes and you can then mount the vg-root to /mnt

You can then do something like this:

mount /dev/vgname/vg-root /mnt

#use the bash script to mount /dev /proc and /sys to your /mnt (chroot) root dir so stuff works when you chroot

for mount in dev proc sys; do
  mount -o bind /$mount /mnt/$mount
done

#now let's chroot in!

chroot /mnt


Tags:

luks, encryption, linux, mint, ubuntu, debian, etc, mount, encrypted, drivethe, partition, installer, dev, sda, sudo, cryptsetup, luksopen, anynamehere, prompted, irrecoverable, passphrase, quot, password, mapper, lvm, mnt, crypteddisk, chroot, modify, os, lvscan, volumes, vg, vgname, bash, proc, sys, dir, bind,

Latest Articles

  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist