Help : Need to recover my partitions (longish)

Help : Need to recover my partitions (longish)

Post by David Co » Tue, 16 Feb 1999 04:00:00



Summary :  Something is very confused, either in my partition tables
or BIOS or elsewhere.   Also, I seem to have hard disk problems.

The details :   I have two IDE hard disks - one 2.5 Gb, one 6.4 Gb.
The 2.5 G is the original disk in the machine, and has 520Mb DOS/W95
partition, the rest for Linux (5 partitions - swap, /, /var, /usr and
/home).  The 6.4 is a relatively recent addition, and contains swap,
/, /var, /usr and /home partitions (much larger ones than the ones on
the 2.5 G).

I am running RedHat 4.0, I have a Cyrix 6x86  P133, 96M RAM,
IDE CD-ROM, sound card, Matrox Millenium, modem.

When I bought the 6.4 G drive, I was intending to install a newer
version of Linux onto it (rather than risk "breaking" my system with
glibc/libc issues [1] ), copy over all my old files, backup all the
DOS files I wanted to keep, then give DOS more of the 2.5 G drive
(perhaps all, if I was feeling generous :-).  

What actually happened :  I copied over the contents of the 2.5 G
drive, then did nothing about if for a few months (because what I
really want to do is back up eveyrthing, but I don't have a tape
drive, but if I do get one I really would prefer a SCSI one, but then
I should upgrade my hard disks to SCSI, but then I'll have wasted lots
of money on the new IDE one ... etc etc - I'm a champion ditherer ;-)

So, just over a week ago, my computer froze (it does this from time to
time, I suspect intense video activity is some sort of factor, but
this sort of random freeze is hard to track down, and it occurs rarely
enough that it hasn't seemed worth the effort).

Upon coming back up, when trying to mount the partitions from the 2.5
Gb, I saw the following :

hda : read_intr : status = 0x59  (DriveReady  SeekComplete
DataRequestError }
hda : read_intr : error=0x40  { Uncorrectable Error },
LBAsect=1154583, sector=33687
end_request : I/O error, dev 03:03, sector 33687

... and then nothing more (had to be powered down).

Next, I installed RH 5.1 on a spare 500Mb on my girlfriend's computer
(to access man pages, HOWTOs, etc, in case there was something useful
on there).  I wrote boot and rescue disks, booted up ok, and even
managed to mount the partitions from the 2.5 Gb and 6.4 Gb drives.  

Unfortunately, instead of doing the sensible thing at this point and
copying the files from 2.5 to 6.4 drive, I decided to try to get the
2.5 G drive working properly.  I ran lilo again (by mounting the
partitions on that drive, running a "chroot" to the root of it, then
running lilo with the original config on that drive).  That didn't
help.  I tried restoring the boot sector that I originally wrote when
installing RH 4.0, but that just took out LILO and left that drive
booting W95.  

At this point, I think, the partition table on the drive also went
bad.  When I boot into rescue mode and run fdisk, it shows that the
first partition /dev/hda1 occupies cylinders 1 to 520 (as it did
before), but each cylinder is now 8064*512 bytes, which means
/dev/hda1 (DOS partition) takes up most of the drive, and some 800,000
sectors are left unallocated.   I think it used to be cylinders 1 to
520, but 1024 (or a number close to that) * 512 bytes.

Now I am at a loss.  It is possible (maybe) that I can dig through the
last two years worth of pieces of paper that I have accumulated to
find the original partition settings for that drive (yes, I did write
them down, but I've moved since then and they could be anywhere among
thousands of other pieces of paper) - but will that even do me any
good ?  I am reasonably sure that nothing has been written to the
drive since the partition table was lost - can I recreate the old one
and access all the old information ?  Is there something else I can do
to get at the Linux partitions on that drive ?   (... and then
immediately copy everything across to the good (and now bootable)
drive).   Or, should I accept that I've lost 3 months worth of
news/mail/files/changes/programs (or maybe pay lots of money to a data
recovery service ? )  ?

Also:  the read_intr messages I was getting from the 2.5 Gb drive - do
they mean that the drive has "gone bad" ?  (a DejaNews posting I read
suggested that that meant the drive had more bad sectors than the
BIOS/drive/something-or-other could cope with - is that the case ?).

So, to summarise again :  I have two problems.  A hard drive that may
be going bad or gone bad, but I could (for a while) still read the
data from.  Partition tables that have gone bad.   I need to at least
recover from the partition tables - if I can do that and copy the old
stuff over, I can reformat (low level format ?) the 2.5 Gb drive and
install things afresh on there.


here (but I don't guarantee being able to catch replies here, due to
lack of time and having to deal with a stolen bicycle too :-(    )

[1]   I don't know that there neccessarily would be any - but I'm not
convinced enough that there wouldn't be, either.  Besides, it was
about time to do a clean install, and then keep better track of any
changes I make to the system configuration.

Thanks in advance,

David.
(david.cook at pobox.com)
(in Melbourne, Australia)

 
 
 

1. Need to edit partition table to recover 2 NTFS partitions

Using a promiscuous boot disk, I got mixed up with an old virus
(stoned.empire.monk), which definitely did the job on my partition table. I
lost two NTFS partitions that had data I would like to recover. I've
included some information from partinfo, and I have a tool ptedit which can
recreate the partition table, given CHS values.

Disk 1:  5005 Cylinders, 255 Heads, 63 Sectors/Track.
Partition        -----Begin----    ------End-----     Start       Num
Sector    # Boot  Cyl Head Sect FS  Cyl Head Sect      Sect     Sects
--------- - ---- ---- ---- ---- -- ---- ---- ---- --------- ---------
        0 0 00      0    1    1 42 1023  254   63        63  80405262
Info: End C,H,S values were large drive placeholders.  Actual values are:
        0 0 00      0    1    1 42 5004  254   63        63  80405262

I had one NTFS partion that I entered in Win2K' partition editor as "10000
MB", which subsequently formatted as "9.77 GB". The other one used the
remaining space. Sorry I don't have more information than that, the virus
hit moments after I had created the partitions and filled them with
transferred data. I didn't have much of a chance to record such things.

Can anyone help me determine starting and ending CHS values for these
partitions, so I can try it in ptedit? It is my hope that the two NTFS
partitions are still there on the disk. Thanks!

2. UNIX SYSTEMS PROGRAMMER - TX

3. HELP!! Lost partition, need tools to recover

4. xwindows apps over ssh

5. Help needed to recover formated partition !!

6. "Command not found" error, why ?

7. Need Help Recovering Partition

8. Solaris2.6 on x86

9. Need your suggestions recovering partition

10. Recovering my linux partition back to VFAT partition

11. Help recovering partitions.

12. Help recovering old FreeBSD partition

13. HELP: Wiped partition table and want to recover data