Make your own free website on Tripod.com
Bart's way to create bootable CD-Roms Version 0.41 Created: May 10, 2000 Last updated: Apr 2, 2002 Welcome to world's #1 page about creating bootable CD-Roms for PC! Page contents » Introduction » What is a bootable CD-Rom? » How does a PC boot from CD-Rom? (technical) » Requirements for building the examples » Single boot image (BIOS) » Single boot image (Diskemu) » Multiple boot images (BIOS) » Multiple boot images (isolinux/memdisk) » Bootable Windows NT 4.0 CD-Rom » Bootable Windows 2000 CD-Rom » Bootable Windows XP CD-Rom » Bootable Ghost restore CD-Rom "ELGHOST" » ELBOOT bootdisk » About... » Frequently asked questions » Links » Revision history » Thank you Introduction ...Bart's way of creating bootable CDs is not just another way, it is "THE SOLUTION" for your company... You (the technical guy) can create and prepare the structure for bootable installation, diagnostics or other CDs. And anybody in your company (without any knowledge about CD burning) can create and maintain these CDs by adding or changing files when needed. He just has to start a batchfile and select "Build & burn" to create a CD. For whom is this page? This page is for you if you want to: create bootable CD-Roms on a regular basis build and burn fully automatic (optional blank CDRW before burn) use only freeware software to create your CDs create a bootable CD-Rom with multiple boot images create a Dos bootable CD-Rom using a hardware independent CD-Rom driver (for SCSI and ATAPI) This page is not for you if: you want to create just 1 simple bootable CD-Rom. You should use Cdrwin, Nero or any other well known application to create CDs you do not understand basic things like; difference between a bootdisk and a boot image CDR, CDRW medium unpacking, copying, editing or renaming files What is a bootable CD-Rom? A bootable CD-Rom is a CD from which you boot the PC. This means putting the CD in your CD-Rom drive and power-on or reboot your system. The PC will load a boot image from the CD-Rom and control is given to this boot image. A bootable CD-Rom is not a CD that you insert into your CD-Rom drive and windows will start something from this CD-Rom. This is called an "autoplay" CD-Rom. I've just put this information here so that people who do not known the difference between a bootable and a "autoplay" CD-Rom can leave this page and look here: NU2-links: autorun. How does a PC boot from CD-Rom? (technical) A PC can boot from a CD-Rom if the PCs BIOS supports the El Torito Bootable CD-ROM Format Specification v1.0. This specification provides a way of getting to the location on the CD that will provide the boot information, while maintaining ISO-9660 compatibility. The El Torito specification was created in january 1995, by Curtus E. Stevens (Phoenix) and Stan Merkin (back then IBM). And it was called after a restaurant, the "El Torito grill", where they went to eat and talk about bootable CD-Roms. Click here for the full story... The ISO-9660 defines that a "Primary Volume Descriptor" must reside at sector 10h (16 decimal), relative to the start of the session. The El Torito specification uses a Boot Record Volume Descriptor. This Boot Record must be located at sector 11h (17 decimal) in the last session of the CD. The boot record contains an absolute pointer to the boot catalog. This catalog allows the system to pick a proper boot image to boot from. Boot Record Volume Descriptor Offset Type Description 0 Byte Boot record Indicator, must be 0 1-5 Byte ISO-9660 Identifier, must be "CD001" 6 Byte Version of this descriptor, must be 1 7-26 Byte Boot system identifier, must be "EL TORITO SPECIFICATION" padded with 0's. 27-46 Byte Unused, must be 0 47-4A Dword Absolute pointer to first sector of Boot catalog. 4A-7FF Byte Unused, must be 0 ...BIOS vendors do not implement the full El Torito specification... This all sounds very great, a nice and clear specification about bootable CD-Roms and if all BIOS vendors would implement the complete specification, there would be nothing to worry about. But the BIOS vendors do no follow the full El Torito specification! Below is a list of my findings, and if it is supported on all systems or not... (I'm not sure if 100% correct) Description What systems support it? Single boot image configuration All Multiple boot image configuration Some Boot record volume descriptor All Validation entry All Boot Indicator 88 "Bootable" All Boot Indicator 00 "Not bootable" None Boot media type 0 "No emulation" All *1 Boot media type 1,2,3 "Floppy emulation" All Boot media type 4 "Harddisk emulation" All Sector count Many *2 Load RBA All Header indicator All Platform ID Many *3 ID string Some *4 Section entry extensions I've never used it Int 13 function 4A - Initiate disk emulation None *5 Int 13 function 4B - Terminate disk emulation All Int 13 function 4C - Initiate disk emulation and boot None *5 Int 13 function 4D - Return boot catalog Some *1 Adaptec aha2940 supports no emulation mode from firmware revision 1.25 *2 Some systems do not support reading more then 1 sector *3 Some systems do not check the platform ID *4 I've only seen adaptec SCSI adapters support this *5 This one hurts, I wanted to use this function badly New mainboards come out all the time. I see that more and more new mainboards do not support multiboot images configurations. Requirements for building the examples This is what you need: 1.PC running Windows 98/ME, Windows NT 4.0 SP4+, Windows 2000 or Windows XP. 2.SCSI or ATAPI based CD-recorder or rewriter. 3.ASPI manager (see also: Bart's page about ASPI). 4.1 recordable (CDR) or rewritable (CDRW) CD, at first try, use a rewritable if you can. 5.To test if the completed CD works, you'll need a PC capable of booting CD-Roms. 6.Some basic skills for copying, unpacking and editing some files. Single boot image (BIOS) This will create a bootable CD-Rom using one boot image. The boot image is a sector by sector image taken from a bootable floppy. When a PC boots from floppy this is normally done from the first floppy drive, known as drive number 0 or as drive A:. So, to let the CD-Rom boot there must be some mechanism that emulates a floppy drive (drive number 0). Using this method your PC BIOS provides the emulation for you. This example will use the CD-Rom boot disk bootdisk. The steps to create are: 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.Download single eltorito add-on. Unpack the single_eltorito_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 3.Follow the steps in the CD-Rom boot disk page to create the CD-Rom boot disk bootdisk. Create a boot image file from the "CD-Rom boot disk" bootdisk using dd.exe, you should call this boot image "cdrom.img" and put it into the "cds\single_eltorito\disk1" directory. Note! You have to rename the boot image to lowercase! 4.Change cds\single_eltorito\disk1\autorun.bat you can add any commands you want. For example start an application from CD-Rom. 5.All other files and folders you want in the CD-Rom filesystem must also be copied into cds\single_eltorito\disk1 directory. 6.Edit the file cds\single_eltorito\build.mak and put your name into the "preparer" variable. 7.Start the batch file "run.bat". From the "Main menu" select "Build & Burn" and "single_eltorito". Done! Single boot image (Diskemu) Using this method a special program called "diskem1x" is loaded first and that program will provide the emulation for the boot images. Use this if you want to boot "dos" based operating systems like Dos 5.x/6.x, Windows 9x, Windows ME... The advantage of using diskem1x is that it works together with a special Dos CD-Rom driver, called "eltorito.sys", which is based on INT13 extensions and is hardware independent (more info on this look here). The steps to create are: 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.If you have not already setup diskemu add-on, version 1.1 (11/07/01) then download diskemu add-on (~9KB). Unpack the diskemu_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 3.Download single diskemu add-on. Unpack the single_diskemu_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 4.Follow the steps in the ELBOOT page to create the ELBOOT bootdisk. Create a boot image file from the "ELBOOT" bootdisk using dd.exe, you should call this boot image "undefined.img" and put it into the "cds\single_diskemu\disk1" directory. Note! You have to rename the boot image to lowercase! 5.All other files and folders you want in the CD-Rom filesystem must also be copied into cds\single_diskemu\disk1 directory. 6.Customize the file cds\single_diskemu\disk1\diskemu.cmd for your personal needs. 7.Change cds\single_diskemu\disk1\autorun.bat you can add any commands you want. For example start an application from CD-Rom. 8.Edit the file cds\single_diskemu\build.mak and put your name into the "preparer" variable. 9.Start the batch file "run.bat". From the "Main menu" select "Build & Burn" and "single_diskemu". Good luck! Multiple boot images (BIOS) This example goes about creating a bootable CD-Rom using multiple boot images in floppy emulation. You can build your own boot images, or add more images if you like. Warning! It is possible that your BIOS does not support El Torito multiple boot image configuration! There is no easy way to check. When your PC boots only the first image, your BIOS does not support multiboot! The boot images used in this example are: cdrom.img - CD-Rom boot disk msnet.img - Network boot disk scsitool.img - SCSITOOL bootdisk cpuid.img - The Intel®® Processor Frequency ID Utility 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.Download multi eltorito add-on. Unpack the multi_eltorito_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 3.Follow the steps in the CD-Rom boot disk page to create the CD-Rom boot disk bootdisk. Create a boot image file from the "CD-Rom boot disk" bootdisk using dd.exe, you should call this boot image "cdrom.img" and put it into the "cds\multi_eltorito\disk1" directory. Note! You have to rename the boot image to lowercase! 4.Follow the steps in the Network boot disk page to create the Network boot disk bootdisk. Create a boot image file from the "Network boot disk" bootdisk using dd.exe, you should call this boot image "msnet.img" and put it into the "cds\multi_eltorito\disk1" directory. Note! You have to rename the boot image to lowercase! 5.Follow the steps in the SCSITOOL page to create the SCSITOOL bootdisk. Create a boot image file from the "SCSITOOL" bootdisk using dd.exe, you should call this boot image "scsitool.img" and put it into the "cds\multi_eltorito\disk1" directory. Note! You have to rename the boot image to lowercase! 6.Follow the steps in the CPUID page to create the CPUID bootdisk. Create a boot image file from the "CPUID" bootdisk using dd.exe, you should call this boot image "cpuid.img" and put it into the "cds\multi_eltorito\disk1" directory. Note! You have to rename the boot image to lowercase! 7.All other files and folders you want in the CD-Rom filesystem must also be copied into cds\multi_eltorito\disk1 directory. 8.Change cds\multi_eltorito\disk1\autorun.bat you can add any commands you want. For example start an application from CD-Rom. 9.Edit the file cds\multi_eltorito\build.mak and put your name into the "preparer" variable. 10.Start the batch file "run.bat". From the "Main menu" select "Build & Burn" and "multi_eltorito". Done! Multiple boot images (isolinux/memdisk) This will show you how to build a multiboot CD-Rom using isolinux and memdisk. Memdisk simulates a disk by claiming a chunk of high memory for the disk and a (very small - 2K typical) chunk of low (DOS) memory for the driver itself, then hooking the INT 13h (disk driver) and INT 15h (memory query) BIOS interrupts. Memdisk is very fast! The boot images used in this example are: cdboot.img - CD-Rom msclient.img - Network elboot.img - El-Torito CD-Rom tomsrtbt.img (Eltorito.288) - The most linux on one disk - by Tom Oehser You can build your own boot images, or add more images if you like. The steps to create are: 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.Download multi memdisk add-on. Unpack the multi_memdisk_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! The addon contains: ISOLINUX 1.67 and MEMDISK 1.67 Copyright 2001 H. Peter Anvin. The isolinux is a little bit modified by Bart Lagerweij to support loading of NT CD-Rom bootsectors (.bin files) like this: label 6 kernel erdci386.bin A bootmsg.txt file, this will create a screen simular like below: bootmsg.txt - output ISOLINUX 1.68 0x3c7f7718 Copyright (c) 1994-2002 H. Peter Anvin ???????????????????????????????????????????? ? Bart's way to create bootable CD-Roms ? ? http://www.nu2.nu/bootcd/ ? ???????????????????????????????????????????? 0) Boot from first harddisk (0x80) 1) Boot Dos with CD-Rom support 2) Boot Dos with Network support 3) Boot Dos with CD-Rom (eltorito.sys) support 4) Boot Linux (tomsrtbt) a) Boot from first floppy drive (0x00) q) Skip CD-Rom boot (try next boot device) When no key is pressed for 20 sec, or when you hit Enter "0" will be run... Type command at the prompt... boot: (screen created with scr2htm) A isolinux.cfg file, looks like this: isolinux.cfg default 0 display bootmsg.txt prompt 1 label 0 localboot 0x80 label a localboot 0x00 label q localboot -1 label 1 kernel memdisk append initrd=cdrom.img label 2 kernel memdisk append initrd=msnet.img label 3 kernel memdisk append initrd=elboot.img label 4 kernel memdisk append initrd=tomsrtbt.img timeout 200 3.Follow the steps in the CD-Rom boot disk page to create the CD-Rom boot disk bootdisk. Create a boot image file from the "CD-Rom boot disk" bootdisk using dd.exe, you should call this boot image "cdrom.img" and put it into the "cds\multi_memdisk\disk1\isolinux" directory. Note! You have to rename the boot image to lowercase! 4.Follow the steps in the Network boot disk page to create the Network boot disk bootdisk. Create a boot image file from the "Network boot disk" bootdisk using dd.exe, you should call this boot image "msnet.img" and put it into the "cds\multi_memdisk\disk1\isolinux" directory. Note! You have to rename the boot image to lowercase! 5.Follow the steps in the El-Torito CD-Rom boot disk page to create the El-Torito CD-Rom boot disk bootdisk. Create a boot image file from the "El-Torito CD-Rom boot disk" bootdisk using dd.exe, you should call this boot image "elboot.img" and put it into the "cds\multi_memdisk\disk1\isolinux" directory. Note! You have to rename the boot image to lowercase! 6.Get the 2.88MB Eltorito image from http://www.toms.net/rb/ call the image "tomsrtbt.img" and put it in the "cds\multi_memdisk\disk1\isolinux" directory. 7.All other files and folders you want in the CD-Rom filesystem must also be copied into cds\multi_memdisk\disk1 directory. 8.Change cds\multi_memdisk\disk1\autorun.bat you can add any commands you want. For example start an application from CD-Rom. 9.Edit the file cds\multi_memdisk\build.mak and put your name into the "preparer" variable. 10.Start the batch file "run.bat". From the "Main menu" select "Build & Burn" and "multi_memdisk". Done! Bootable Windows NT 4.0 CD-Rom This will show you how to create a bootable Windows NT 4.0 Workstation or Server CD-Rom. It uses the bootstrap loader from Windows 2000 to have a "press any key to boot from CD" option. It has an updated atapi driver to support harddisks larger than 10GB. Optionally you can add service packs, security hotfixes and other stuff to your CD. The boot catalog and NT bootstrap loader are hidden, just like the original bootable Windows NT 4.0 CD-Rom. Joliet extensions are enabled by default, so you can have long filenames on the CD, the original Microsoft Windows NT 4.0 bootable CD-Rom uses only ISO9660. The steps to create are: 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.Download Windows NT 4.0 add-on. Unpack the nt4_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! The add-on contains, the Windows 2000 bootstrap loader, the Windows 2000 bootfix.bin and the "build.mak" file. We will be using the bootstrap loader from Windows 2000, this will give us the "Press any key to boot from CD" option. 3.From Windows NT 4.0 CD copy the "i386" folder to cds\nt4ws_us\disk1\. You will find the cds\nt4ws_us\disk1\ folder in the same directory as where you have unpacked the cdrpack and Windows NT 4.0 add-on. 4.From Windows NT 4.0 CD copy into cds\nt4ws_us\disk1\ the following files: If you are building a Windows NT 4.0 workstation CD copy: cdrom_w.40 If you are building a Windows NT 4.0 server CD copy: cdrom_s.40 5.Optionally copy (from Windows NT 4.0 CD) into cds\nt4ws_us\disk1\ the following files: autorun.inf 6.If you have copied Windows NT 4.0 from MSDN CD... Edit the file i386/txtsetup.sif section [SetupData], and change SetupSourcePath = "\" 7.Copy Service Pack 6a, the Post-SP6a Security Rollup Package (SRP) and maybe some other security fixes to cds\nt4ws_us\disk1\. 8.Update Atapi driver. Unpack Service Pack 6a to a temporarily folder using /x parameter. From this temporarily folder copy into cds\nt4ws_us\disk1\i386 the following files: ntldr ntdetect.com atapi.sys 9.All other files and folders you want in the CD-Rom filesystem must also be added to cds\nt4ws_us\disk1. Things you could add are: latest internet explorer, directx, ... 10.Edit the file cds\nt4ws_us\build.mak change the "volumeid" if you like and put your name into the "preparer" variable. 11.Let's check some files to see if they are in the right place. Make sure that the following files exist: cds\nt4ws_us\disk1\w2ksect.dat cds\nt4ws_us\disk1\i386\bootfix.bin cds\nt4ws_us\disk1\i386\setupldr.bin If you are building a Windows NT 4.0 workstation CD: cds\nt4ws_us\disk1\cdrom_w.40 If you are building a Windows NT 4.0 server CD: cds\nt4ws_us\disk1\cdrom_s.40 If one or more files are missing do not continue! Go back to correct it! 12.Start the batch file "run.bat". From the "Main menu" select "Build & Burn" and "nt4ws_us". To have more Windows NT 4.0 versions available from cdrpack to build, you can just rename the "nt4ws_us" folder to any other name you want, and go again from step 2. Done! Bootable Windows 2000 CD-Rom This will show you how to create a bootable Windows 2000 Professional, Server or Advanced Server CD-Rom. Optionally you can integrate service pack, add service packs, security hotfixes and other stuff to your CD. The boot catalog and NT bootstrap loader are hidden, just like the original bootable Windows 2000 CD-Rom. (for multiboot check out Twinkie's How-to Website) Joliet extensions are enabled by default, so you can have long filenames on the CD, the original Microsoft Windows 2000 bootable CD-Rom uses only ISO9660. The steps to create are: 1.If you have not already setup cdrpack version 1.3 then download cdrpack v1.3 (~640KB). This file contains a workspace where you can build your bootable CD's from. Unpack the cdrpack13.zip file to a directory on your local harddisk. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! 2.Download Windows 2000 add-on. Unpack the w2k_addon.zip file into the same directory as cdrpack 1.3. Make sure you expand the subdirectories! So when using pkunzip.exe use the -d option! The add-on contains, the Windows 2000 bootstrap loader and the "build.mak" file. 3.From Windows 2000 CD copy the "i386" folder to cds\w2kpro_us\disk1\. You will find the cds\w2kpro_us\disk1\ folder in the same directory as where you have unpacked the cdrpack and Windows 2000 add-on. 4.From Windows 2000 CD copy into cds\w2kpro_us\disk1\ the following files: Always copy: cdrom_nt.5 If you are building a Windows 2000 professional CD copy: cdrom_ip.5 If you are building a Windows 2000 server CD copy: cdrom_is.5 If you are building a Windows 2000 advanced server CD copy: cdrom_ia.5 Note! Be sure only one "CDROM_Ix.5" file is in the root! 5.Optionally copy (from Windows 2000 CD) into cds\w2kpro_us\disk1\ the following files: autorun.inf read1st.txt readme.doc setup.exe 6.If you have copied windows 2000 from MSDN CD... Edit the file i386/txtsetup.sif section [SetupData], and change the setup source path, it should read: SetupSourcePath = "\" 7.If you have copied windows 2000 from MSDN CD you can disable the product key prompt: Edit i386/setupp.ini file, remove the read-only attribute and open the file in notepad. Change the last 3 digits of the Pid number to 270 Example: [Pid] ExtraData=123456789012345678901234567890 Pid=12345270 8.You can apply the latest Windows 2000 Service Pack to this installation (integrated installation). So that you have an installation CD-ROM with the service pack build in. Extract the files from your service pack files using the "/x" parameter. For example: w2kspx.exe /x (where x is your service pack level) Apply the service pack to the files in the "cds\w2kpro_us\disk1\i386" directory using "update.exe" with the "-s" option (you must supply full path). For example: update.exe -s:c:\bootcd\cds\w2kpro_us\disk1\ The update.exe can only be started on a Windows 2000 PC! Be sure to check that the following file exists: cds\w2kpro_us\disk1\cdrom_sp.tst or cds\w2kpro_us\disk1\cdromspx.tst (where x is your service pack level) 9.Copy the latest Service Pack and security patches to cds\w2k