Page 1 of 1

Can't reach my system on the encrypted disk

Posted: Mon May 15, 2023 10:01 am
by JanK
Hello!

I can't reach my MX OS on the encrypted disk. Or even files on it through live-CD.

I don't know if it is connected, but previously i had a problem with proprietary Nvidia driver as described here ->>, so i had to switch to an open-source driver.

Some time after that i had begun to experience problems with different browsers from Chrome to Firefox. They freezed and force quit didn't help, sometimes whole the system got stuck and i had to press restart button.

I was going to reinstall the system in the nearest future, but today i can't even login.

After the browser freeze, system got completely freeze too. I had to manually restart the computer. And i cant go further the encrypted disk login screen.

After the GRUB options, when i choose MX, i see the blue encrypted disk login screen. Which is fine. But after i enter the passcode (it is correct, i checked) i see only the slow growing progress bar, i wait minutes and minutes and then it stuck on the 100%.

If i press arrows or insert i see the "recovery journal" message (see the attached picture).

I have tried to access the encrypted disk through LIVE-CD, but i got the following error:

Code: Select all

"An error occurred while accessing '82.0 GiB Encrypted Drive', the system responded: The requested operation has failed: Error mounting /dev/dm-0 at /media/demo/homeMX: can't read superblock on /dev/mapper/luks-aec966e2-775e-4b9d-8c0a-ac2d51a2a149 "
I hope i will somehow at least get access to the files on encrypted disk...

I have an MX KDE21 with systemD and... gnome.

Can't give you full system info, as i can't work in Linux now.

It is rather basic build with Intel i5 and Nvidia 1050. Dual-boot with Windows.

1)SSD - Windows partition

2) SSD - Linux partition (/home encrypted) + small NTFS disk

3) HDD for storage

Image Image Image

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 6:07 am
by JanK
Anyone have ideas?

I guess the problem is with the encrypted disk itself... Is there a chance to get access to the data on it?

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 7:08 am
by j2mcgreg
@Jan K. wrote:
Can't give you full system info, as i can't work in Linux now.
Boot into a live session and run the QSI from there.

You have stated that you can't access your encrypted disk, but you haven't said why. Forgotten password? Hardware failure? Something else?

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 8:16 am
by Adrian
"recovery journal" -- that usually show when there was un forced shutdown (or some other problem). Does it get stuck there?
You could also boot to the Live environment on a USB flashdrive, mount the drive from there and recover your stuff and run chkdsk on the partition to see if it finds any errors, you could even chroot and run commands inside your installed system running the Live environment. Depending what the problem is it might be better to save your stuff and reinstall (check disk for problems before doing that)

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 8:44 am
by JanK
j2mcgreg wrote: Wed May 17, 2023 7:08 am You have stated that you can't access your encrypted disk, but you haven't said why. Forgotten password? Hardware failure? Something else?
Hi, thank you for your reply. Because i don't know why. At first i thought that maybe the problem is with something else, maybe even with a video driver. But i think, as far as i can't access it via LIVE-CD, this is a problem with the disk itself/encryption. Probably i didn't make it clear: my whole home folder is encrypted, so i can't even login (see the pictures above).

Now i tried to login and saw the following:

Image
When i tried to access the disk through the LIVE-CD i got an error again, as described above:

Image


The problem is not with the password, i remember it, and i guess if it was the problem errors would be other. I don't think that it is a hardware failure, because other drives on this SSD work fine.

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 8:48 am
by JanK
Adrian wrote: Wed May 17, 2023 8:16 am "recovery journal" -- that usually show when there was un forced shutdown (or some other problem). Does it get stuck there?
Yes, there was forced shutdown. Yeah, it stuck.
You could also boot to the Live environment on a USB flashdrive, mount the drive from there
I tried. It gives me an error:

Code: Select all

"An error occurred while accessing '82.0 GiB Encrypted Drive', the system responded: The requested operation has failed: Error mounting /dev/dm-0 at /media/demo/homeMX: can't read superblock on /dev/mapper/luks-aec966e2-775e-4b9d-8c0a-ac2d51a2a149 "

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 8:50 am
by Adrian
You can try to recover the superblock... but not sure how likely is that:
https://www.linuxbabe.com/desktop-linux ... lock-error

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 9:07 am
by JanK
Adrian wrote: Wed May 17, 2023 8:50 am You can try to recover the superblock... but not sure how likely is that:
https://www.linuxbabe.com/desktop-linux ... lock-error
Oh... Didn't know that hard reset can be so dangerous ( I will try, thank you.

So, the problem is NOT with encryption?

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 9:16 am
by Adrian
It's probably a problem with the file system, but if you have a problem with the file system encryption doesn't makes thing easier...

Re: Can't reach my system on the encrypted disk

Posted: Wed May 17, 2023 9:18 am
by j2mcgreg
@Jan K. wrote:
So, the problem is NOT with encryption?
It still could be. Your system has a few possible points of failure and we have try to narrow things down to the specific one. @Adrian's suggestion above should be the first step.

Re: Can't reach my system on the encrypted disk

Posted: Thu May 18, 2023 10:37 am
by JanK
@j2mcgreg @Adrian

OK. I am trying to do what is adviced.

Code: Select all

$ sudo parted -l
output

Code: Select all

Model: CT500P1SSD8 (nvme)
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

			Number  Start   End     Size    File system     Name                          Flags
 			1      17.4kB  16.8MB  16.8MB                  Microsoft reserved partition  msftres
 			7      16.8MB  2244MB  2227MB  ext4                                          legacy_boot
 			6      2244MB  8837MB  6593MB  linux-swap(v1)
 (THIS ONE)               4      8837MB  71.8GB  62.9GB  ext4     (THIS ONE - IT IS /HOME ENCRYPTED)
 			3      71.8GB  160GB   88.1GB
 			5      160GB   500GB   340GB   ntfs                                          msftdata
 			2      500GB   500GB   537MB   fat32                                         boot, esp
and then

Code: Select all

$ sudo mke2fs -n /dev/nvme0n1
output

Code: Select all

mke2fs 1.46.2 (28-Feb-2021)
Found a gpt partition table in /dev/nvme0n1
Proceed anyway? (y,N) y
/dev/nvme0n1 is apparently in use by the system; will not make a filesystem here!
I have made a full shutdown before and it is not mounted, so i don't understand how it can be "in use".

I tried to give the specific name of the partition, not the whole disk, but i don't know how to do it correctly with nvme, i gave it a number of partition in the end, but it is wrong.

Code: Select all

demo@mx1:~
$ sudo mke2fs -n /dev/nvme0n14
mke2fs 1.46.2 (28-Feb-2021)
The file /dev/nvme0n14 does not exist and no size was specified.
So, now i have to somehow make the system believe the disk is not in use. And i don't know if i should make mke2fs command for the whole disk or just for the partition. And i don't know how to give it the exact name.

UPD.

OK, it is /dev/nvme0n1p3

Also, i have found mdadm command for "stopping" the disk, but i am not quite sure yet how to use it here.

UPD2

$ sudo mke2fs -n /dev/nvme0n1p3
mke2fs 1.46.2 (28-Feb-2021)
/dev/nvme0n1p3 contains a crypto_LUKS file system
Proceed anyway? (y,N) y
Creating filesystem with 21504000 4k blocks and 5382144 inodes
Filesystem UUID: 1f12a752-da46-4906-8751-78e9fc6bfc48
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000

Re: Can't reach my system on the encrypted disk

Posted: Thu May 25, 2023 9:03 am
by JanK
@j2mcgreg @Adrian

Sorry for the late reply. I have managed to complete the e2fsck command. And it gives me this error.

Code: Select all

demo@mx1:~
$ sudo e2fsck -b 20480000 /dev/nvme0n1p3
e2fsck 1.46.2 (28-Feb-2021)
e2fsck: Invalid argument while trying to open /dev/nvme0n1p3

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>
And i tried different backup numbers...

All is lost or something else can be done?

UPD. Looks like when i try to run testdisk util the computer freezes even in LIVE-USB! Dual-boot Win10 works fine.