Solving logical memory block errors on my secondary hard drive with the right Linux tools for this task

  • Thread starter Thread starter Drapion79
  • Start date Start date
  • Views Views 955
  • Replies Replies 9

Drapion79

Member
Newcomer
Joined
Sep 29, 2024
Messages
19
Reaction score
12
Trophies
0
Age
30
XP
79
Country
Canada
I'm experiencing a logical (not mechanical) HDD problem where I am not allowed to write a new partition of my secondary hard drive located on /dev/sdb, this error happened days ago while I was trying to stop gnome disk from erasing my empty drive after migrating all of my files locally over my main Linux machine. Unfortunatelly GNOME Disks "lied" and told me the wrong time extimate right when I was about to wipe my own 2 Tib drive, so I ended up trying literally "everything" to stop that process from taking more than five months to complete until I was eventually "forced" to pull out the USB cord from my own PC as a choice of last resort when all commands I've tried failed to put an halt to that lenghty process (please forgive me for my own "recklessness", there was nothing I could have done to stop that process from happening in the first place).

As of now, the following 2 TiB hard drive appears to be viewable on Linux console tools and GNOME disk's graphical interface, I've also tried to check that one out with Gparted but it didn't show up there for some weird unknown reasons. The drive still works and has no visible mechanical damage to it, I can shut it down with GNOME disks just like I would do with other fully-functional drives. no important files where lost back when I first started wiping out that drive since I had already saved most stuff on my machine and I was already in the process preparing my external drive for formatting. The logical error appers to be as follows when I try to create a new filesystem with GNOME disks:

udisks-error-quark 0

After this "apocalyptic" disaster has struck me, I tried to check out many corners of the net for a possible solution to my problem with no relevant results showing up due to shitty search ranking algortithms, so I tried to ask the AI for help. Not even the AI was able to explain me properly what this Linux logical error even meant so I came up with a different idea instead (more on that later).

The only thing I miss on the Linux world compared to the Windows world is the availability of a tool capable of fixing or remapping bad logical sectors like Victoria disk checker and MHDD. I tried to run Victoria under WINE (flatpak version) to see if I could have use it to fix my "corrupted" HDD but nothing, the external drive wouldn't show up on Victoria due to the lack of priviledged access to all viewable external drives on my Linux machine. Recently, I just found out that there was once a similar tool to Victoria disk checker called "bbf" available on Linux. but it's no longer maintaned as of today.

https://slackbuilds.org/repository/15.0/system/bbf/

https://gitcode.com/gh_mirrors/bb/bbf
 
Last edited by Drapion79,
Assuming this is not a joke thread… so I'll just answer.

so I tried to ask the AI for help. Not even the AI was able to explain me properly
An LLM does not think and does not analyze problems. It just spits out eloquent texts. These trained "neural networks" have recommended eating stones, putting glue on a pizza, falsely accused a man of being the murderer of his own kids (who are still alive) and recommended somebody to commit suicide. All in all so-called "AI" are not reliable sources.


I tried to run Victoria under WINE
😬 I'm pretty sure things like this are not even supposed to work on Wine. Pretty sure accessing HDDs this way requires being root on Linux.
====

looks unmantained to me
Where is the problem with a live system that is slightly outdated? If it boots and works on your computer it's worth trying.
====

Few things come to my mind I'd try (in that order, because the ideas become more radical and time consuming) when having this problem:
  1. dd if=/dev/zero of=/dev/sdX bs=32M count=10 → reboot → fdisk or parted on command line to create new partition table and new partition
  2. Remove HDD from USB enclosure (if possible) and connect it to SATA port → fdisk/parted
  3. Set an ATA password with hdparm --user-master m --set-security-pass "SomePassword" /dev/sdX followed by secure erase with hdparm --user-master m --security-erase "SomePassword" /dev/sdX → reboot → fdisk/parted
:!: hdparm is dangerous if you don't know what you're doing, so please read the manual. I wrote these commands down from my memory and they might be wrong! :!:
ATA-secure-erase on modern rotating HDDs takes many hours! My 2TB laptop HDD estimates 6 hours. There is no progress indicator and no way to interrupt it (but ripping out cables again or powering off the computer which you should obviously not do). On SSDs it only takes seconds (just crypto-shredding and marking all space free).

Good luck!
 
  • Like
Reactions: splaca

Site & Scene News

Popular threads in this forum