Creating a Bootable CD Image from a Bootable Floppy Disk


To create a dos bootable cd underlinux

  1. Create a directory in a convenient place
    mkdir $HOME/cd_build
  2. Create a subdirectory to hold the boot image
    mkdir cd_build/boot
  3. cd cd_build
  4. Copy the floppy image you want to boot from off the floppy
    dd if=/dev/fd0 of=boot/boot.img bs=1k count=1440
  5. Now add all the files you want burnt onto cd to the cd_build dir
  6. Run the command to create the iso image (don't forget the dot at the end)
    mkisofs -r -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .
  7. Using your favourite burning software burn the bootcd.iso file to a CD

Scripting it

#!/bin/sh
BUILD_DIR=createcd


if [ -e $BUILD_DIR ]
then
echo "removing $BUILD_DIR dir and it's contents"
rm -rf $BUILD_DIR
fi

mkdir -p $BUILD_DIR/boot
cd $BUILD_DIR

# copy the floppy image you want to boot from to the hdd
dd if=/dev/fd0 of=boot/boot.img bs=1k count=1440

# make sure you add files i.e
# create dir structure a dir structure in $BUILD_DIR
# make sure all the files work out to be <= CD Capacity minus Floppy Image Size(1.44MB)
# cp myfiles/* $BUILD_DIR
# cp morefiles/ $BUILD_DIR
# this command is run from the $BUILD_DIR to create the iso file
mkisofs -r -b boot/boot.img -c boot/boot.catalog -o bootcd.iso .



Compiled by: James McDonald