Sunday, February 17, 2008

restoring a dell laptop (and fixing the mbr)

from http://www.goodells.net/dellrestore/recover.htm
(I had to use the manual procedure)

Automatically Restoring the Ghost Image (DSR-DOS) If the hard disk passes DSRcheck's scrutiny, the autoexec.bat script asks you (twice!) to confirm that you wish to overwrite the XP partition. Then it launches the script file c:\bat\recover.bat, which in turn automatically runs c:\bin\recover.exe to restore the Ghost image file, c:\img\fi.gho. (Note to reader: recover.exe is a Dell-branded, crippled variation of Symantec Ghost 2003--it will only restore an image file, it will not copy a partition, create an image file, or work over a network. Ghost 2003 can be used to read and write image files compatible with recover.exe.) The script restores the Ghost image to the disk's second partition. This partition must be pre-existing (and DSRcheck would have checked that earlier). The size of the partition does not matter, as long as it is at least large enough to contain the contents of the restored image. Even if you have resized the partition, the Ghost restore can still work--provided you get by DSRcheck in the previous step. Note that all data previously existing on the second partition will be lost when the partition is overwritten with the Ghost image. However, no other partitions are overwritten. If you had previously repartitioned the hard disk to separate your own data, that data will not be lost. The Dell PC-Restore process does not restore the original partition structure, it only restores the second partition to its original contents. After the Ghost restore has completed, the autoexec.bat script temporarily mounts the DellUtility partition as the 'D:' drive so it can reset that partition's bootup files to the sealed state. Finally, you are prompted to reboot. The computer is now in the sealed state, just as it was when it was shipped. When the computer is next booted, it will show the Dell EULA and Service Tag screens before proceeding to load Windows. It should be emphasized that any changes that break Ctrl+F11 or DSRcheck do not compromise the integrity of the Ghost image. A savvy user can bypass DSRcheck's automated abort, manually launch recover.exe, and restore the Ghost image successfully. It's only the automated procedure that isn't that smart.) The Ghost image is intended to be restored without user intervention. The rest of the information below is only for users who wish to bypass the automated procedure and access the restore image manually.




The following procedures make use of Symantec/PowerQuest's Partition Table Editor. This utility comes in a 16-bit version for DOS (ptedit) and a 32-bit version for Windows (ptedit32). If you have the Symantec/PowerQuest Partition Magic program, both files can be found on the program's installation CD. If you do not have the CD, older versions can be downloaded from the links shown here.
(Note to reader: this utility allows you to directly edit the partition table. The partition table is the hard disk's index to the actual partitions on the disk. Ptedit does not create or edit the actual partitions, only the index to those partitions.)
Manually Restoring the Ghost Image (DSR-DOS)
Obtain the ptedit.exe utility. Copy the file to some place you will be able to run it from when booted to DOS, such as a floppy disk, CD, or USB flash drive.
Bypass the Dell MBR. Boot to DOS, load a mouse driver, and run ptedit. Use ptedit to change the 'Type' code of the third partition from 'DB' to '0C'. Make the third partition active by changing the 'Boot' indicator to '80'. (Note there must be only one '80', so zero out the '80' in any other rows.) Now when you reboot, the third partition will become the C: partition.
Boot to DOS. You cannot boot directly from the third partition because you won't be able to keep its autoexec.bat file from running automatically. So boot from a Win98 boot disk. Note a DOS 6.2 or Win95 boot disk will not be able to access the third partition because of its FAT32 format, so make sure you use a Win98 or ME boot disk. Once you've booted to (usually) the A: prompt, switch to C: and you should be able to see all files in the restore partition.
Restore the Ghost image. Launch c:\bin\recover.exe. Locate the source file, c:\img\fi.gho, and restore it to the disk's second partition. (See here for step-by-step instructions.)
Warning: Do not use c:\bat\recover.bat. This is a script file to run recover.exe without user intervention while within the DSR environment. Since you are not letting DSR go through it's normal system pre-checks, it is unwise to let recover.exe run without user intervention.
Restore the partition table. Launch ptedit again and change the partition-type bytes to their regular values (DE, 07, and DB) and make the second partition the active partition.
The restored Windows partition will startup the next time the computer is booted.
Saving a Copy of the Ghost Image (DSR-DOS)
To save a copy of the Ghost backup image onto a DVD, you must first gain access to the DSR partition. Note this procedure requires a DVD burner, as the files are too large to fit on CD.
The following procedure can be used to save a copy of the Ghost image from a DSR-DOS partition.
Obtain the ptedit32.exe utility. Although you can use ptedit as described elsewhere, there's no need to boot to DOS for this task, so it's easier to instead use ptedit's 32-bit cousin, ptedit32.
Expose the restore partition. From XP, launch ptedit32.exe and use it to change the 'Type' code of the third partition from 'DB' to '0C'. (Note: you will not be rebooting into DOS, so do not change the active partition.) XP will now recognize this as an ordinary FAT32 partition, so reboot and XP should give the new partition a drive letter. With a drive letter, you can easily access the files on the partition.
Copy the Ghost image. Copy the following files from the restore partition to DVD: bin\mouse.exe, bin\recover.exe, img\fi.gho, and any img\fi00000*.ghs files.
Rehide the restore partition. Launch ptedit32 again and change the 'Type' code from '0C' back to 'DB'. Reboot and the restore partition should be hidden again.
If you should ever need to restore from this DVD, you would boot from a DOS boot disk that includes CD support (such as the Dsrfix CD or an ordinary Win98 boot floppy), switch to the CD/DVD drive letter, load the mouse driver, then launch recover.exe. From here you would manually guide recover.exe through the process of restoring the fi.gho image, just like you would in Ghost 2003.
Note: to do a "partition-from-image" restore, recover.exe expects the destination partition to exist already. If you are upgrading to a new, unpartitioned hard disk, use your favorite method to create a partition before restoring the contents into it from the image. Partition size is not critical, as long as it is large enough for the contents of the image.
(Note to reader: you can use the above procedure to save the Ghost image from a DSR-PE partition, but a DSR-PE partition will not have the mouse driver or recover.exe files. You will need to supply your own copy of Ghost 8.3 in place of recover.exe.)
Back