9 June 2008 - 2:08Creating a Win98 Restore Partition
Tired of having to work on the old family clunker every time you go home for a visit? Well I sure am. Every time I am down I find myself sitting up into the wee hours of the morning downloading utilities to help rid the countless viruses and spyware from it. Well I am sick of it, so last time I had to format and reinstall it, I created myself a folder where I placed several handy utilities such as Ad-Aware. Well its no surprise that the last time I went down, my utilities were gone and the computer was beyond repair. This time I decided something had to be done, but what? Its windows 98 for godsake.
I thought about using deep freeze, but I could just hear them complaining now. I tried to install such and such and its always gone after we reboot. I didn’t want that either, as even the antivirus would lose any updates after a reboot. So I formulated a plan. I was going to create a restore partition come hell or high water. The below describes how to do this.
Let me first describe the hardware I have to work with. The PC itself is a Intel Pentium 266Mhz with 64MB DIMM and a 8Gb hard disk.
The first step was to create 3 partitions on the hard disk, because its windows 98 I was limited to using a single primary partition, and two logical partitions. I gave c: 2GB, d: 1.5GB and e: the remaining space. The d: partition is going to be for me. A secret partition where I can keep all my files and the restore image. When done, I formatted each partition and ended up with the following layout.
c:\ 2GB System d:\ 1.5GB Restore e:\ 4.5GB Data
With that done, I installed windows 98 as normal, and installed all applications and updates as necessary. I also installed Partition Magic as we will need to convert the Restore partition to a primary partition so we can boot from it later. Once the system is the way you want it and any data is restored as needed. In this case anything on e:\ will not be wiped when the system restore is launched, So I pointed silly stuff like My Documents to e:\ and moved a lot of the user files there.
As you will need Ghost for this project, its wise to install it now as well, using it to create a ghost floppy, once you have the floppy created copy ghost.exe to the d: partition. Also copy the ghost.env file from the c:\program files\ghost\ directory to d:\. You will need this so we can automate the restore process. I placed both of these files in a directory called d:\apps\ghost\. Once that is done you can uninstall ghost. Also now is an ideal time to use partition magic to convert the d: partition to primary. It will complain about possible file corruption but just ignore those warnings.
Next from a command window, I created a system on the restore partition.
C:\>sys c:\ d:\ System Transfered C:\>
Once that was done, I copied all the files from my windows 98 boot disk. Be advised this is not the same as the windows 98 setup boot disk. Instead its just a standard boot disk. If you don’t have one, you can get one from bootdisk.com. I also copied doskey, choice.com and mouse.com to make my life a little easier. I then modified the autoexec.bat to read as the following.
@echo off path=c:\;c:\apps\ghost\ mouse doskey call restore.bat
My config.sys contains the following.
device=himem.sys
And finally after an extensive battle, I was able to write this batch file that prompts for confirmation before beginning the restore. *Please note when using the dos command choice, the order you detect the ERRORLEVEL is crucial. As if the first IF statement returns true, the ERRORLEVEL is set to 1, and your logic will be out of whack.
@echo off cls echo. echo This will restore the system. echo All data on c: will be lost. echo. choice Continue restore IF ERRORLEVEL 2 goto cancel IF ERRORLEVEL 1 goto restore goto end :restore cls echo. echo The system will now be restored. echo. c:\apps\ghost\ghost.exe -clone,mode=pload,src=c:\sysimage\win98.gho:1,dst=1:1 -sure cls echo. echo The system has now been restored. echo Please restart the system. echo. pause c:\restart.com goto end :cancel cls echo. echo System restore cancelled. echo. echo Your system will now restart. pause c:\restart.com :end
With that out of the way, I installed a boot manager called XOSL (Extended Operating System Loader). Which is available for free at ranish.com. It comes with extensive documentation and installs easily. I installed it to the d: partition as later I will hide this from windows 98. Thus keeping it safe and out of the reach of my family. When its installed, reboot and setup a new boot option for the restore partition. I also took the time to edit the windows 98 option hiding the restore partition. Also take the time to set passwords on the configure and options menus.
With that complete boot back into windows, removing applications your family shouldn’t be using, such as partition magic and ghost. Complete everything, and configure any thing else that still needs doing or that you would later receive a call about. When the system is to your liking, its time to create the ghost image. Reboot and select the boot option for system restore.
This will boot d: and launch the batch script provided above. When prompted for confirmation select N, then to return to the prompt without having the system reboot, Ctrl+C at the pause menu, terminating the batch job. This will return you to the c:\ prompt, which is actually our restore partition d:\ in windows. Here we will use ghost to create the image of our system. Start ghost and select “partition > to image.” Select the 2GB partition and create the image in c:\sysimage\win98.gho.
Thats it. The hardest part of this is figuring out the switches necessary for ghost to work without prompting. But since that is all in the batch file restore.bat this should work for almost everyone.
I hope this helps someone as I was unable to find any guides on doing this, but I knew it had to be possible.
No Comments | Tags: posts