Report this

What is the reason for this report?

No boot on encrypted drive 16.04 - help pls?

Posted on April 1, 2020

I can’t boot to my 16.04 My drive is encrypted, see details here: http://paste.ubuntu.com/p/MGMMQMzZcH/

Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 999423 997376 487M 83 Linux

/dev/sda2 1001470 1000214527 999213058 476.5G 5 Extended

/dev/sda5 1001472 1000214527 999213056 476.5G 83 Linux I have two questions:

I am desperate to fix it, but not sure how exactly to do so?

How to access data on /dev/sda5?

Thanks in advance!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

To fix your issue and access the data on /dev/sda5, you can follow these steps:

  1. Boot your system using a live CD or a recovery environment.
  2. Check which encrypted partitions are available with the command: sudo cryptsetup luksDump /dev/sda5
  3. Open the encrypted partition with the command: sudo cryptsetup luksOpen /dev/sda5 crypt_sda5. You’ll be prompted to enter your passphrase.
  4. After unlocking the partition, you will now have a new device mapper entry at /dev/mapper/crypt_sda5. Mount this using: sudo mount /dev/mapper/crypt_sda5 /mnt
  5. Now, your encrypted data should be accessible at /mnt

For more detailed instructions, please follow this DigitalOcean tutorial on using dm-crypt to create an encrypted volume in Ubuntu. Reach out if you need further assistance!

Hope that this helps!

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

Here’s what you can do to resolve this:

  1. Boot your server using an Ubuntu Recovery ISO or a Live CD.
  2. Once booted, install the required packages for handling encrypted LVM partitions by running: sudo apt-get update && sudo apt-get install cryptsetup lvm2
  3. Use the following command to decrypt the LVM partition where ‘passphrase’ is your LUKS passphrase: sudo cryptsetup luksOpen /dev/sda5 cryptdisk --key-file <(echo -n "passphrase")
  4. Activate the LVM by running: sudo vgchange -ay
  5. Now, you should be able to access your encrypted data on the filesystem. You can mount the required partitions and access the data, and make any required fixes.

For more information on encrypted disks in Ubuntu, you can refer to this guide: https://help.ubuntu.com/community/EncryptedFilesystemsViaUbiquity

Please let me know if you need more help!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.