Breaking News

Search This Blog

Saturday 7 January 2012

Bootable CD/DVD



A bootable CD or DVD is build up according to the El Torito standard.  This means that the ISO9660 File System has an extension which provides information to a BIOS so that the BIOS knows where to boot from and what files to load from where.  Bootable CDs or DVDs are a BIOS thing, once the OS is up and running the bootable structures are ignored.

It is not simply possible to copy a bootable floppy image onto CD or DVD and then hope the medium is now bootable.  The File System really needs to know and needs to provide special structures and volume descriptors (in accordance with the El Torito standard).

If you want to create a bootable CD or DVD you need to use a mastering application that does it for you.  E.g. in Nero or Easy CD Creator you can check an option to make a bootable CD/DVD and the application will then prompt you to insert a bootable floppy or use a bootable image.

Different ways to go about this :

Extract the bootable CD image file with IsoBuster or ... often the bootable image is also mentioned in the file system as a normal file. In that case ... look for a file of about (mostly) 1.44 MB big and maybe compare the start address of the file to the start address of the boot image given by Isobuster. If they're the same ... bingo !  Next use a nifty little application called img2dsk (http://retrograde.trustno1.org/index2.htm) and place the image file content on a floppy. This little application breaks the image file down in floppy-sized blocks and writes them to the floppy from start till end. When you next browse to the floppy, Windows drivers suddenly can make sense of the data 'et voila' ... you can open/edit/replace the files.  If the layout of the CD is less important...  (only in case of certain copy protections the layout (file locations) is really important)).  Extract all files from the CD (using IsoBuster or Windows).  Leave the floppy in the floppy drive and start up your CD Creator application (e.g. Nero, Easy CD Creator, ...).  Re-create the CD from the content you just ripped of the original.  Choose to create a bootable CD. The application will prompt for a bootable floppy (the one you just left in the floppy drive) and you will create the 'same' bootable CD with changed boot properties.  If the location of files may not be changed you'll need to do some engineering ...  Create a new bootable image file from the 'changed' floppy content. You'll need dsk2img for this task.  Create an image file from the CD you want to change. Now (and this is important) you will have a hard time just editing any kind of image file (because of many reason, one of which is error correction code in some image files).  The boot image is 'pure' user data (no overhead) so you best start with an image file which contains the same kind of 'pure' user data. So, extract the image as a *.tao image which is 2048 bytes per block (this is only true for 'true data CDs' (not CD-i or Video CD)).  Use IsoBuster to determine the location of the image file on CD (The Logical Block Address (LBA)).  In the image file, the boot-image file then starts at byte (2048 * LBA).  Use a hex editor and swap the content in the image file with the content of the changed boot image.  Once this is done ... you can use the image file to burn a CD. 

Some good online resources on the subject :
http://www.nu2.nu/bootcd/
http://www.isobuster.com/tips.php?tips_page=7

IsoBuster can also deal with boot images that are not conform the specifications, made by mkisofs.
Additionally IsoBuster can also scan the boot image file to check if it contains a FAT file-system, and if it does, list those files and folders.

No comments:

Post a Comment

Designed By Blogger Templates