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

Daniel Pittman daniel at rimspace.net
Sun Jul 19 18:44:07 MDT 2009


Neil Symons <neil.symons at gmail.com> writes:

> I hope there is a simple answer to this.
>
> 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.

Regards,
        Daniel

-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the linux mailing list