LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Encrypted Drive Inaccessible on Fresh Install (https://www.linuxquestions.org/questions/linux-newbie-8/encrypted-drive-inaccessible-on-fresh-install-4175724140/)

ArticCat 04-16-2023 03:37 PM

Encrypted Drive Inaccessible on Fresh Install
 
Hello all,

I was previously running proxmox with a variety of linux distros, but ultimately preferred using docker containers for my purposes. This setup consisted of a 250 gb ssd and 8 tb HDD, with all storage on HDD and all OS materials on SSD. Today, I wiped my proxmox system and put a fresh install of Debian Bullseye on a machine with the SSD being the freshly formatted drive. However, since that time, I have not been able to access files in my HDD. It does appear the files are still on there, (shows about 1.5 TB is missing) but they are nowhere to be found in the explorer.

Of note, I had this HDD encrypted--whole drive--(I still remember the password) but have not been able to access a window where I can enter the encryption password as before. However, it does appear that I can mount the drive. I have spent all day troubleshooting this but have ultimately not made any progress whatsoever.,

somethings that Maybe?? would be helpful.

lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 231.9G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 976M 0 part [SWAP]
sdb 8:16 0 7.3T 0 disk
└─sdb1 8:17 0 7.3T 0 part /media/8TB

root@Unknown:~# file -s /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=d0caa860-ca46-46c3-8b54-206aeeafb836, volume name "8TB" (needs journal recovery) (extents) (64bit) (large files) (huge files)

root@Unknown:~# sudo fsck -f /dev/sdb1
fsck from util-linux 2.36.1
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
8TB: 28/244191232 files (7.1% non-contiguous), 327014974/1953506304 blocks
root@Unknown:~#

I honestly tried a bunch of other things from my online searches but nothing seemed to have much effect.

Appreciate everyone's time

jamison20000e 04-16-2023 05:31 PM

I haven't played with encryption much but searching for something like how to access encrypted storage in Linux is quite the rabbit hole... good luck.

It may help others who know more if you can remember how you set up the encryption, did the distro\s* :scratch: do it for you?

syg00 04-16-2023 06:02 PM

If you can run fsck on /dev/sdb1 it implies (to me) either:
- you have opened the encrypted container
- you have reformatted it.

The former would require you to enter the password, the later would have likely destroyed the header and would make the encrypted data unreachable even if it hadn't been actually over-written in the re-format process.
There is one on LQ who might bw able to advise on rebuilding the header, but without a backup I suspect your data are lost.

ArticCat 04-16-2023 06:09 PM

That is what I was beginning to fear after about 4 hours of tinkering. Oh well, I think it was better to learn this lesson now rather than later. I didn't have anything that can't be recovered on that drive yet. I just thought the idea encryption sounded neat, I think i'll avoid it in the future unless it's actually useful. Lesson learned. Thanks y'all

jamison20000e 04-16-2023 07:31 PM

I know there are different kinds of encrypting your data, some like hardware encryption won't slow you as here: https://www.linuxquestions.org/quest...nt-4175724112/
aside from maybe putting in the password but would think once you do your data is available? If no one has access to your keyboard* and your password* maybe a VPN? Tho I'm sure someone who really "needs" it uses both*.
https://www.crucial.com/articles/abo...-data-security


All times are GMT -5. The time now is 08:46 PM.