How do I (re)install a partition table on a corrupted SATA disk?
I have a SATA disc, Samsung 500GB SATA2. It's fairly
new (~3 months) and came dual booted with XP and Ubuntu 7.04. After a few weeks I started having trouble with the Ubuntu partition and then the XP partition. I'll skip the details of what that was, for now. Main point is, that I tried to solve the problems by reinstalling both OSs (and upgrading Ubuntu to 7.10). Further problems. So I thought it could be the dual boot configuration. I've used dual boots before but with the systems on separate disks. I put Ubuntu on the whole disk. Same problems. Then XP on the whole disk. Same problems. I've also tried to put Fedora 8 and Debian (etch, r2) on the whole disk -- Debian wouldn't recognize the partitions and the installer wouldn't go beyond the partition stage, either manual or guided. Now I'm guessing that, with all these reinstalls, I've mucked up the partition table. I've used RH9 for years (which uses MBR, not LVM) and didn't understand that the disk originally came with an entirely different setup. I got Knoppix and tried to use gparted and QtParted to reformat the disk. They gave peculiar results at first and now say that there is only a single partition, of 1.9GB, on the disk. My question is: can I rescue this disk? Is it possible that it is corrupted beyond repair? I'd be content with Debian on the whole disk, or preferably Debian with another Linux. I don't have to have the XP. I've never really understood MBRs and I don't understand GPT at all, though I'm reading the wikipedia article on it. I thought that a MBR or GPT would always remain, no matter how the actual entries in it changed (assuming that the disk wasn't physically damaged). There doesn't seem to be much about GPT on this or other forums. If you can help, I'll be very grateful. I've been trying different things on this for three weeks now. Why don't I send it back to the vendor under warranty? Partly because he's a small one-man show and so far is not answering emails. I'm still trying to get through. Also, I'm feeling that I may have made the original problem worse by doing all these reinstalls. Other specs: Athlon64 dual core 6000+, Asus Pundit P1-Ah2, 2GB DDR667. Thanks for reading. K |
I would download the ultimate boot CD and run some disk diagnostics first to see if the drive is failing. Then try to use testdisk to restore an old partition table.
|
Have a read of this thread. Maybe I should have another look at that drive - it' a "mobile backup" that I haven't touched in a couple of weeks. Was o.k. last I looked.
|
Thanks for these, pljvaldez and syg00. I didn't know about the UBCD. I've got that now.
I found Testdisk overwhelming so I started by using gparted to check and reformat each partition. This seemed to work. However Debian (etch, r2) still failed to install, though it got a lot further: it crashed about 12% into the package retrieval. I then ran Testdisk and it said `no harddisk found'. Loading the live disk, I got ata1: SRST failed (errno=-19) More tries tomorrow. Best, K |
On the UBCD there's some hard disk diagnostic tools under the "Hard Disk Tools" menu item that (use either SHDIAG or HUTIL for samsung drives) you can run to see if the disk is failing.
|
I still haven't succeeded.
I took your advice,plj, and used HUTIL (2.03) from the UBCD. I ran all the checks and the disc passed them all. The read surface scan reported no errors (took 2.5 hours) and I did a low-level format (14 hours). I then ran testdisk on it and testdisk saw the disc. I wrote a new MBR record on it and rebooted. Then I started an install of Debian as before. It failed at about the same stage as before --- having retrieved about 520 of the 673 files, it complains of a disc failure. I have a few thoughts or queries that I'd appreciate any comments on: ===> Testdisk 6.8 offered a menu of disc types which were only: Intel, Mac, None, Sun, xbox. I chose Intel, but the processors I have are AMD Athlon64s. The disc is a SATA. ===> When I ran `Analyse cylinder' it paused at cylinder 20565 out of 60800. Pause was about 90 seconds long. Before and after, it ran steadily at about 100 cylinders/sec. This cylinder is at 33% and the Debian installer also paused at 33% during the formatting of /home and then skipped on without running to 100%. Could there be some problem here that HUTIL did not see? ===> This box originally came with GPT. I used Testdisk to write a new MBR, but maybe these are incompatible? Should I accept the LVM option when partitioning? Here, for the record, is the partition table debian offered: #1 primary 7.0GB B f ext3 / #5 logical 5.8GB f swap swap #6 logical 487.3GB f ext4 /home Yours, K |
ext4 should be ext3, of course.
BTW I checked the MD5 sum on the Debian disc and also ran the Debian diskcheck on it. K |
[QUOTE=Kamoflauge;3035829]
===> When I ran `Analyse cylinder' it paused at cylinder 20565 out of 60800. Pause was about 90 seconds long. Before and after, it ran steadily at about 100 cylinders/sec. This cylinder is at 33% and the Debian installer also paused at 33% during the formatting of /home and then skipped on without running to 100%. Could there be some problem here that HUTIL did not see? Might well be so. You could also boot from DVD (rescue mode) and do an e2fsck -cv on that partition to weed out any possible bad blocks. |
try something different
Try using Wipedisk. This will format the whole disk including the boot section. Then you can try to reinstall everything. Or you can use Partion Magic. This will let you set up windows and Linux on the same hard drive. Or you can load Windows on 1 hard drive then disconnect it and then load Linux on the other one. Keep in mind that the last will not give you a duel boot, as you will have to use the bios to switch drives.
|
Quote:
Many zeroing utilities have the ability to isolate bad sectors when writing zeros to every sector, (wipe a drive). |
Quote:
|
It's months ago now, but thanks for these, JH.
(I still don't understand what went wrong.) |
All times are GMT -5. The time now is 03:27 AM. |