Open Linux Forums
Like Ubuntu forums, except with beer.
Member
Joined: Oct 04 2017
Posts: 361

Have been having a lot of FUN lately with hdd fs problems.

Keep in mind that none of these drives can be described as anything but old. Box may be new(ish) but the drives are all ones that were used with the old Dell for years. At least one is probably 9 years older and the rest are over 5.

Have 4 internally. 2 of those are data storage only and the other 2 are system and data.

Sda has one /home partition for my stable install and all the / partitions for the other 5 installs and a data partition.

Sdb has the home partitions for the extra 5 installs and a data partition.

Sdc has a data partition on it.

Had a couple heat related crashes involving Thunderbird with enigmail and large attachments. That is a separate mystery but the crashes corrupted some blocks on both sdb and sdc to the point where I needed to run e2fsck on them to get them to work at all.

Sdc seemed to be the worst case. Cleared out some room on my experimental installs external and on my Loaner drive and on another external and got that data recovered and moved to those places. Then did a dd security type wipe of the drive and the mbr for that drive and reformatted and it seems to be working fine now and has the data back on it.

Then I cleaned up enough room to deal with the sdb contents on to the externals and did the same sort of backup to them. Most of the data was backed up anyway but I did loose some from both drives. Obviously nothing important. You can tell because it wasn't backed up.

But while doing that transfer of info, while very successfull really, the problem with sdb got worse. Can't do much with it now. So I figure this is a good time to have a learning experience.

Usually if I shut down and make sure to power unit and then reboot the sdb drive is read. I am not mounting it at all from any fstab files. I am using a pair of new partitions on the loaner drive (external) for the /home partition for my pet Lizards (Stoned and Lounge) and for VictimH which is the /home for 3 other installs. Currently I have just fired things up and logged into Stoned Lizard (Debian testing) and could see during bootup (not quite) that sdb was not reading correctly.

Opening a # terminal I take a look at

blkid

This is pretty standard on booting just to see what is happening. This time I have listed sda, sdc, sdd and sde. Sde is the external and there is no sdb listed. This is not always the case when sdb is not cooperating at all. There are time with a boot to any install where I will get an sdb listed which and no sde for the external or just sda, sdb and sdc if booting to my stable install with both partitions on the sda drive and the external turned off. Basically in both those cases real sdb is not detected at all and so sdc becomes sdb and so forth.

On the other hand I just was on Lounge Lizard (Debian Sid) and blkid gave a full read on the 4 partitions on sdb. Stoned-home, VictimH, Info-Spring and swap.

When that happens, which is the usual case, I can mount a partition from there and open it in Thunar and see the files and read them fine, open in the appropriate applications and even save a file to it. This is true for all 3 of the data type partitions. But you can't mount a second one. Drive is now no longer readable.

Open up gparted when sdb is shown by blkid and it will show all the partitions and all the data provided there looks pretty good. Usually will have the triangle warning emblem up for one, two or all three data partitions because it can't figure out which FS is used on the partition. But the content sizes are right (used/unused). Do anything on some other drive like relabel a partition on sdd and then gparted will no longer read sdb either. Will show it with everything in the graphic display just gray and nothin in the lower pane.

I sdb partitions are shown in blkid and I open another tab and run e2fsck I will sometimes be surprised by the plain command telling me the file system is clean. Run

# e2fsck -f /dev/sdb

and it immediately finds a few errors and I just keep hitting enter until they clear. This usually will be about 4 to 6 blocks with errors. It then exits with the comment that there are more errors. Repeat and it can't find the superblock. This is all ext4 by the way.

Using their suggested alternatives comes up blank.

And, of course, if you then run blkid there is no entries for sdb at all again. Reboot with a complete shutdown and you can do it all again.

Here is out put before doing some procedure the other day

root@stoned:/home/tom# blkid
/dev/sda5: UUID="80cba5b3-07c6-49eb-b975-9fde47ede7e2" TYPE="ext4" PARTUUID="0003b632-05"
/dev/sda6: LABEL="Main-home" UUID="48fbbed6-ce39-459a-8f60-68c760350156" TYPE="ext4" PARTUUID="0003b632-06"
/dev/sda7: UUID="47b93b44-ca76-441d-a921-11547ad2e39d" TYPE="swap" PARTUUID="0003b632-07"
/dev/sda8: LABEL="Stoned-root" UUID="79d2035f-7b77-4627-b5fa-fd546ed52d48" TYPE="ext4" PARTUUID="0003b632-08"
/dev/sda9: LABEL="Lounge-root" UUID="8d58c5f3-4814-4687-84a3-dd1b346768ad" TYPE="ext4" PARTUUID="0003b632-09"
/dev/sda10: LABEL="Linux-Info" UUID="d9fa27f0-4985-4b44-93e7-843df728f377" TYPE="ext4" PTTYPE="dos" PARTUUID="0003b632-0a"
/dev/sda11: LABEL="Mageia5" UUID="d250598f-c14d-4df0-86f9-27daa3bd8bea" TYPE="ext4" PARTUUID="0003b632-0b"
/dev/sda12: LABEL="VictimOS" UUID="d6ec9624-d51d-4be9-a250-3d1732594483" TYPE="ext4" PTTYPE="dos" PARTUUID="0003b632-0c"
/dev/sda13: UUID="467c050b-3c55-4c04-9bc6-22aca41a3f07" TYPE="ext4" PARTUUID="0003b632-0d"
/dev/sda14: UUID="f1f9b2b7-a2ed-45a3-aa1a-003660088a8f" TYPE="ext4" PARTUUID="0003b632-0e"
/dev/sdb5: UUID="2120dded-2ab8-40a7-8bfc-1e9bbce849c7" TYPE="swap" PARTUUID="0008742d-05"
/dev/sdb6: LABEL="Stoner-home" UUID="cf81c8aa-9f62-47ec-9eb3-ec760c8d00cf" TYPE="ext4" PTTYPE="dos" PARTUUID="0008742d-06"
/dev/sdb7: LABEL="InfoSpring" UUID="4e351ba0-bd83-44b7-aa73-52e0550e1a77" TYPE="ext4" PARTUUID="0008742d-07"
/dev/sdb8: LABEL="VictimH" UUID="aa15d094-5703-474b-b6cd-d7975194cece" TYPE="ext4" PARTUUID="0008742d-08"
/dev/sdc5: LABEL="Store" UUID="8dcb08ea-eb26-49be-a119-96767d406a89" TYPE="ext4" PARTUUID="d12beac5-05"

And after covering the same range from sda to sdc

root@stoned:/home/tom# blkid
/dev/sda5: UUID="80cba5b3-07c6-49eb-b975-9fde47ede7e2" TYPE="ext4" PARTUUID="0003b632-05"
/dev/sda6: LABEL="Main-home" UUID="48fbbed6-ce39-459a-8f60-68c760350156" TYPE="ext4" PARTUUID="0003b632-06"
/dev/sda7: UUID="47b93b44-ca76-441d-a921-11547ad2e39d" TYPE="swap" PARTUUID="0003b632-07"
/dev/sda8: LABEL="Stoned-root" UUID="79d2035f-7b77-4627-b5fa-fd546ed52d48" TYPE="ext4" PARTUUID="0003b632-08"
/dev/sda9: LABEL="Lounge-root" UUID="8d58c5f3-4814-4687-84a3-dd1b346768ad" TYPE="ext4" PARTUUID="0003b632-09"
/dev/sda10: LABEL="Linux-Info" UUID="d9fa27f0-4985-4b44-93e7-843df728f377" TYPE="ext4" PTTYPE="dos" PARTUUID="0003b632-0a"
/dev/sda11: LABEL="Mageia5" UUID="d250598f-c14d-4df0-86f9-27daa3bd8bea" TYPE="ext4" PARTUUID="0003b632-0b"
/dev/sda12: LABEL="VictimOS" UUID="d6ec9624-d51d-4be9-a250-3d1732594483" TYPE="ext4" PTTYPE="dos" PARTUUID="0003b632-0c"
/dev/sda13: UUID="467c050b-3c55-4c04-9bc6-22aca41a3f07" TYPE="ext4" PARTUUID="0003b632-0d"
/dev/sda14: LABEL="VictimO" UUID="f1f9b2b7-a2ed-45a3-aa1a-003660088a8f" TYPE="ext4" PARTUUID="0003b632-0e"
/dev/sdc5: LABEL="Store" UUID="8dcb08ea-eb26-49be-a119-96767d406a89" TYPE="ext4" PARTUUID="d12beac5-05"

I find this really fascinating. Can't say I understand it a bit but still really interesting.

I tried to use dd to just wipe the drive. Had no effect what so ever.

I also, early on, tried testdisk on the drive but it couldn't find any partitions at all.

So, I hear you say, "what is the problem? The drive is bricked."

This is probably true. But I can, on occasion at least, read the drive. I have found on some drives that really seem pretty bad that doing some sort of radical wipe on them makes them capable of further use. This drive obviously is useless as it is. There fore I would really like to try to recover it back into usable condition if at all possible. This is just for educational bennefit. Drive is obviously not something even some nut case like me would ever trust. So I see no problem experimenting on it.

This is a Seagate drive of the ST3 variety and 500GB.

Another place, come to think of it, where I can see if the drive is responcive at all is in the boot menu (F8 on this AMD MB) where if it shows up in correct order with the other drives you can be sure that it is cooperating.

Which brings us to other things you may want to know such as this is a new box for me. It is a uefi type MB but I am booting legacy mode mbr because I just slapped the sda and sdb drives out of the dead Dell into this box.

One tool I have never used and am not sure about at all is hdparm which has a way to do a security wipe and works with sata drives fine apparently if you simply use sdx instead of hdx. Looking into that I discovered sdparm which is newer, designed for sata drives but doesn't seem to be nearly as capable as hdparm.

I figure my time is limited as far as having any slim chance of success with this drive so I would love to here any suggestion as to how to attempt to rescue the thing. Data recovery is NOT at all an interest. I have all I need off of it. I just want to try and put it back into service if I can.

My externals are all USB2, not sure this would work even on USB3. I have both USB2 and 3 ports along with a couple Sata ports but basically this will have to be done internally so I have not removed the drive at this point.

When I can afford it I am getting 2 new 500 GB drives and putting them in and setting them up for uefi boot and then use the best drives for data storage untill I can get another pair of new drives. I know it works because I have used uefi on here in some installs on an external. Debian installer, last time I tried it is crap for setting up the efi partition so that it actually works. But the Mageia installer works fine so you can do that and then install anything you want and ditch Mageia.

For some reason I can't seem to get the contents of that partition in manually and get them to work. Not sure what the problem is. Has to be with me as I can't even copy working contents from an efi partition and then create one - put that content back into it and have it work. But that is not a concern for me at all at this point because I know how to work around it. Once set up it works fine as long as you don't mess with it no matter what you do install wise.


I edited this to fix the code boxes. BBCode tags don't work on this forum software. To set a code tag, you need to put a backwards apostrophe before and after the text. I'll write a post about it to explain it better.
Mick


Edit: Some more code-tags, and some typos. Leppie

Member
Joined: Oct 04 2017
Posts: 361

Thanks fellers.

Member
Joined: Oct 04 2017
Posts: 361

I take it no one has any ideas about attacking this crazy mess.

Member
Joined: Oct 26 2017
Posts: 463

I have a disk called nuke and burn I am trying to remember where I got it. anyway I used it on a couple of laptops that were corrupted with some virus it wiped the drives clean. and the drives were usable afterward don't know if this would help or not.

Member
Joined: Oct 04 2017
Posts: 361

nubimax wrote:

I have a disk called nuke and burn I am trying to remember where I got it. anyway I used it on a couple of laptops that were corrupted with some virus it wiped the drives clean. and the drives were usable afterward don't know if this would help or not.
Could this be titled Boot and Nuke?

Seems like that is now known as Dban or something like that.
https://duckduckgo.com/?q=nuke+and+burn+disk&t=hg&ia=web

https://dban.org/

Sounds really interesting. I am worried that the tools I have found may not be able to function because of not being able to read the drive. This may be true here too but as I don't know much about the thing it may be the best thing to try.

Sounds pretty safe really. I do have 4 drives internally but running from the disk it would be pretty easy to open the box and disconnect the other 3 drives before doing anything.

I know that dd and e2fsck don't work from my sda drive so I am not real hopeful that anything will.

Member
Joined: Oct 04 2017
Posts: 361

Found the DBAN help center and it says
Known Problems

If your computer usually crashes, then DBAN is likely to crash with a “kernel panic” or “sanity error” too. DBAN does not run on computers with bad hardware.

This is actually a hopeful sign. I run with sdb up and running when I boot to the internals. I am not using that drive, it is detected and I get temp reports from it and can see it in gparted and in cli tools even if they will not work on it. No crashes.

Can also log into systems with the Loaner not hooked up as long as I don't try to boot too the user desktop. The drive will not properly mount (at least not usually). But I can mount it if I log in as root and then mount the right partition for that install to /home and read the thing.

So it might work.

Member
Joined: Oct 26 2017
Posts: 463

I got the Nuke and Burn disk when living in Mexico, Kids would buy cheap music cd's made in China most of the cd's had virus in them, only cure was wipe the hdd and reinstall xp. This most of been around 2006 give or take a year.

Member
Joined: Oct 04 2017
Posts: 361

nubimax wrote:

I got the Nuke and Burn disk when living in Mexico, Kids would buy cheap music cd's made in China most of the cd's had virus in them, only cure was wipe the hdd and reinstall xp. This most of been around 2006 give or take a year.
Well this seems to fill the bill perhaps better than what I had planned. Think I will try it out. Mainly for fun.

Have it on a CD. Boots.

Need to find time to disconnect the other drives and checking their forum I found that if you have built in usb devices (card readers generally) they need disconnected too. Just pull the plug on the MB.

I have the card reader from the old Dell in here. Had to do some interesting things to physically put the unit in one of my expansion slots and remove an extra projection on the body of the MB plug for it as it is a Dell part and they want them to not work anywhere else or for you to use anything but their over priced parts. Dandy 4 slot card reader for 6 types of cards though.

Son got me an internal sata DVD drive last Xmas. So after the disconnection of my other drives and card reader I should be able to find out if this works pretty fast.

Problem is that I am a bit crowded in this room and just physically getting into the case is a bit of a time consuming chore.

Will get to it eventually.