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.
That said:
By doing sudo wipefs -a /dev/sda1 you actually messed your encrypted container itself.
Thank you, seriously⌠for taking the time to actually explain whatâs happened there.
Appreciate it.
Old and barely used HDD, bought purposely for backing up Photos from and even oldwindows 7 machine machine.
Not sure even what the format would be for that, n
But I think I maybe enough to go on now in my quest to fix it.
In my defence though, I did look here first for answers, took a few peaks around else were, that looked super easy to do fast, and thatâs where they always get ya where it hurts mostâŚ
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
UPDATE:
I found this [root tip] Repartition and format your USB stick tutorial by @linux-aarhus
I have followed the instructions on from his tutorial with the script provided. I has not worked on the 1TB external USB HDD.
However, it worked great on a 8GB USB stick I test it on.
SOLVED:
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.