Hoping someone may guide me through resolving the issue of my HDD no longer working by something going wrong with encryption failure.
Steps I took after plugging in my 1TB Seagate portable HDD and the error afterwards, always as the messages error in Dolphin file manager:
df -hl umount /dev/sda1 sudo wipefs -a /dev/sda1
Then when I got to cryptsetup using:
sudo cryptsetup luksFormat /dev/sda1
Typed in YES during prompt if I am sure I that I want to continue with overwriting data.
Got asked to enter new password, then to verify it. Well, the confirmed by pressed enter on keyboard after the second passphrase this is the error message I recieved:
WARNING: Locking directory /run/cryptsetup is missing!
And in Dolphin file manager, this is what the error message was:
An error occurred while accessing '931.5 GiB Encrypted Drive', the system responded: An unspecified error has occurred: No such interface “org.freedesktop.UDisks2.Filesystem” on object at path /org/freedesktop/UDisks2/block_devices/dm_2d2
Now I cant seem to do anything with the hdd including to reformat it.
May someone help please.
An encrypted HD or partition of it is not something you can “mount” and “unmount”.
You can only “open” or “close” the container.
So if you had /dev/sda1 already encrypted and opened and want to start over you need to “close” it before using wipefs on the partition.
If you want to create/wipe/mount etc the filesystem inside the container you should be using the device mapper name you used while opening the container…
The name will be under /dev/mapper/ with the same name you used “luksOpen” with.
By doing sudo wipefs -a /dev/sda1 you actually messed your encrypted container itself.
Create a new partition table (type: gpt) on ‘/dev/sda’
Job: Create new partition table on device ‘/dev/sda’
Command: sfdisk /dev/sda
Create new partition table on device ‘/dev/sda’: Error
Create a new partition table (type: gpt) on ‘/dev/sda’: Errorstrong text
Turned on Windows 10 in Virtualbox, right clicked on drive in My Computer, then format, a few seconds later. Format complete. Shutdown Virtualbox. Took all of about 90 seconds. Hard drive works perfect now on Linux.
Would love to understand more how this all works on Linux and how something is so quickly and effortlessly is done on a Windows system, yet so complex and hard to do on Linux (for me anyways in regards to formatting a hdd when it was my own fault for following the wrong instructions trying to encrypt it. I didnt do my due diligence in the first place…lesson learnt there.)
It’s actually a lot easier in Linux, you just need to do it via a terminal instead of a GUI…
It might be due to the fact that you needed to created a new partition table which was failing when using a GUI…
It worked out when I tried it again and followed the tutorial exactly… Sorry haven’t answered sooner, was trying out different distro’s.
Its amazing - how different (more helpful, more info, more friendly, more better on all aspects IMHO) manjaro/arch community is in comparison to other distro communities.
Therefore, I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.
However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or or if you agree)
P.S. In the future, please don’t forget to come back and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.