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

Neil Symons neil.symons at gmail.com
Sun Jul 19 20:51:00 MDT 2009


Thanks all

Worked out as suggested. (to look at /proc/partitions and reconstructed
using fdisk)

Thanks for your help.

Regards,

Neil



On Mon, Jul 20, 2009 at 11:21 AM, Adam Thomas <adam.lloyd at gmail.com> wrote:

> 2009/7/20 Neil Symons <neil.symons at gmail.com>:
> > Hi all,
> >
> > 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.
>
> I had a similar moment when I attached a SATA drive to a RAID controller
> and told the controller to export the drive as (what I thought was) a
> single
> disk. The controller warned me that it was going to write the changes to
> the disk but, being the fool I am, thought it meant it was going to write
> the changes to an eeprom. On booting the machine I discovered that the
> controller's setup had hosed the partition table on each of the 4 drives.
>
> I put the disks back on the machines generic SATA controller and checked
> out the damage. None of the partitions were found so I was in panic
> stations
> at this point.
>
> I pulled down a copy of SystemRescueCD[0] and used TestDisk[1] to
> find the Linux MD partitions and re-write the partition tables. All was
> well after that.
>
> [0] http://www.sysresccd.org/
> [1] http://www.cgsecurity.org/wiki/TestDisk
>
> > 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.
>
> SuSE may have TestDisk in it's repos, otherwise try the source package.
> Rebooting may not be as big a drama as you might expect because
> TestDisk can scan the device for the file system markers and restore
> the partition table using those.
>
> >
> > I do not know how to obtain the current partition information on the
> drive
> > to rebuild using fdisk.
> > Help would be extremely appreciated here.
> >
> >
> > Regards,
> >
> > Neil
> > --
> > linux mailing list
> > linux at lists.samba.org
> > https://lists.samba.org/mailman/listinfo/linux
> >
>


More information about the linux mailing list