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

  • Bad Power Supply Issue Story Diagnosing Troubleshooting
  • Getting started with AI (Artificial Intelligence) in Linux / Ubuntu using by deploying LLM (Language Learing Models) using Ollama LLMA
  • microk8s kubernetes how to install OpenEBS
  • Flash LSI MegaRAID 2208 to IT mode in Linux Mint/Debian/Ubuntu
  • LSI MegaRAID in Linux Ubuntu / Centos Tutorial Setup Guide megacli
  • Convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/413. convert-im6.q16: no images defined `pts-time.jpg' @ error/convert.c/ConvertImageCommand/3258. solution ImageMagick P
  • Apache PHP sending expires header solution cannot use cache with CDN
  • How to install virt-manager in Mint 22/Ubuntu 22
  • Infiniband Guide
  • python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version
  • 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