Automatically Connect to a GhostCast Session using a Menu on Bootable Symantec Ghost CD Guide by Kemp Langhorne
Original concept by: Kemp Langhorne and Brian Davis
Updated November 02, 2008

 
Ghost Boot Menu
 

Table of Contents:

Introduction:

The following is a guide for creating a bootable Ghost CD that will prompt the user with a menu. Depending on the menu option chose, it will automatically connect to a GhostCast session. The menu is created from a batch file placed within the boot CD. The menu contains Ghost command line switches that automatically connect Ghost.exe to the desired GhostCast session. The main point of the CD with the menu is to speed up the process of connecting computers to certain GhostCast sessions. Normally, one would manually connect each one. With the menu, it is done automatically and doesn' 't require any user interaction beyond choosing the session to connect to.

Important: A GhostCast session must be setup before a user can connect using the menu system. When I use this CD, I create the GhostCast session, connect 30 computers to the session, then click start within the GhostCast Server console.

Example: The user boots the CD. A menu appears on the screen that gives him/her several options on GhostCast sessions to connect to. The user selects a choice and the CD automatically connects to the session. The user then goes to the GhostCast Server console and starts the starts the image transfer.

The following is a guide that will tell you how to create the bootdisk, create the menu, add the necessary files to the boot disk, and burn it to a CD. Before we being, read the requirements section and make sure you have all the files needed.

Need help? If you get stuck somewhere, or have issues getting something to work. Then post in the forum and someone will help you.

Requirements:

Universal TCP/IP Network Bootdisk (http://www.netbootdisk.com/)
This is the heart of everything. This program creates the bootable image with all the IDE/SATA/network drivers you will need. I used revision 6.01 for this guide.

Symantec Ghost
You will need the DOS based Ghost.exe file found on the Symantec Solutions Suite CD. I have test this with Ghost version 8 and 11. We stopped using 8 because it would not work correctly with Windows Vista. Version 11 is what we use now and what this guide and command line switches are based on. The versions I use come from the corporate editions of the Symantec Ghost software.

WinImage (http://www.winimage.com/download.htm)
We need WinImage to extract/read the files that the Universal TCP/IP Network Bootdisk creates on the floppy. We will also use it to inject the menu into the floppy disk image. The evaluation version will do everything we need it to. I used version 8.10 for this guide.

Choice.com (Google Search )
This is an old DOS file that will allow the menu to work. The best way is to search on Google for the file itself. Without this file, the menu will only appear shortly and will error out. So, find this file!

Nero Burning Rom
We need Nero or something else that can create bootable CDs from .IMA image files. Nero, specifically, Nero Burning Rom, has a section that will burn bootable CDs from floppy image files. I am not sure if Nero Express has the ability to burn .ima files as an image. Nero 7 was used for this guide. I have used Nero 6 and got the same results.

1 x Floppy Disk
The Universal TCP/IP Network Bootdisk requires a floppy disk for the install. We will use WinImage to pull the image off the floppy.

1 x Blank CD-R
We need a blank CD-R to burn with Nero. This CD is the final product. You probably will want a couple blank CD-Rs.

Create a Windows XP Startup Disk

The Universal NetBootdisk requires a floppy disk formatted as a MS-DOS startup disk. We will go ahead and take care of this requirement with the following steps.

  1. Go to My Computer
  2. Right Click on the A: drive and select “Format…”
  3. In the new window, click “Create and MS-DOS Startup Disk” check box
  4. Press the Start button to begin the formatting
Format Disk
Create an MS-DOS startup disk

Create the Universal TCP/IP Network Bootdisk

The Universal TCP/IP Network Bootdisk is used to boot the menu. After you download the program, extract the files to a folder on your desktop. After that, follow the below steps.

  1. Inside the extracted folder, there is a batch file called MakeDisk.bat. Double click to open it.
  2. A new blue window will open. The program informs us that we need “A formatted Windows XP Startup Disk ” to continue. Since we have already done this, insert the disk we created early and press any key.
  3. You will be prompted about your floppy drive letter and if you are using a floppy disk. Answer the prompts accordingly.
    Note: MakeBootDisk gave me an error about an improper bootdisk when I pressed enter instead of typing A: as my drive letter. If you get this error, just type in the letter of your floppy drive instead of just using the default.
  4. MakeDisk will now copy the necessary files to the floppy disk. It might take a minute to finish.
  5. The floppy disk is now created. Leave the floppy in the drive for the time being. We will need it in a later step.
Universal TCP/IP Network Bootdisk
Universal TCP/IP Network Bootdisk window

Create Menu System Batch Files

The following is the batch menu. When boot the CD you will be prompted with a menu that will automatically connect to various GhostCast sessions. First off, I will break down the different parts of the script. After the break down, you will find the entire script.

Note: I used the sesion names ONE, TWO, THREE, etc. Be sure that you don' 't confuse ONE and 1 when you go to setup your Ghostcast sessions.

echo 1 - Join Ghost11 to multicast session ONE - Create Image Only.
This section is what appears on the menu when you boot up. Note that the “1” on the left side only informs the user to press the number 1. It does no mapping to the character to a function. We will use the Choice.com file for that.

 

choice Your choice: /c:12345678
if errorlevel 8 goto exit
if errorlevel 7 goto ghost
if errorlevel 6 goto lab6
The numbers 12345678 are the characters that the menu will accept. If you want to add number 9, then your choices would look like "123456789". The "if errorlevels" match to the character that may get pressed. For example, if I press number 7 in the menu, it will go to errorlevel 7. Then, errorlevel 7 says that character 7 means go to the "ghost" line in the script.

 

:lab1
echo Joining GhostCast session ONE
r:
ghost.exe -ib -ja=ONE -sure -rb -z5
goto exit
The "if errorlevel goto" statements match to one of the ":lab" lines. The line above tells Ghost to join GhostCast session "ONE." The "r:" line is the drive letter to the CD-ROM drive. This letter may change depending on if you have more than one hard drive. If "r:" doesn' 't work, then try "s:". Take a look at the next section for what the command line switches used on Ghost.exe mean.

Within the Menu batch files, there are command line switches used for Ghost.exe. Below are the ones we used and what they mean. Your situation may vary.

-JA=SessionName | Connects to the GhostCast server using the name specified
-IB | Forces a sector-by-sector copy of the entire boot track and not just the boot sector
-WD- | Turns off Disk Write caching
-WS- | Turns off Disk Read caching
-RB | Forces an automatic reboot after the session completes
-SURE | Avoids prompts like “Partition size correct?”
-Zx | Where "x" is the amount of compression used. 1 = Fast transfer rate with low compression. 3 to 9 = Highest compression level but slowest transfer rate.
These are the various Ghost.exe command line switches uses in the batch file. They were found at Symantec Support with an article title of “Switches: Alphabetical List of Switches.” Symantec changes there links around every now and then, so this might stop working.

Below is the menu.bat script. Open Windows Notepad. Copy and paste the following contents into it and save it to your desktop as Menu.bat. Remember the .bat extension. Don’t save it as a .txt file!

Menu.bat:
@echo off
:start
cls
echo --------------------------------------------------------------
echo 1 - Join Ghost to GhostCast session ONE - Create Image Only.
echo.
echo 2 - Join Ghost to GhostCast session TWO - Create Image Only.
echo.
echo 3 - Join Ghost to GhostCast session THREE - Create Image Only.
echo.
echo 4 - Join Ghost to GhostCast session ONE - Restore Image Only.
echo.
echo 5 - Join Ghost to GhostCast session TWO - Restore Image Only.
echo.
echo 6 - Join Ghost to GhostCast session THREE - Restore Image Only.
echo.
echo 7 - Open Ghost
echo.
echo 8 - Exit
echo.
echo ---------------------------------------------------------------
choice Your choice: /c:12345678
if errorlevel 8 goto exit
if errorlevel 7 goto ghost
if errorlevel 6 goto lab6
if errorlevel 5 goto lab5
if errorlevel 4 goto lab4
if errorlevel 3 goto lab3
if errorlevel 2 goto lab2
if errorlevel 1 goto lab1
 
:lab1
echo Joining GhostCast session ONE
r:
ghost.exe -ib -ja=ONE -sure -rb -z5
goto exit
 
:lab2
echo Joining GhostCast session TWO
r:
ghost.exe -ib -ja=TWO -sure -rb -z5
goto exit
 
:lab3
echo Joining GhostCast session TWO
r:
ghost.exe -ib -ja=THREE -sure -rb -z5
goto exit
 
:lab4
echo Joining GhostCast session ONE
r:
ghost.exe -WS- -WD- -ja=ONE -sure -rb
goto exit
 
:lab5
echo Joining GhostCast session TWO
r:
ghost.exe -WS- -WD- -ja=TWO -sure -rb
goto exit
 
:lab6
echo Joining GhostCast session THREE
r:
ghost.exe -WS- -WD- -ja=THREE -sure -rb
goto exit
 
:ghost
r:
ghost.exe
goto exit
 
:exit
r:
exit

The Logon.bat file will be used to call the menu.bat file we created earlier. Open Windows Notepad. Copy and paste the following contents into it and save it to your desktop as Logon.bat. Remember the .bat extension. Don’t save it as a .txt file!

Logon.bat:
@echo off
echo.
echo Loading menu.bat....
echo.
menu.bat

The menupref.bat file is the normal logon menu that comes with the Universial TCP/IP Network Bootdisk. The modifications made are in bold. The time that the menu is displayed is decreased, CD support has been enabled, and the logonscript is referenced to Logon.bat. When you enable the CD support, it will give us access to the Ghost.exe file we will place using Nero. When I enable CD support, my CD-ROM drive become "r:." If you have issues later on, read the troubleshooting section at the bottom.

Menupref.bat:
@echo off
REM The Menu Program reads/writes to this file. Please boot the disk and allow the Menu Software to modify this file. The password field is Encypted!
REM *** Do not change the order of the commands in this batch file. (Or the Position of the equal signs!) ***
rem NETCARD=B57
Set WORKGROUP=WORKGROUP
Set USERNAME=Administrator
::: PASSWORD=
Set DISABLEDHCP=0
Set IPADDRESS0=192 168 0 123
Set SUBNETMASK0=255 255 255 0
Set DEFAULTGATEWAY0=192 168 0 254
Set LOGONSCRIPT=Logon.bat
rem TIMEOUT=1
Set DNS=192 168 0 253
Set WKSTN=BD4703333
Set PACKET=1
Set DNSENABLE=1
Set MOUSE=1
Set REDIRECTOR=BASIC
Set NTFS=0
Set CD=1
Set UDMA=0
Set WINS=192 168 0 252

Extract/Read the Files Off the Floppy Disk

For this step, we will use WinImage to extract/read the files off the floppy disk that the Universal TCP/IP Network Bootdisk created. We will save the files to an image file after we read the disk with WinImage. Follow these steps to read the floppy disk and build the floppy disk image.

  1. If the floppy disk we created earlier is not in the drive, go ahead and insert it.
  2. Open WinImage.
  3. In the menu bar, click Disk and select “Read Disk”
  4. The program will now copy the files off the floppy disk into an image file. The contents it copied will be displayed.
  5. Save the file. Go to the File menu and select “Save As…” Save the file to your desktop. It is important that you save the file as an “Image file (*.ima).” We will need the .ima format for Nero.
  6. Leave WinImage open for the next step.
WinImage
Reading the floppy disk with WinImage

Copy the Files into WinImage

For this step, we will use WinImage to copy the batch files we created earlier into the floppy disk image.

  1. Find the two batch files we created earlier (logon.bat and menu.bat). Also, find the Choice.com and menupref.bat.
  2. Within the WinImage file tree, browse to \\NetBoot\\FileCopy. Select and drag the files we created earlier, plus Choice.com, and menupref.bat into the W inImage window in the proper location.
     
    The correct location of each file is a follows:
  3. Like we did in the last section, save the file. Go to the File menu and select “Save As…” Save the file to your desktop. You might want to save this file under another name to keep the previous file separate. The file we save here is the file we will be using from now on. Remember, It is important that you save the file as a “Image file (*.ima)” We will need the .ima format for Nero.
WinImage
Injecting files we created earlier into WinImage

Burn to Nero and Add Ghost.exe to the CD

In the next steps we will use Nero Burning Rom to burn the DOS based Ghost.exe and the .ima image we created earlier.

  1. Open Nero Burning Rom. If the "New Compilation" window does not appear, go to File and chose "New."
  2. Within the "New Compilation" window chose the "CD-ROM(Boot)" boot option
  3. On the right side of the window you will see several options relating to boot images. Click the radio button that says "Image file" and browse to the location were you placed the .ima file we saved with WinImage
  4. At the bottom of this window, click the "Enable expert settings (for advanced users only!)." For the "Kind of emulation" chose "Floppy Emulation 1.44MB." Keep the rest of the settings the same. "Load segment of sectors (hex!): 07C0" and "Number of loaded sectors: 1"
  5. After entering in the settings, click the "New" button. The window will go away and you will see your new compilation. You will not see any files, this is ok.
  6. Take the Ghost.exe file and drag it into the window. Ghost.exe will be the only file listed in the window. Any file added here will appear in the "r:" drive when you boot the CD.
  7. Burn the CD. You are done!
Nero Burning Rom
Creating a new boot CD compilation with Nero Burning Rom

Using Your New CD

Now that we have the CD burned, let' 's test it!

  1. Create a GhostCast session that matches ONE, TWO, THERE, or whatever you named the session in menu.bat. Depending on if you what you want, choose to create or restore an image. Reference the images below for the correct settings. You MUST click the "show More Options>>" button to change the settings so it will work. The main advance setting to change is to click the up arrow once on the "Disk No." choice. This will automatically add the correct command line options to the GhostCast Server. Lastely, tell the GhostCast session to accept clients.
  2. Option 1: Restoring an image: Ghsotcast
    Inside the Symantec GhostCast Server Console set to session ONE and set to restore an image

    Option 2: Creating a new image: Ghostcast
    Inside the Symantec GhostCast Server Console set to session ONE and set to create a new image

  3. Reboot a computer with the bootable CD in it. When the menu appears, chose the session name that matches the what you created on the GhostCast Server console.
  4. Ghost should automatically start and connect to the session. The computer will appear within the GhostCast Server Console.
  5. Send the image using the GhostCast Server Console. Your computer should now be reimaging (or creating the image)!

Troubleshooting

If your reading this section, you probably missed a step. You should probably review all the information above. If you still can get things working, read the below.

The GhostCast session names used in my menu.bat file are ONE, TWO and THREE. If you change these names in menu.bat, you will need to change the "-ja=session name" switch as well to match the correct session.

If you get error message when you are imaging, remove some of the command line switches used in menu.bat. The switches I used work with XP and Vista. Also, the switches used are ment for Ghost version 11 and might not work with older versions.

The "r:" in the menu.bat file is the drive letter to the CD-ROM drive. If you have more than one hard drive, then this letter will be different. If you have two hard drives, the letter will be "s:" instead of "r:." Just change this in the menu.bat file and everything will work normally. Or, you can boot the CD and exit the menu by pressing 8, or whichever key you chose to exit. You will not be in the DOS prompt. Type "R:" and see if command will change to that drive letter. If it does, then do a "dir" and see what the contents are. If it is the CD, then you should see "Ghost.exe." If not, then type "S:" and see if the drive letter changes and then do a "dir" if it does. Keep trying this until you find the proper CD drive letter.

Remember to use the same Ghostcast session name as you did in your menu.bat file. ONE is not the same as 1!

If you still have issues, post in the forum. I will do my best to help. The forum link is located on the left navigation bar.

Forum