Ext2 Partition signature? (Reconstruct Partition Table)

Ext2 Partition signature? (Reconstruct Partition Table)

Post by Wayne Whitn » Thu, 05 Dec 1996 04:00:00



Hello,

An errant DOS 6.x FDISK nuked the extended portion of my partition
table; foolishly I had no partition table backup.  Rather than restore
my data from backup, I'd like to try reconstructing the partition
table.  So, is there a recognizable signature that an Ext2 partition
begins with? Ends with?  Something I could search the extended
partition for and based on its location determine the start/end of the
Ext2 partition.  Also, can anyone recommend a good, free DOS or OS/2
program to do the searching with?

FYI, I've attached the partition table, where the letters denote the
partition boundary data I'm trying to recover.  Thanks for any help.

Yours,
Wayne Whitney

Fixed Disk 1 has 2100 cylinders

1    508  OS/2 HPFS
509  549  DOS
550  2100 Extended

550  A    Linux /boot partition (~10 Mb)
A+1  B    Free space (~100 Mb)
B+1  C    Linux swap (~32 Mb)
C+1  D    Linux root partition (~400 Mb)
D+1  2100 OS/2 HPFS  (~200 Mb)

There is some evidence that C = 875.

 
 
 

Ext2 Partition signature? (Reconstruct Partition Table)

Post by Urs Thuerman » Sat, 07 Dec 1996 04:00:00



> An errant DOS 6.x FDISK nuked the extended portion of my partition
> table; foolishly I had no partition table backup.  Rather than restore
> my data from backup, I'd like to try reconstructing the partition
> table.  So, is there a recognizable signature that an Ext2 partition
> begins with? Ends with?  Something I could search the extended
> partition for and based on its location determine the start/end of the
> Ext2 partition.  Also, can anyone recommend a good, free DOS or OS/2
> program to do the searching with?

You can search for a block containing the bytes 0x53 and 0xEF at
offsets 0x38 and 0x39.  This is likely to be block #2 (starting with
#0 for the first block and assuming 1K block size) of your ext2
partition.

Sorry, don't know any tools to do that under DOS or OS/2.  Under Linux
you could do it dd/od/less or write a really small program for that
purpose.  I've done that several times.

urs

 
 
 

1. Reconstruct partition table from running kernel?

Is there any way to have the system tell me what cylinder
boundaries it is using for it's mounted filesystems?

The partition on the root disk of our server has gotten
corrupted, but all the partitions that were mounted are
still mounted fine.  I am still able to dump them, so
there is no risk of data loss, but I would like to
reconstruct the partition table before having to reboot
(or facing a power outage).  Naturally it would be nicer
to rebuild a partition table than to dump and restore
all the data on the disk - especially when this is
a primary NFS server and the down time would be very
painful.

VITALS:
Slackware legacy installation, manually upgraded to:
Linux 2.0.15
libc5.4.23
gcc 2.7.2.3.f.1
As well as most utils being upgraded to similar dates
Running on a P166 with 32 MB RAM
And serving oover 50GB of research data beautifully!

TIA for any suggestions.

-Ty!

--
|==========================||======================================|
| Ty! Boyack               || Colorado State University            |
| Unix/Network Admin       || College of Natural Resources         |

| (970) 491-4966           ||                                      |
|==========================||======================================|

2. Where to 'probe scsi' in x86?

3. Reconstruct partition table

4. rdev -R zImage 1 does not work

5. Reconstruct partition table.

6. NUMA API for 2.5.12 (3/4)

7. ext2 recovery, incorrect partition table, URGENT!

8. Help: Does anyone know what this might mean?

9. fix incorrect ext2 partition table?

10. Moving/Resizing Linux (ext2) partitions with Partition Magic: It works!

11. Partition Magic 4.0 supports ext2 partitions

12. Is it Possible to enlarge a SWAP partition from a EXT2 partition?

13. Linux (Ext2) Partitions are now Resizable (Re: Resize partition ?)