LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-23-2008, 04:06 PM   #1
Kamoflauge
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: SL4.4, Ubuntu 7.10
Posts: 28

Rep: Reputation: 15
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
 
Old 01-23-2008, 04:15 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
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.

Last edited by pljvaldez; 01-23-2008 at 04:18 PM.
 
Old 01-23-2008, 04:42 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,094

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
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.
 
Old 01-24-2008, 04:22 PM   #4
Kamoflauge
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: SL4.4, Ubuntu 7.10
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 01-24-2008, 04:35 PM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 01-26-2008, 11:09 AM   #6
Kamoflauge
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: SL4.4, Ubuntu 7.10
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 01-26-2008, 02:36 PM   #7
Kamoflauge
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: SL4.4, Ubuntu 7.10
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 01-31-2008, 05:59 PM   #8
the.fiddler
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
[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.
 
Old 02-04-2008, 08:12 PM   #9
fullwhitebeard
LQ Newbie
 
Registered: Jun 2007
Posts: 18

Rep: Reputation: 0
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.
 
Old 02-05-2008, 05:07 PM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Quote:
===> 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?
Sounds like there is a sector issue, problem I see is that modern hard drives isolate bad sectors automatically when they require too many passes to be read. Then again, if the sectors are un-allocated, the system won't try to read them. I use SpinRite to isolate bad sectors, it works very well but costs money. There may be some open source applications from a Live CD that can do the same job, maybe Google that one.

Many zeroing utilities have the ability to isolate bad sectors when writing zeros to every sector, (wipe a drive).

Last edited by Junior Hacker; 02-05-2008 at 05:28 PM. Reason: Added info.
 
Old 02-05-2008, 05:23 PM   #11
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Quote:
===> 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.
This refers to the architecture of the computer, the processor and hard drive type is irrelevant. Because Windows was installed, it is highly likely to be Intel.
 
Old 05-22-2008, 06:31 AM   #12
Kamoflauge
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: SL4.4, Ubuntu 7.10
Posts: 28

Original Poster
Rep: Reputation: 15
It's months ago now, but thanks for these, JH.

(I still don't understand what went wrong.)
 
  


Reply

Tags
boot, corrupt, disk, dual, gpt, grub, sata


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
partition table corrupted ravi_chobey Linux - Hardware 2 12-28-2007 03:11 AM
SATA Hard disk(Windows) MBR corrupted by IDE hard disk(Linux) Peter_APIIT Fedora 6 07-07-2007 12:20 AM
Partition table appears to be corrupted havok1977 Linux - Hardware 2 03-13-2006 12:29 PM
NTFS partition/file table spontaneously corrupted lm317t Linux - Software 3 01-05-2006 09:11 AM
partition table corrupted narxist Linux - Software 2 06-04-2001 04:33 PM


All times are GMT -5. The time now is 08:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration