Tuesday, May 12, 2009

Tech Project: Create a Bootable Software Utility CD

Floppies are no longer ubiquitous and a floppy is not big enough to hold a useful amount of content anyway, so now I need to create an alternative to floppies that contains my essential software in a single medium.

The goal is to create a software utility configuration with the following properties:
  • Bootable CD (that would also work as a bootable USB, thumb, or flash drive)
  • Contains primary disk management utilities:
  • Contains installable “essential utilities”
  • If installed on a writable medium (especially if not on CD), then allow “portable app” support when possible.
Most of the published information on the internet is quite old. While still factually correct, they use old or obsolete information in their examples. This article provides a more contemporary look at the same issues.

This is a work in progress, come back to see my progress.

Preparing a Bootable CD: Concepts

Enabling a bootable CD is a bit of a hack; there is no direct support for booting from optical media. Instead the optical disk emulates more traditional media, floppy or hard disks.

Originally, creating a bootable CD meant creating a bootable master hard drive with the exact content and layout which is imaged to the CD. Today, it is difficult to find a hard drive small enough for this purpose. Alternatively, a smaller image can be created from a diskette drive. This startup image can load CD-ROM that allow the subsequent operation to access the remaining content of the disk.

The directly bootable portion (the disk or floppy image) is not visible when not booted from the CD drive, so it is advisable to keep all the generally viewable files separate from the boot image.
  1. Prepare bootable image that boots in real-mode and loads CD-ROM drivers that allows access to the bulk of the disk's content. This startup also may allow the user to select what functionality they want to run in bootable operation.
  2. Layout the remaining disk content that will be accessible once the CD-ROM drivers have loaded.
  3. Create ISO image.
  4. Burn to disk.

Build Tools

Tools for creating the bootable CD.
  • Prepackaged command-line tools and diskette images: clean20.zip
  • Make ISO filesystem, mkisofs -- opensource Unix, Linux, and DOS command-line utility.
  • FreeDos -- opensource DOS implementation.

Some details to be integrated...


DescriptionWhat systems support it?
Single boot image configurationAll
Multiple boot image configurationSome
Boot record volume descriptorAll
Validation entryAll
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 countMany *2
Load RBAAll
Header indicatorAll
Platform IDMany *3
ID stringSome *4
Section entry extensionsI've never used it
Int 13 function 4A - Initiate disk emulationNone *5
Int 13 function 4B - Terminate disk emulationAll
Int 13 function 4C - Initiate disk emulation and bootNone *5
Int 13 function 4D - Return boot catalogSome

*1Adaptec aha2940 supports no emulation mode from firmware revision 1.25
*2Some systems do not support reading more than 1 sector
*3Some systems do not check the platform ID
*4I've only seen adaptec SCSI adapters support this
*5This one hurts, I wanted to use this function badly

Future projects

  • Support for DVD.
  • Support for solid state storage (USB/thumb or flash memory).
  • Support for boot on a Mac.
  • Support for multi-boot. Rather than driving the selection of the configuration via a Dos menu, multiple boot configurations can be stored on disk and selected directly.

Bibliograpy

  1. Microsoft. “KB167685: How to Create an El Torito Bootable CD-ROM.” [Online] Available http://support.microsoft.com/kb/167685, April 12, 2004. Details one detailed approach to creating a bootable CD/DVD.
  2. “Bart’s way to create bootable CD-Roms (for Windows/Dos).” [Online] Available http://www.nu2.nu/bootcd/, June 6, 2005.
  3. IBM and Phoenix. “‘El Torito’ Bootable CD-ROM Format Specification.” [Online] Available http://www.phoenix.com/NR/rdonlyres/98D3219C-9CC9-4DF5-B496-A286D893E36A/0/specscdrom.pdf, January 25, 1995.
  4. Wikipedia. “ISO 9660.” [Online] Available http://en.wikipedia.org/wiki/ISO_9660, April 19, 2009

No comments: