[ILUG] Bad day for my partition table...

From: Paul Reilly (paul at domain ireland.seds.org)
Date: Tue 11 Jul 2000 - 09:45:21 IST


Okay.... so I was messing around with my system to see if I could get a
quadruple boot going.... Win2k/Linux on one drive and FreeBSD/Linux on the
second drive. Today (well last night) I seemingly got everything working
and was able to boot into Win2k, Linux or FreeBSD either directly or from
within VMware on Win2k. Amazing I thought! However when I went to check my
original linux installation on /dev/hda5 it wasn't there! Somewhere along
the way my partition table for /dev/hda had been zapped....

My swap space seems to have migrated from /dev/hda3 (which now no longer
exists) to /dev/hda7 and critically my root partition /dev/hda5 is gone
completely! The old /dev/hda6 and /dev/hda7 have moved down a partition
number to /dev/hda5 and /dev/hda6 respectively!!

I crucially need to get some files off what used to be /dev/hda5 (where
/home used to live).... If you look at the block allocations in the
partition table (below) the blocks that made up my old /dev/hda5
(658-1295) haven't been (too badly) allocated elsewhere, so theoretically
I should still be able to get to them....

Whats the best way to proceed? I could re-create the partition table as it
should be, sync it and then try and mount /dev/hda5 under my second linux
system, hoping the data will still be there. However if you look at the
new partition table (below) it shows the first few blocks (656-666) of
what was /dev/hda5 seem to have become the new swap. I could re-create
/dev/hda5 from 667-1295 and then try and mount it, but will that work
without the crucial first few blocks of the filesystem? Perhaps I should
get a filesystem editor to look at what data is on the raw disk and try
and recover it that way?

Any ideas, advice etc would be appreciated!
My partiton tables (before & after) are shown below!

Thanks

Paul.

------------------------------------------------------------------------
BEFORE:

Disk /dev/hda: 255 heads, 63 sectors, 1661 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
======== ==== ===== ==== ======== == =======================
/dev/hda1 * 1 638 5124703+ b FAT32 Win2K (5 GB)
/dev/hda2 639 640 16065 83 Linux /boot (16 MB)
/dev/hda3 641 657 136552+ 82 Linux SWAP (132 MB)
/dev/hda4 658 1661 8064630 5 Linux Extended (8 GB)
/dev/hda5 658 1295 5124734 83 Linux / (5 GB)
/dev/hda6 1296 1487 1542239+ b FAT32 /common (1.5GB)
/dev/hda7 1488 1661 1397654 b FAT32 /hfs (1.4GB)
------------------------------------------------------------------------

AFTER:

Disk /dev/hda: 255 heads, 63 sectors, 1661 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
======== ==== ===== ==== ======== == =======================
/dev/hda1 * 1 638 5124703+ b FAT32 Win2K (5 GB)
/dev/hda2 639 641 24097 83 Linux /boot
/dev/hda4 658 1661 8064630 5 Linux Extended (8 GB)
/dev/hda5 1296 1487 1542239+ b FAT32 /common (1.5GB)
/dev/hda6 1488 1661 1397654+ b FAT32 /hfs (1.4GB)
/dev/hda7 658 666 72229+ 83 Linux SWAP
------------------------------------------------------------------------



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:50 GMT