Smurfsworld
Okay...so, building a DOS menu for a boot screen that gives you choices:
I will pull in the *config.sys* and *autoexec.bat from
Creating Bootable CD/DVD's Without A:\Floppy Driveso:
Quote:[config.sys]
device=oakcdrom.sys /d:nightowl
lastdrive=z
and:
Quote:[autoexec.bat]
path=a:\;x:\
mouse.com
mscdex.exe /d:nightowl /l:x /m:16 /v
ghost.exe
I note that you have chosen to use the 2.88 MB boot sector. But for those who may not have a burning program that supports that, I will use the standard 1.44 MB boot sector, and show how to put Ghost on the data portion of the CD. More about that later.
Quote:Backup Hard disk 1 partition 1 to hard disk 1 partion 2
Restore Hard Disk 1 partition 1 from hard disk 1 partition 2
You want two menu choices as noted above--so I will call those two choices menu item *backup* and menu item *restore*. And I will add a couple additional items to make this Ghost boot disc a little more generally usable!
So, in config.sys you add the [menu] command to tell the boot sequence that this is going to be a multi-configuration boot, and then define your menu item choices--and then to automate things--add a *menudefault* command so the procedure you will use most often will occur without further input after a certain amount of time (but, by hitting any key, the countdown will stop and you can choose whichever choice manually)--and just to spice up the menu appearance--I will change the background and text color *menucolor* command:
Quote:[config.sys]
[menu]
menuitem=backup, Backup Hard disk 1 partition 1 to hard disk 1 partition 2
menuitem=restore, Restore Hard Disk 1 partition 1 from hard disk 1 partition 2
menuitem=ghost, Run Ghost Interactively (Manually)
menuitem=dos_prompt, Boot to DOS Prompt Only
menudefault=auto,30
menudefault=backup,30
menucolor=15,1
device=oakcdrom.sys /d:nightowl
lastdrive=z
Now, if both configurations will have certain *common* DOS drivers, you put those under the [common] command, then add the individual menu item categories--if they have DOS drivers that are specific to one of them, that would be listed here--if not, list the item categories, but leave the area below the headings *blank*:
Quote:[config.sys]
[menu]
menuitem=backup, Backup Hard disk 1 partition 1 to hard disk 1 partition 2
menuitem=restore, Restore Hard Disk 1 partition 1 from hard disk 1 partition 2
menuitem=ghost, Run Ghost Interactively (Manually)
menuitem=dos_prompt, Boot to DOS Prompt Only
menudefault=auto,30
menudefault=backup,30
menucolor=15,1
[common]
device=oakcdrom.sys /d:nightowl
lastdrive=z
[backup]
[restore]
[ghost]
[dos_prompt]
Now, on to the [autoexec.bat] file. I have set the *echo* to *on* so you see the processing of the commands. If you are saving your image files to a NTFS partition, on certain systems, the time/date stamp for the image files will be inaccurate unless you set the *timezone*, i.e. *set TZ=....* (see here for more info--
How to Set a Time Zone for Image for DOS), and setting the path helps DOS find the programs referenced in the command lines.
There is no similar *common* command for autoexec.bat, so whatever DOS drivers are needed for each configuration, those commands need to be in each configuration:
Quote:[autoexec.bat]
@echo on
SET TZ=GHO+08:00
path=a:\;x:\
goto %config%
backup:
mouse.com
mscdex.exe /d:nightowl /l:x /m:16 /v
cls
echo.
echo You are about to over-write your
echo previous backup image!
echo.
echo Do you wish to continue? A "No" response
echo will take you to a DOS Prompt.
echo.
choice Do you wish to continue?
if errorlevel 2 goto end
if errorlevel 1 goto backup_yes
backup_yes:
ghost.exe -clone,mode=pdump,src=1:1,dst=1:2\image.gho -sure -fx
if errorlevel 1, goto Problem
ghost.exe -chkimg,1:2\image.gho -fx
if errorlevel 1, goto Problem
goto end
problem:
echo.
echo There has been an error reported by Ghost.
echo This needs to be investigated!
echo.
pause
goto end
restore:
mouse.com
mscdex.exe /d:nightowl /l:x /m:16 /v
cls
echo.
echo You are about to over-write your Disk 1,
echo 1st Partition with a backup image!
echo.
echo Do you wish to continue? A "No" response
echo will take you to a DOS Prompt.
echo.
choice Do you wish to continue?
if errorlevel 2 goto end
if errorlevel 1 goto restore_yes
restore_yes:
ghost.exe -clone,mode=pload,src=1:2\image.gho,dst=1:1 -sure -fx
if errorlevel 1, goto Problem
goto end
ghost:
mouse.com
mscdex.exe /d:nightowl /l:x /m:16 /v
ghost.exe
goto end
dos_prompt:
mouse.com
mscdex.exe /d:nightowl /l:x /m:16 /v
goto end
end:
I have not had time to trouble shoot the above boot menu--it's late and I'm tired--so there may be *bugs*--I would remove the *-sure* switches and run everything manually to make sure it works *as advertised* before adding back in the *-sure* switches.
I will try to test it in the next day or two.
When creating the boot image--you can leave *ghost.exe* out of the list of files to be in the boot image--and instead burn it to the data portion, root directory of the CD--once the DOS optical drive drivers are loaded, you can then access the *ghost.exe* on the data portion of the disc--and so you can leave the boot sector size at 1.44 MB, and there should be plenty of space.