[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LUKS encryption help



On 8/25/21 6:37 PM, detrito@tuta.io wrote:
Good evening,

I'm having some worrying problems with LUKS my Debian 10 installation on an external hard drive. As I'm not very technical, I'll try to explain what I did and what is happening now in chronological order.

Around May I installed Debian 10 on my (external) hard drive in BIOS (not UEFI) mode for backup purposes. In the end of June I took the drive out of the drawer and tried to boot into it but to my surprise my LUKS encryption password does not work anymore.
I'm very sure I am typing it right because I had written it into a piece of paper. I have tried to unlock and mount it inside my OS (Manjaro) instead of booting it directly but it also didn't work, and I have also tried to boot in Recovery Mode but to no avail. Every time I type in my password it says it's wrong ("Bad password or options" or someting like that).

Please help. I have many important documents and pictures inside that drive.
Sorry for my badEnglish.


Please tell us:

1.  What is the make and model of the external hard drive?

2. What ISO image did you use to install Debian onto the external hard drive? What media did you put the Debian installer onto? Do you still have the Debian installer media?

3.  When did you install Debian?  What choices did you make?

4. What is the make, model, and CPU of the computer you used to install Debian?

5. What is the make, model, and CPU of the computer you are now using to boot Debian?

6. Have you updated/ upgraded Debian since installing it? Did you reboot every time and verify it still worked?


It would be wise to run diagnostic tests on the external hard drive. HDD manufacturers used to offer bootable CD and/or USB tool kits for their products, but I have not had much luck with these the past few years. The FOSS alternative is a working Linux or FreeBSD installation or live disk, and smartctl:

    https://linux.die.net/man/8/smartctl


I have a half dozen x86_64 (e.g. "amd64") computers that use 2.5" SATA drives. I have more than a dozen 2.5" SATA SSD's with various operating system images. I like to mix and match. I keep my boot, swap, and root partitions small (less than "16 GB" total for Debian) and put my bulk data on HDD's in RAID on a file server. I take raw binary images of the OS devices periodically and whenever I make significant changes (prior to major upgrade, after fresh install, etc.).


About a year ago, I upgraded the kernel on a Debian 9 image and LUKS refused to accept the correct passphrase at boot when the SSD was installed in one particular machine (the same SSD worked correctly in other machines). My conclusion was that there was a bug in the upgraded kernel that interacted badly with the chipset in that computer. The short-term work-around was to boot the earlier kernel. The long-term solution was to re-image the SSD from the last backup image and wait for the next kernel upgrade. It took ~6 months and a few more kernel upgrades before the bug was fixed. I re-imaged several times. (Hint: you want to get good at backup/ restore, archiving, and imaging).


Does the boot screen offer multiple kernel choices? Have you tried them all?


If none of the kernel choices work, try booting the Debian installer media, navigate into a recovery console, opening the LUKS container(s), mounting the filesystem(s), and backing up the data.


David


Reply to: