reallymine icon indicating copy to clipboard operation
reallymine copied to clipboard

error running decrypt: open /dev/sdc: permission denied

Open Chromatamata opened this issue 4 years ago • 13 comments
trafficstars

Hi, I just closed a recent problem after solving it myself but I immediately have a new one. Whenever I try to decrypt my disk I get the following error message:

error running decrypt: open /dev/sdc: permission denied

I am working on a clone of the encrypted data made with ddrescue. /dev/sdc was the path to the encrypted clone at the time when the command is run.

Any help greatly appreciated.

Chromatamata avatar May 12 '21 16:05 Chromatamata

Put "sudo " at the beginning of the command. sudo ./reallymine ...

themaddoctor avatar May 12 '21 16:05 themaddoctor

I have already tried that. It didn't help. I will try again...

Chromatamata avatar May 12 '21 16:05 Chromatamata

Ok, it MIGHT be working. The drive lights are flashing. How do I know? Is there any feedback in the terminal window?

Chromatamata avatar May 12 '21 16:05 Chromatamata

You can open another terminal window and do "ls -l" at the image file that is being created.

themaddoctor avatar May 12 '21 19:05 themaddoctor

Ok. It's been running for about 12 hrs now and I'm worried. The drive lights are both still flashing like something is happening. The image file is there but Ubuntu says that there are 0 bytes in it...

Chromatamata avatar May 13 '21 05:05 Chromatamata

I dunno.

Can you tell us your DEK? Show us your keyblock? What chip did your disk use?

themaddoctor avatar May 13 '21 12:05 themaddoctor

My disk has the JMicron JMS538S chip. I can send you the DEK again (please find attached below) but I have already sent it to you via your own github site for your tools program that mounts encrypted drives on the fly. (Thankyou for your help, BTW :-).) Unfortunately, I could not get your own tool to mount my disk, even using the loop method. I suspect there is some corruption to the file system in some way which I figured I could repair with normal tools if I decrypted all the data first using the reallymine tool. ddrescue reveals there is a tiny amount (approximately 5MB) of unreadable data on the original disk.

I have discovered that my recent attempt to use reallymine was actually not working. I think this was because I cloned my 3TB drive to a 4TB drive and forgot to set the -disk-size parameter. I have done this now and set rellymine in progress again. The image file now appears to be growing in size which is very encouraging... the only problem I have now is that it appears to be running VERY slowly.

I have done some quick calculations and at the present rate it will take just over 16 DAYS! Is that normal for a 3TB drive? I hope we don't have a power outage!!

Napier's Hex Dumps.tar.gz

Chromatamata avatar May 15 '21 08:05 Chromatamata

New calculations suggest 128 DAYS!!!! :-/

Chromatamata avatar May 15 '21 09:05 Chromatamata

Sorry, I've realised that the previous attachment was not what you asked for. You asked for the DEK. I have attached it here. I have not yet sent you that. My mistake. Sorry. This was extracted with your own tools, not with reallymine.

Napier's DEK.tar.gz

Chromatamata avatar May 15 '21 09:05 Chromatamata

Ok. I think I have found the reason for the crazy slow speed myself in the Issues section here. I am using NTFS. I will amend that to a linux format and see if that helps. Fingers crossed. :-)

Chromatamata avatar May 15 '21 09:05 Chromatamata

Oh, I didn't know you were Napier.

For less overhead, maybe use ext2 and not ext3 or 4 as your linux file system.

Good luck. Let us know how it turns out.

themaddoctor avatar May 15 '21 12:05 themaddoctor

Another option is to use the filter you set up with rev16 and cryptsetup: ddrescue /dev/mapper/wd /dev/newdiskname

I'm not sure it's ddrescue or dd_rescue, but you should check and read its documentation so that you can be very careful not to accidentally write to the WD disk.

themaddoctor avatar May 15 '21 12:05 themaddoctor

Sorry. Yes, this is Napier.

I have converted the partition to ext4. I did this before reading your post. The improvement in speed is significant. My current calculations predict it will take about 4 and 1/2 days, which is a LOT better. While that still isn't great, at least that feels like a feasible time frame. Unfortunately, I have an older computer from about 8 years ago, which might not be as fast as some more modern ones so, that might be why it is still quite slow. Although, I did wonder if ext2 or ext3 might have been faster as ext4 doesn't always play nicely (so I have learnt) with my computer for some reason that I don't understand. (I don't want to stop the transfer to check though at this point). I might try those file systems if for some reason the data transfer fails or gets interrupted on the ext4 partition.

Thanks so much for this extra suggestion. I'm such a linux nube that I wasn't aware of the second program although, I had seen people writing ddrescue with an underscore and I wondered why. I used ddrescue to make my clone to work on. I didn't get that they were separate programs until now.

I have just looked at the documentation for dd_rescue and I think it might be that one that can do it, as it uses pipes and other fancy things that ddrescue can't. I'm not 100% sure but from what I have read, there might also be yet another way to decrypt the drive using dd_rescue's own plugins if you have the DEK and the understanding of the process. NOT sure... but it might also be another option for me again.

Thanks again, Thomas for your help. I will let you know how things go in about 4 or 5 days. :-)

Chromatamata avatar May 15 '21 17:05 Chromatamata