re-add deleted extended logical partitions?
Help! I inadvertently deleted (using fdisk) two ext2 partitions that are in an Extended primary partition (i.e. they were /dev/hda7 and /dev/hda8). I've done nothing since then but a lot of reading. Can I safely add them back using fdisk or sfdisk (or cfdisk or something else? I know their physical locations and sizes and have verified (using a nice tool called gpart) that they're apparently still intact. If not, how can I find and update the extended partition table without modifying the partitions' contents? Thanks in advance.
Re: re-add deleted extended logical partitions?
Yes, if you have the exact partition geometries you can just add them back as long as you haven't created anything else on top of them since. David Coe wrote: Help! I inadvertently deleted (using fdisk) two ext2 partitions that are in an Extended primary partition (i.e. they were /dev/hda7 and /dev/hda8). I've done nothing since then but a lot of reading. Can I safely add them back using fdisk or sfdisk (or cfdisk or something else? I know their physical locations and sizes and have verified (using a nice tool called gpart) that they're apparently still intact. If not, how can I find and update the extended partition table without modifying the partitions' contents? Thanks in advance. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- Jens B. Jorgensen [EMAIL PROTECTED]
Re: re-add deleted extended logical partitions?
Thanks, that worked beautifully and all is well again. I highly recommend gpart -- it did an admirable job of telling me where those deleted partitions actually were. I'll see if I can debianize it if someone isn't already doing that... Begin3 Title: gpart Version:0.1c Entered-date: 11JAN99 Description:A tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted. The guessed table can be written to a file or device. Supported (guessable) filesystem or partition types: DOS/Windows FAT, Linux ext2 and swap, OS/2 HPFS, Windows NTFS, FreeBSD and Solaris/x86 disklabels, Minix FS, Reiser FS. Keywords: hard disk primary partition table reconstruction Author: [EMAIL PROTECTED] (Michail Brzitwa) Maintained-by: [EMAIL PROTECTED] (Michail Brzitwa) Primary-site: http://home.pages.de/~michab/gpart/ ~42k gpart-0.1c.tar.gz Alternate-site: sunsite.unc.edu /pub/Linux/system/filesystems Platforms: Linux, FreeBSD Copying-policy: GPL End Jens B. Jorgensen wrote: Yes, if you have the exact partition geometries you can just add them back as long as you haven't created anything else on top of them since. David Coe wrote: Help! I inadvertently deleted (using fdisk) two ext2 partitions that are in an Extended primary partition (i.e. they were /dev/hda7 and /dev/hda8). I've done nothing since then but a lot of reading. Can I safely add them back using fdisk or sfdisk (or cfdisk or something else? I know their physical locations and sizes and have verified (using a nice tool called gpart) that they're apparently still intact. If not, how can I find and update the extended partition table without modifying the partitions' contents? Thanks in advance. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- Jens B. Jorgensen [EMAIL PROTECTED] -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- David Coe mailto:[EMAIL PROTECTED] R D and Support +1-410-489-9521 Overlord, Inc. http://www.overlord.com
Re: re-add deleted extended logical partitions?
* David Coe [EMAIL PROTECTED] writes: Help! I inadvertently deleted (using fdisk) two ext2 partitions that are in an Extended primary partition (i.e. they were /dev/hda7 and /dev/hda8). [...] If not, how can I find and update the extended partition table without modifying the partitions' contents? Try this: | gpart - Guess PC-type hard disk partitions | | Gpart is a tool which tries to guess the primary partition table of a | PC-type hard disk in case the primary partition table in sector 0 is | damaged, incorrect or deleted. The guessed table can be written to a | file or device. Supported (guessable) filesystem or partition types: | | DOS/Windows FAT (FAT 12/16/32) | Linux ext2 | Linux swap partitions versions 0 and 1 (Linux v2.2.X) | OS/2 HPFS | Windows NTFS | *BSD disklabels | Solaris/x86 disklabels | Minix FS http://www.stud.uni-hannover.de/user/76201/gpart/ HTH, Colin -- Colin Marquardt [EMAIL PROTECTED]