[clug] Accidental commit to fdisk - rebuild (partitions still mounted)

Michael James michael at james.st
Sun Jul 19 18:57:41 MDT 2009


On 20/07/2009, at 10:44 AM, Daniel Pittman wrote:

> Neil Symons <neil.symons at gmail.com> writes:
>
>> I am helping out someone who accidentally removed an extended  
>> partition
>> using fdisk on Suse linux 9 (86/64 sp3) and lost more partitions than
>> expected.  The system is up with all partitions still mounted. The  
>> risk is,
>> if he reboots or unmounts any partition the data may be lost forever.
>>
>> I do not know how to obtain the current partition information on  
>> the drive
>> to rebuild using fdisk.  Help would be extremely appreciated here.
>
> Worst case, use 'gpart' to discover the filesystems on the disk  
> automatically.
>
> However, you should be able to use the information in /proc/ 
> partitions to
> calculate the positions of the partitions; it gives the size of the  
> partition
> on disk.


Once fdisk has replaced the correct partitions
  it will all just mount and work again.

I had a Dell utility CD that re-partitioned my disk without warning.
With a rough idea of the partitioning I was able to find
  the exact cylinder boundaries by trial and error.
ie  try this number of cylinders for the first partition,
  try to mount it, still nothing, try 1 more, got it.  etc.

But I always partition by cylinder numbers in powers of 2
  which made guessing much easier.

-- 
Michael James

PS: I'd think long and hard before I re-booted it but.


More information about the linux mailing list