How to create a bootable CD with DOS

 

Written by:

Table of contents:

0. Some basic information

1. Creating a start diskette

2. Creating the directory structure on the harddrive

3. Preparation for Burning

4. Burning

 

0. Some basic information

It is very simple to create a bootable CD. You only have to know the most important DOS-commands and you have to be able to create a start diskette. Anything else is not a big problem. To creat a bootable CD you need:

a) a computer with a Windows OS
b) a CD burner
c) a good burning program such as Nero
d) some diskettes
e) at least 10 cheap empty CD-ROMs (strictly speaking one is enough - but I learnt that it never works the first time).
f) free space on your harddrive of about double of what you want to burn on your CD because many programs create a temporary image while burning.

Thats all you need.

The idea of the El-Torito-Standard is that you either start a "complete CD" ( e.g. a copy of a hard drive. This is usually nonsense because all drive letters change under DOS. The first hard drive gets letter D when you boot from a complete CD which leads to a lot of chaos) or you start a "virtual diskette drive A:" and after booting install a CD-ROM driver to have access to the rest of the CD. This means that a bootable CD works just the same as if you were to put a diskette into your diskette drive, start the computer and load the CD-ROM driver by activating it in config.sys and autoexec.bat. If you have used a WIN98 start diskette, you have done exactly this.

ONCE AGAIN: THE BOOTABLE CD CONTAINS A "START DISKETTE" AND THE "FILES OF THE CD". THATS ALL. YOU WILL BELIEVE IT WHEN THE CD IS COMPLETE AND YOU BOOT IT (FROM "A:" ON THE CD) AND THEN CHANGE TO THE CD-PART (e.g. W:) AND GO BACK TO A: ALTHOUGH NO DISKETTE IS IN YOUR DISKETTE DRIVE.

As the CD-ROM drive is booting from A: your real diskette drive becomes the drive letter B:. There are no changes to the drive letters C:, D: and so on. If you want to execute DOS commands such as format or diskcopy on your diskette drive you have to type format b: or diskcopy b: b: . Dont forget this if you want to create a menu with automatic commands. If the command is wrong on the CD you cannot change it. (Comment: I know what I talk about. I have burnt more than 50 CD-ROMs for this CD - and made a lot of failures - do you really want to repeat these failures?). Another important tip: NEVER use letters such as ä,ö,ü,ß when writing a text file (this does not look good when you start your CD under Windows. Yes there is a difference between the codepages, remember?) or giving a name to a file. Well, lets start work now.

Back to the table of contents

 

1. Creating a start diskette:

First of all you have to create a start diskette. For standard CDs you can use the start diskette made by Windows 98. I recommend you make the following change to this diskette: Edit autoexec.bat and change mscdex /d:blablabla to mscdex /d:blablabla /L:W (For the FreeDos start diskette substitute shsucdx /d:blablabla /L:W for mscdex /d:blablabla /L:W).

The option
/L:W fixes the drive letter of the CD to the letter W. Of course you can use another letter, but please do not use the letters A, B, C, D or Z as these are usually used by a harddrive or diskette. You cannot use a second CD-ROM drive when using Z (last letter in alphabet). The advantages are very simple: When fixing the drive letter you always know where you can find the files on your CD. If you don't fix it, the drive letter changes depending on the system your are running. It also makes it easier to create an automatic menu. The drive letter W: also has the advantage that the system works even if you have FOUR CD-ROM drives in you system. More than four drives should be unusual.

You can create your start diskette as you like it. If you need the CD to run on many different computers you should make a config.sys and an autoexec.bat with different options as you can find under "Installation disk ". This diskettes contain a lot of drivers for scsi-controllers and other drives. Of course you can change config.sys and autoexec.bat as you want them.

If you are absolutely sure that you will never use a SCSI-controller or something like this you can choose a simpler config.sys or autoexec.bat. If I were you I would keep the options "Load no EMM386-driver" and "Load no HIMEM-driver". There are a lot of programs which do not work when these drivers are loaded. It makes almost no difference in size on your diskette when keeping these options.
If you use the tool "Drive Image" you will find a lot of drivers for SCSI drives and others on the boot diskette.

PS: If you have the file dblspace.bin on your diskette and your harddrive is not compressed remove it. It uses a lot of space and the diskette also runs without it. The following files should be on your diskette under all circumstances: command.com, attrib.exe, choice.com (you will find it at C:\Windows\Command) xmsdsk and zcopy (you can find zcopy.zip at: http://short.stop.home.att.net/freesoft/filutil1.html. These two tools are important for programs which don't work on a write protected diskette - dont forget them!) You can also find them at DOS - Software.

If there is still room on the diskette you could add the mouse driver and the sys command, fdisk (fdisk of WindowsME also works), format and other important programs. The less important files have a place on the CD-part.

If you have done all this, some very important tips:

CHECK YOUR START DISKETTE - CHECK IT AGAIN - CHECK ALL POSSIBLE OPTIONS!  WHILE TESTING AUTOEXEC.BAT REM OUT ALL "@ECHO OFF" COMMANDS SO YOU CAN SEE IF THERE ARE ANY ERROR MESSAGES WHILE RUNNING. YOU CAN CORRECT FAILURES ON THE DISKETTE BUT NOT ON THE CD!  DON'T FORGET MSCDEX /L: OR SHSUCDX /L: DRIVE LETTER!  CHANGE THE PATH IN AUTOEXEC.BAT TO THE DRIVE LETTER YOU HAVE CHOSEN!  WHEN THE START DISKETTE SEEMS TO WORK PUT A CD WITH FILES ON IT INTO THE CD-ROM-DRIVE AND LOOK TO SEE IF YOU HAVE ACCESS TO THE FILES.  IS A MOUSE DRIVER INSTALLED?  DO YOU HAVE ACCESS TO THE SECOND CD-ROM-DRIVE?  REMEMBER, YOU CAN CORRECT FAILURES ON THE DISKETTE BUT NOT ON THE CD!

A Small Comment :

When the CD is burnt you will not see the start diskette under Windows as it is hidden as an image file. If your diskette is working properly you can create an image of it which will be accepted as a "start diskette" by your burning software. On the Internet you can find special software which creates images of 2.8 MB diskettes (which has the advantage that you have more space for drivers or programs). Look for information at: http://www.nu2.nu.
You can find the software to create a 2.8 MB disk image at: http://www.winimage.com/download.html.

A 2.8 MB disk image may have the disadvantage that you may not be able to check out if everything works before the CD is burnt. Such images don't run on some older computers. Some floppy drives do not support the 2.8 MB format on Windows. The advantage to the 2.8 MB format is that you have a lot of space while booting up the diskette part. This maybe helpful when the "CD part" cannot be reached.

Back to the table of contents

 

2. Creating the directory structure on the harddrive:

Create a directory on your harddrive which will contain all the programs that should be on your CD. (In my case this is: C:\_FULL_CD or C:\_LITE_CD). This is the root directory of your produced CD. Copy the programs command.com, zcopy, attrib, xmsdsk, choice into this main directory. Yes, they are on both the diskette and in the root directory. Then add other important root programs such as menue.bat, menue.txt, nohimem.bat, nohimem.txt, noemm386.bat and noemm386.txt For standard DOS commands I propose either the directory DOS or FREEDOS (e.g. C:\_FULL_CD\DOS or C:\_FULL_CD\FREEDOS or C:\_LITE_CD\DOS or C:\_LITE_CD\FREEDOS).

From your Windows 98 system copy all .com and .exe files from C:\Windows\Command to C:\_FULL_CD\DOS or C:\_LITE_CD\DOS.

Also copy all programs which you later want to start from the DOS prompt into this directory (e.g. Norton Commander, Volkov Commander...).
For copying on a FAT32 system I would prefer Volkov Commander instead of Norton Commander because in my tests with Norton Commander scandisk said that FAT 32 had problems and my work was destroyed several times!

If you plan to burn additional software on to the CD you have three possibilites:

1.) You create a directory with an easy to understand directory name for each of these programs (8 letters only!!!),
2.) You create a small (LITE Version) menu (GUI) with which you can start your programs,
3.) You create a bigger (FULL Version) menu (GUI) with which you can start a lot of programs.

Please read this information about "go.bat" first:

As many DOS programs have problems with write protection I recommend you do the following:


Give each program it's own directory. When you are done, you should create a file "go.bat" in this directory. The job of this file is to call the real program. This has several advantages: First of all you can store the name of the program in the batch file (with any special startup options you desire) and then forget the name. As a second advantage you can execute several commands from this batch file (e.g. create a virtual drive letter, copy the program files into the virtual drive, remove the write protection and than start the program). As a third advantage you can use this batch for all three possibilites.


When your program and the file go.bat are in the same directory test if the program works by doing the following: Either execute the command: "attrib +r *.*" in DOS or in Windows mark all files read only (click on the first file, press SHIFT and then click on the last file. Then right mouse click one of the files, select properties and set a marker in the checkbox "Read-only"). Then execute go.bat under DOS - not under Windows if your program requires xmsdsk. If the write protected program works fine from the hard drive it usually will also work from CD (with one exception: the program tries to create a temporary file which of course will not work on a CD - bad luck!). If you are in doubt whether the program will run from CD because of write protection problems use a go.bat which creates a virtual drive. You will find examples of the go.bat for different types of programs on this website (Installation disk - Frame Full or Frame Lite).

 

Possibility 1):


You create one or more directories (8 letters maximum!!) with simple understandable names (e.g. C:\_FULL_CD\SETUP\WIN9x). Copy your DOS program into this directory. Create a file go.bat in each of these directories and modify it as you need it.

Information about go.bat is above. You can start burning as soon as you have created all directories, copied the files into the directory, created a "go.bat" and tested this batch file. The disadvantage of this possibility is that you must be a DOS keyboard fan as you have to type the directory and the commands after each bootup. As an alternative you can move the go.bat files into the root directory, give it another name and modify the path in the new batch file (e.g. 9xsetup.bat: contents: %LW%:\SETUP\WIN9x\setup.exe)

Back to the three possibilities

Back to the table of contents


Possibility 2):

Possibility 1 has the potential disadvantage that you will have to type "dir" after the CD was booted because you forgot the name of your directories. Then you have to type "cd DIRECTORY" and then you can start your program. If your program has problems with write protection you have to upload it to a virtual drive ... A lot of work, isnt it?

Wouldn't it be easier to have a small menu? What about Willy-Billys menu for up to 22 programs. To create it do the following:

For the LITE CD, create on your hard drive the following directories C:\_LITE_CD; C:\_LITE_CD\DOS (put all standard DOS-commands in there), C:\_LITE_CD\MENUE.

Inside the C:\_LITE_CD\MENUE directory create:

MENUE_A, MENUE_B, MENUE_C, MENUE_D, MENUE_E, MENUE_F, MENUE_G, MENUE_H, MENUE_J, MENUE_K, MENUE_L, MENUE_M, MENUE_N, MENUE_O, MENUE_P, MENUE_Q, MENUE_R, MENUE_S, MENUE_T, MENUE_U, MENUE_V, MENUE_W; (NO MENUE_I !!!)

Copy the file go.bat into each of these 22 directories. Create an empty file C:\_LITE_CD\smokey.cd - it is very important because it indicates the drive letter.

Copy menue.bat, nohimem.bat, noemm386.bat, menue.txt, nohimem.txt, noemm386.txt, command.com, xmsdsk, attrib, choice and zcopy to C:\_LITE_CD. Edit the file menue.txt in C:\_LITE_CD. You only have to add the name of your program behind the letters [A= ] thru [W= ]. Thats all. The DOS program which was added behind [A= ] in menue.txt must be copied to C:\_LITE_CD\MENUE\MENUE_A along with it's "go.bat" and the file "go.bat" has to be modified so that the program starts when you execute go.bat. The DOS program which was added behind [W=] in menue.txt must be copied to C:\_LITE_CD\MENUE\MENUE_W.

For programs which need no HIMEM.SYS or no EMM386 we create a directory C:\_LITE_CD\NOHIMEM and C:\_LITE_CD\NOEMM386. In these directories we create directories NO_HIM_A until NO_HIM_W (no I !!!) and NO_EMM_A until NO_EMM_W (still no I !!!). Copy a file go.bat into each directory. Copy the program you want into the directory you want and edit go.bat to make the program work. Then edit nohimem.txt and noemm386.txt and add the program name behind [A= ] until [W= ]. All this is very simple with the prepared execution tool at Installation Disk - Frame Lite . To repeat it again: The letters you have to choose (e.g. C ) appear again at the directory name C:\_LITE_CD\MENUE\MENUE_C. ATTENTION! As Lite-version and Full-version offer to start a different number of programs (22 or 484) the menue.bat / menue.txt in these versions differ - of course the number of directories too. Nohimem.bat / nohimem.txt and noemm386.bat / noemm386.txt are the same. If you have done all these steps (do all go.bat files work?) you can burn your CD. Additional comment : If you have an empty harddrive you can leave out the directory \_Lite_CD and create all directories and files directly at C:\. This has a great advantage: You can test at once if the batches menue.bat, nohimem.bat and noemm386.bat start the program properly because they are made to run from C: as well as from W:, X:, Y: and Z:. If they work properly you will see a menu with your program names and if you click on one of them the program should start.

back to the three possibilities

back to the table of contents

Possibility 3):You create the menue for up to 484 programs as follows:

Create on your harddrive the following directories:

C:\_FULL_CD, C:\_FULL_CD\DOS (put all standard DOS-commands in there) and C:\_FULL_CD\MENUE. Inside the C:\_FULL_CD\MENUE directory create:

MENUE_A, MENUE_B, MENUE_C, MENUE_D, MENUE_E, MENUE_F, MENUE_G, MENUE_H, MENUE_J, MENUE_K, MENUE_L, MENUE_M, MENUE_N, MENUE_O, MENUE_P, MENUE_Q, MENUE_R, MENUE_S, MENUE_T, MENUE_U, MENUE_V, MENUE_W; (NO MENUE_I !!!)

Inside these directories there are 22 subdirectories each which have names like MEN_A_A until MEN_A_W (under MENUE_A) MEN_C_A until MEN_C_W (under MENUE_C) and so on. (Again, NO MEN_X_I where X is one of A, B, C, D, E, F, G, H, J, K, L, M, N, O, P, Q, R, S, T, U, V, or W) When completed you have 484 subdirectories. Copy the file go.bat into these 484 subdirectories. Create an empty file C:\_FULL_CD\smokey.cd - it is very important because it indicates the drive letter.
Copy menue.bat, nohimem.bat, noemm386.bat, menue.txt, nohimem.txt, noemm386.txt, command.com, xmsdsk, attrib, choice and zcopy to C:\_FULL_CD. Edit the file menue.txt in the root directory of your to be created CD (C:\_FULL_CD). In the first 22 entries you can write the name of the program groups (e.g. backup software, virus checker ...) In the following 22 entries in the A-section you can add the name of your program behind [A= ] until [W= ]. (e.g. the name of your backup programs). In the following 22 entries in the B-section you can add the name of your program behind [A= ] until [W= ]. (e.g. the name of your virus programs) and so on.Thats all. The DOS-program which was added behind [A= ] at the A-section of menue.txt must be copied to C:\_FULL_CD\MENUE\MENUE_A\MEN_A_A\ and so on. The file "go.bat" in this directory has to be modified so that the program starts when you execute go.bat.For programs which need no HIMEM.SYS or no EMM386 we create a directory C:\_FULL_CD\NOHIMEM and C:\_FULL_CD\NOEMM386. In these directories we create directories NO_HIM_A until NO_HIM_W (no I !!!) and NO_EMM_A until NO_EMM_W. Copy a file go.bat into each directory. Copy the program you want into the directory you want and edit go.bat to make the program work. Then edit nohimem.txt and noemm386.txt and add the program name behind [A= ] until [W= ]. All this is very simple with the prepared execution tool at Installationsdisk - Frame Full . To repeat it again: The letters you have to choose (e.g. C than W) appear again at the directory name C:\_FULL_CD\MENUE\MENUE_C\MEN_C_WATTENTION! As Lite-version and Full-version offer to start a different number of programs (22 or 484) the menue.bat / menue.txt in these versions differ - of course the number of directories too. Nohimem.bat / nohimem.txt and noemm386.bat / noemm386.txt are the same.If you have done all these steps (do all go.bat files work?) you can burn your CD.Additional comment : If you have an empty harddrive you can leave out the directory \_FULL_CD and create all directories and files direct at C:\ . This has a great advantage: You can test at once if the batches menue.bat, nohimem.bat and noemm386.bat start the program properly because they are made to run from C: as well as from W:, X:, Y: and Z:. If they work properly you will see a menu with your program names - and if you click on one the program should start.

back to the three possibilities

back to the table of contents

 

3. Preparation for Burning:Before you start burning please check the following again:

a) Are ALL filenames 8 letters or less? (we work in DOS!)

b) Are ALL file extensions 3 letters or less? (we work in DOS!)

c) Are the files command.com, xmsdsk, zcopy, choice, attrib and so on at the root directory of the CD (C:\_LITE_CD or C:\_FULL_CD) and in the directory DOS (C:\_LITE_CD\DOS or C:\_FULL_CD\DOS) and on the Diskette?

d) Does the DOS directory contain the most important DOS-commands such as format, fdisk, edit ...?

e) Does any program name use special signs such as -, ?, !, \; ä, ö, ü, ß, e.g. F-Prot? (this is BAD, fix it)

f) If you have created text files in Windows: Did you replace ä, ö, ü, ß, by ae, oe, ue, ss? Check it with DOS Editor.

g) Does the start diskette work properly? Did you fix the drive letter at autoexec.bat with mscdex /L:W or shsucdx /L:W?

h) Did you add the submenu name in menue.bat behind [A= ] until [W= ]?

back to the three possibilities

back to the table of contents

 

4. Burning: Run your standard OS, start your burning program and choose the option "Bootable CD". Put your start diskette into the diskette drive and ensure that the diskette will be burnt too (in Nero you have to choose between A: and C: - choose A: - in older versions of Win-On-CD you have to use drag and drop to move the diskette onto the CD). Add the files you want to burn onto the CD (in my case these are the files BELOW C:\_FULL_CD or C:\_LITE_CD, this means the directories C:\_FULL_CD\MENUE and so on. Also add the files in the directory C:\_FULL_CD\, e.g. attrib, choice, xmsdsk, zcopy, a.bat - w.bat, menue.bat and so on. ATTENTION: There should not be a directory W:\ or \_FULL_CD or \_LITE_CD on the files to be burned side! This means that \MENUE, \NOHIMEM and \NOEMM386, the batch files, command.com and other files in the root directory, either C:\_LITE_CD or C:\_FULL_CD must appear in the root directory of the CD!!

Before burning look for the right settings in your burning program (DOS instead of ISO 9660 at Nero). If you dont do so, special signs such as $, ä, ö, ü, ß, - and so on are not recognized and may be changed to a "_" - this often creates problems when running a program. Thats all. Burn the CD.
Good luck!

back to the three possibilities

back to the table of contents