[comp.os.msdos.misc] Recovering from FDISK

richard@exocet.mentec.ie (Richard Rooney) (03/17/91)

	Does anyone know an effective way of recovering from an FDISK disaster -
I "Fdisked" the wrong device !
	I know PC-Tools and the Norton Utilities will recover DELETED
files but can they be used in my situation ?
	I need to restore 2/3 un-backed-up directories.

                                            

mhr@mendip.UUCP (MHR {who?}) (03/20/91)

In <2697.27e2ce06@exocet.mentec.ie>, richard@exocet.mentec.ie writes:
> 
> 
> 	Does anyone know an effective way of recovering from an FDISK disaster -
> I "Fdisked" the wrong device !
> 	I know PC-Tools and the Norton Utilities will recover DELETED
> files but can they be used in my situation ?
> 	I need to restore 2/3 un-backed-up directories.
> 
>                                             
I usually consider myself much of an expert on PCs and DOS systems, but
here I am in unfamiliar territory, so proceed with caution.

I've never actually tried this, but I doubt it can hurt any worse than
what you already did.  Basically, FDISK under most MS-DOS versions
doesn't actually do anything except rewrite the partition table on your
disk.  While this is extremely dangerous, it _should_ leave the actual
disk contents alone.  So, the first move would be to re-FDISK the disk
and reset the partitions back to where they were.

In case I'm wrong about how much actual damage FDISK does, even if the
FAT's of your partitions have been destroyed (which is what FORMAT does,
not FDISK, as far as I know), you should be able to recover most of your
small or contiguous files using either PC-TOOLS or Norton.

If you're using DR-DOS, I think you're lost because their FDISK also
formats the partition, clobbering the FAT and (I think) the file data as
well.  Also, the Compaq version of FORMAT actually rewrites every sector
in the file system being formatted, thus also wiping out your data (now
_that_ I have done, much to my regret - lost two months of work because
my backup also failed to restore - different versions or something).

The only other way would be to go buy a book which talks about these
particular subjects (I don't know the names of any, sorry) and do it by
hand with a sector editor (a la PC Tools, among others).

Good luck!  Make sure you check with a true expert on FDISK before doing
what I suggested - you may regret it if you don't.

-- 
Mark A. Hull-Richter    UUCP:     ccicpg!mhr    In all things, restraint,
ICL North America                                 especially with respect
9801 Muirlands Blvd                               to posting articles and
Irvine, CA  92713       (714)458-7282x4539        doubly so for flames.

oneel@heawk1.rosserv.gsfc.nasa.gov ( Bruce Oneel ) (03/20/91)

A columnist for Micro Conocopia (Misspelled, but my eyes tear up when
I think that it isn't published anymore) had a problem where a new
piece of necessary software trashed the partition table.  What he basically
did was write a program to copy it to a file, and the copy it from a
file back to the disk.  That way he could just reboot off of a floppy
and copy the partition table back in place, reboot, and continue.  He
had no problems with this, and on simtel20 try PD1:<MSDOS.MICROCORN>.

To solve your problem though, you probably should be able to just re
fdisk the disk.  Hope you had good backups.

bruce
--
| Bruce O'Neel              | internet : oneel@heasfs.gsfc.nasa.gov|
| Code 664/STX              |     span : lheavx::oneel             |
| NASA/GSFC                 |compuserve: 72737,1315                |
| Greenbelt  MD 20771       |  AT&Tnet : (301)-286-1119            |

cdb@waikato.ac.nz (Craig D. Beere) (03/21/91)

I don;t know how you can recover from FDisk now, but I can suggest how you can
recover from it if you prepare beforehand...

PC Tools:
1. Run MIRROR/PARTN to save your partition info to a floppy disk.  You can get
   this back with RESTORE/PARTN.
2. Run MIRRIR heaps (like in you AUTOEXEC.BAT, your MENU.BAT, ...) to save the
   status of the root directory, both FATs and the Boot area of the disk.
   THis makes it heaps easier to recover from something drastic.

Norton Utilities has the same tools, I can't think of their names just now.

/*******************************************************************************
** Craig D. Beere  (a.k.a. ++Byron)
** cdb@waikato.ac.nz
*/
#include <standard_disclaimer>
#include <witty_quote>

bking@nro.cs.athabascau.ca (Barry King) (03/21/91)

mhr@mendip.UUCP (MHR {who?}) writes:

> In <2697.27e2ce06@exocet.mentec.ie>, richard@exocet.mentec.ie writes:
> > 
> > 
> > 	Does anyone know an effective way of recovering from an FDISK disaster -
> > I "Fdisked" the wrong device !
> > 	I know PC-Tools and the Norton Utilities will recover DELETED
> > files but can they be used in my situation ?
> > 	I need to restore 2/3 un-backed-up directories.
> > 
> >                                             
> I usually consider myself much of an expert on PCs and DOS systems, but
> here I am in unfamiliar territory, so proceed with caution.
> 
> I've never actually tried this, but I doubt it can hurt any worse than
> what you already did.  Basically, FDISK under most MS-DOS versions
> doesn't actually do anything except rewrite the partition table on your
> disk.  While this is extremely dangerous, it _should_ leave the actual
> disk contents alone.  So, the first move would be to re-FDISK the disk
> and reset the partitions back to where they were.
> 
> In case I'm wrong about how much actual damage FDISK does, even if the
> FAT's of your partitions have been destroyed (which is what FORMAT does,
> not FDISK, as far as I know), you should be able to recover most of your
> small or contiguous files using either PC-TOOLS or Norton.
> 
> If you're using DR-DOS, I think you're lost because their FDISK also
> formats the partition, clobbering the FAT and (I think) the file data as
> well.  Also, the Compaq version of FORMAT actually rewrites every sector
> in the file system being formatted, thus also wiping out your data (now
> _that_ I have done, much to my regret - lost two months of work because
> my backup also failed to restore - different versions or something).
> 
> The only other way would be to go buy a book which talks about these
> particular subjects (I don't know the names of any, sorry) and do it by
> hand with a sector editor (a la PC Tools, among others).
> 
> Good luck!  Make sure you check with a true expert on FDISK before doing
> what I suggested - you may regret it if you don't.
> 
> -- 
> Mark A. Hull-Richter    UUCP:     ccicpg!mhr    In all things, restraint,

I've succesfully done what Mark describesut be careful - some 'sector' 
editors will write out a cluster at a time even though you may only be 
editing what appears to be a sector.  I trashed part of the FAT once when 
I thought I was only changing the boot record.  I think Norton will 
handle this correctly but proceed with caution or you may end up having 
to patch the lost directories back into existence by hand...it works but 
it is _very_ tedious...

Barry King             ersys!bking@nro.cs.athabascau.ca
Edmonton Remote Systems:  Serving Northern Alberta since 1982

hanke@nessie.cs.id.ethz.ch (Norbert Hanke) (03/21/91)

NDD (Norton Disk Doctor) out of Norton Utilities V4.5 (I don't know about
V5.0) will do the job for you, automatically. I did it twice with clobbered
partition tables, both times with no loss of any data previously stored on
the disks.

Norbert Hanke
ETH Zurich, Switzerland