lkml.org 
[lkml]   [1999]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RECOVERY: partition table
On Sat, 10 Jul 1999, Trever Adams wrote:
> I found block lengths etc of my partitions... I accidentally blew away
> my partition table (fd0!=hda) and unfortunately I have no way to do a
> backup and so have little. The system is still up and running. Is
> there anyway I can recreate exactly the same partition table? I imagine

# /sbin/hdparm -g /dev/hda1

/dev/hda1:
geometry = 525/128/63, sectors = 2507841, start = 63

do this on all the partitions on your /dev/hda, and write down the
start and sectors numbers. With that info, you have enough
info to recreate the partition table if you're clever about it.

Remember the numbers are given in sectors, and one cylinder is num_sectors
* num_heads (128*63 in the above case), and that the starting offsets are
one head into the partition itself..

I haven't looked in /proc if this info is there. Maybe there should be a
current partition table entry there ?

/bjorn



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.123 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site