Making a bootable CD from a bootable floppy image

Linux OS Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

Making a bootable CD from a bootable floppy image

Post by Saman » Mon Oct 05, 2009 1:17 am

This document describes how to burn a floppy image file onto a CD. For this exercise we'll use /scratch/linuxinst/m91inst/images/network.img as the image to burn.

Mastering And Burning It the Easy way
Assuming the floppy image file to be turned into a bootable CD is /scratch/linuxinst/m91inst/images/network.img, master CD image /tmp/cd.iso with the following command:
mkisofs -pad -b network.img -R -o /tmp/cd.iso /scratch/linuxinst/m91inst/images/network.img
Note the following:
This is the file to put on the CD.
Command parameter or partFunctionality
-padAdd padding to the end to make it readable on all CD players
-b network.img-b tells mkisofs which *floppy image* to use for booting. If the floppy image boots as a floppy, it will boot as a CD. Note that there is no path prepender to network.img. The network.img bootable image is assumed to be relative to the file being imagized, in this case
/scratch/linuxinst/m91inst/images/network.img
-RInclude Rock-Ridge extensions for readability everywhere
-o /tmp/cd.isoThis defines the output file, an ISO9660 image ready for burning
/scratch/linuxinst/m91inst/images/network.img
Your next step is to actually burn it. Use the following command:
cdrecord dev=0,3,0 speed=12 blank=fast -pad -v -eject /tmp/cd.iso
Command parameter or partFunctionality
dev=0,3,0The CD burner device. If you don't know it, use the cdrecord -scanbus command to find out.
-speed=12Set this to the fastest speed supported by your burner/media combination.
-blank=fastUse this ONLY if burning a rewriteable. This erases the current CD contents, but does it fast rather than thoroughly.
-padAdd padding to the end to make it readable on all CD players. Without this, the CD will error out when read on many Linux boxes
-vVerbose
-ejectEject when finished
/tmp/cd.isoThe ISO image you're burning. In this case it's the ISO you just made with mkisofs.
Remove the CD, and boot it on a machine known able to boot CD's. You should get a bootable version of whatever boot floppy image you used. The advantage to a boot CD is CD media are much more reliable, so you needn't go through several floppies finding just the right one to burn properly.

Mastering and Burning it the Complete Way

The easy CD boots and installs just like the floppy, but it does not contain the floppy's files in the root of the CD. To get all the files visible in the root, you need to create a temporary directory, copy all the floppy image files to it, copy the floppy image to it, and run mkisofs.
  • As root, make sure there's a /mnt/test directory
  • As root, mount -o loop,ro /scratch/linuxinst/m91inst/images/network.img /mnt/test
  • The remainder of the steps are done as a regular user
  • mkdir /tmp/floppycopy
  • cp -Rp /mnt/test/* /tmp/floppycopy
  • cp -p /scratch/linuxinst/m91inst/images/network.img /tmp/floppycopy
  • mkisofs -pad -b network.img -R -o /tmp/cd.iso /tmp/floppycopy
  • cdrecord dev=0,3,0 speed=12 blank=fast -pad -v -eject /tmp/cd.iso
Note: As mentioned before, you must determine your device number based on cdrecord -scanbus, and your speed based on media and drive.
Post Reply

Return to “Linux”