Unable to access hard drive

Yes, I can see it in Nautilis.

Excellent. Do you know how to determine its drive letter (path name, usually sda, sdb, etc.)?

If not you can use sudo fdisk -l to see it.

Then you can use the path with chown. Now, I’m fairly certain this is a bad idea, but if you are just trying to salvage data and then format the drive, I don’t see the harm in it.

So for example if your hard drive was being mounted at /dev/sdb1 you would type

sudo chown USERNAME dev/sdb1/

This would grant the user specific right to the drive. Now because I’m ignorant, you might not be able to grant ownership rights to the entire root of that drive. if this is the case, you’ll need to chown specific folders on the drive instead.

Either way, you should be able to access files in Nautilis after that.

I would then use something like gParted to format and repartition the drive to be used in your current install.

1 Like

I’m still screwing something up.

Chown is giving me this
“chown: cannot access ‘dev/sdb2/’: No such file or directory.”
sdb2 is how that HD comes up in Nautilis and when I did fdisk -l

See below.

I’ve only used chown in very limited cases, and have usually been in the parent folder of the folder in question. So I never used a preceding forward slash. :slight_smile:

You need / before dev.

You could use udisksctl unlock {–object-path OBJECT | --block-device DEVICE} [–no-user-interaction]
[–key-file PATH]
and it should ask for your passphrase

example (might double check man page that my syntax is right):
udisksctl unlock -b /dev/sdb2
enter passphrase
should say something like Unlocked /dev/sdb2 as /dev/something
udisksctl mount -b /dev/something

1 Like

I suspect you will need to unlock the disk before you can mount it even in a chroot given that the error had as part of it’s message “Error unlocking /dev/sdb2”

Using udisksctl as @supermammal indicated is a good idea, perhaps start this way;

udisksctl info -b /dev/sdb2

unlock doesn’t seem to be working.

“udisksctl unlock -b /dev/sdb2” gives me

“Error unlocking /dev/sdb2: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error unlocking /dev/sdb2: Failed to activate device: Operation not permitted”

@jeremiah info gave me a wall of text I largely don’t understand

1 Like

Is the disk you’re trying to get into encrypted? Did you choose to encrypt in the original PureOS install on it?

1 Like

Yes to both of your questions.
I think this problem might be related to the problem I was having before.

I haven’t tried this before, but based on this thread:

You could try

sudo cryptsetup luksOpen /dev/sdb2 cryptdisk, which may allow you to decrypt the disk, and then from there, the suggestions above might work.

1 Like

That asks me for a passphrase, which keeps gettign rejected.

Are you 100% sure you’re typing your original decryption passphrase correctly? I can only assume that if you’ve tried carefully multiple times, then the decryption passphrase is not what you think it is (maybe you accidentally had a typo in it on the original setup), and then I don’t know what else can be done

1 Like

Should have asked if the drive was encrypted to begin with. Just assumed you would have mentioned that.

Definitely outside of my realm of expertise. Good luck!

I’m as confident as I am going to get that I am using the same passcode.

Did you have a file.key saved any where?

Hate to say it, but without the passcode you’re pretty much out of options

1 Like

I didn’t.
Thanks everyone for trying to help, but it’s looking like I am increasingly screwed.

@mcampanella

can you search for the “Disks” app ? in ubuntu 18.10 it is installed by default and allows you to see more details about your device … where it is / what it is / how it is mounted / how/if it is formated / formating options etc.

maybe try have a look around and see if you can’t install that somehow. it’s a gnome 3.30 app. it also allows to mount/unmount devices. eject power on/off. very good app for novices.

hi there! :slight_smile:

i hope its not too late, but what if ur input language differs now and when it was set up? :smiley: once i made a reinstall cuz of this very reason, then i realized the next time that my keyboard layout differs X’D

This happened to me as well! I use a mechanical keyboard which I hook up to my Librem 13. I turn on number lock to access the numeric keypad. When I remove the Librem 13 from the USB hub where my keyboard is, the number lock is still on, which means that my Librem 13 keyboard enters different characters at the prompt! You can turn off number lock on the Librem 13 with the ‘NumLk’ key on the top right hand side.

I had the same issue where i changed the luks passphrase using pureos disks app and somehow it didnt take properly. Because after boot it still seemed to unlock, but subsequent use of drive caused it to not unlock correctly (for me when the SDCard reader dropped off the bus occasionally).

Using the cryptsetup command and correct password (the one i didnt think it had correctly updated) unlocked my drive.

After that i went into disks and again chnaged the LUKS passphrase. See if it took it this time, otherwise my errors were identical to yours:

Maybe two keyfiles get created and it gets confused which one to take at times.
Intrestingly you cant mount a luks drive using normal mount commands you can only mount the disk using sudo cryptsetup luksOpen /dev/sdb1 cryptdisk command, online most Linux tutorials completely miss that point.