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

  • Linux Mint Mate Customize the Lock screen messages and hide username and real name
  • Ubuntu/Gnome/Mint/Centos How To Take a partial screenshot
  • ssh how to verify your host key / avoid MIM attacks
  • Cisco IP Phone CP-8845 8800/8900 Series How To Reset To Factory Settings Instructions
  • ls how to list ONLY directories
  • How to encrypt your SSH private key file id_rsa
  • Linux Mint 18 Disable User Name List from showing on Login Screen
  • Firefox Cannot Hit Enter Key In Address Bar and Location History Not Working
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions
  • tftp Linux xinetd verbose logging
  • Linux delete unused tap devices automatically