Monday, September 15, 2008

How to make a bootable MSDOS CD from a floppy image

http://www.cyberciti.biz/faq/howto-linux-format-floppy-disk-zip-disk-create-vfat-ext3-filesystem/
http://www.bootdisk.com/bootdisk.htm
http://sharkysoft.com/tutorials/linuxtips/floppyimages/
http://mandrivausers.org/index.php?showtopic=25718
http://www.troubleshooters.com/linux/floppy_image_on_cd.htm
================================================

Archiving Floppy Disks Using Images

by Charlton Rose

We all have a stack of floppies sitting around that none of us ever use, but which we can't bare to throw away because we know that as soon as we do, we will miss them. On top of that, we also know that the lifetime of a floppy is very short; even if you do have a place to store all your floppies, odds are good that eventually the bits on them will go bad anyway. This mini-tutorial offers a technique you can use to archive your floppies onto more durable media, such as your hard drive or a CD-ROM, in a manner that allows you to reconstruct any of the floppies at a later time.

Often, it is not enough just to back up the files on a floppy. Sometimes the exact arrangement of data blocks on the disk are important. When backing up a commercial floppy, for example, it is usually best if you can create a bit-for-bit copy of the original. The techniques illustrated in this document achieve this goal.

Floppy disk images

All of the data on your floppy, including the files, the directory tables, etc. can be represented in a single file called an "image." Images are useful because they encapsulate the entire structure of a disk without regard to what is actually on the disk. Thus, images can be used to represent disks of various formats.

Unfortunately, the techniques described in this document work only with 31/2 inch high density (1.44 Mb) disks. However, they can be adapted for other types of disks if you know the correct parameters. Some formats that might not work with the techniques described in this document include Macintosh and the special format Microsoft used to distribute copies of Windows 95. (If you figure out the correct parameters for these formats, let me know so that I can include them here.)

Reading images

There are various commercial utilities available for DOS and Windows that can read floppy disk images. Unfortunately, I have not been able to find any of them that are free. If you use Linux, however, the process is quite easy and no commercial software is required. Simply put your disk in the drive and execute the following command:

dd if=/dev/fd0 of=floppy.img count=1 bs=1440k

Of course, you can replace floppy.img with the file name that you want the extracted image to have.

When the command completes, you will have a single file on your hard drive representing the entire disk. This file, called an "image," can be used to reconstruct the floppy at any given time. From this point, you just need to keep the file on your hard drive, write it a CD-ROM or tape, or preserve it in any other way you feel appropriate. Note that you can fit more than 400 floppy images on a single CD_ROM. (That'll save a lot of space!) As long as you can keep the images safe, you can dispose of the original floppies, and reconstruct them later if it ever turns out you need them.

Writing images

Red Hat, Inc. has published a DOS utility you can use to write floppy disk images back to floppy disks. It's call rawrite.exe and is included on any Red Hat Linux CD-ROM. Since it is freely redistributable, I am happy to offer you a copy of the program and its documentation. It's really quite simple to use. Just run it and follow the prompts.

If you are running Linux, the command to restore an image to the floppy is:

dd if=floppy.img of=/dev/fd0 count=1 bs=1440k

where floppy.img is, of course, the name of your archived image file.

Acknowledgements

Thanks to Alen Peacock for teaching me most of the knowledge embodied in this tutorial.

========================================

Executive Summary:

A big thank you goes out to LEAP member Mark Alexander for supplying much of the technical information in this document...

If you're old enough to remember IT in the 1980's, you remember a time when floppies were reliable. They had to be. For most PC type computers, floppies were the preferred software distribution media. and the preferred backup media. Skip ahead 20 years, and floppies are almost never used for these purposes. My observation using floppies is that manufacturers of floppy media and drives no longer insist on high quality. Why bother -- the last use of floppies is boot media for computers.

My experience indicates you might need to try 5 or 6 floppies before you get a good boot floppy. This is a hardship, to say the least.

Meanwhile, CD media and drives have gotten better and better over the years. Wouldn't it be nice if you could burn that floppy image as a bootable CD, and then use the CD as installation media? Keep in mind that most computers made in the last 5 years can boot to CD.

This document describes how to burn a floppy image file onto a CD.
For this exercise we'll use /scratch/linuxinst/m91inst/images/floppy.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/floppy.img, master CD image /tmp/cd.iso with the following command:
mkisofs -pad -b floppy.img -R -o /tmp/cd.iso \
/scratch/linuxinst/m91inst/images/floppy.img
Note the following:
Command
parameter or part
Functionality
-pad
Add padding to the end to make it readable on all CD players
-b floppy.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 prepended to floppy.img. The floppy.img bootable image is assumed to be relative to the file being imagized, in this case
/scratch/linuxinst/m91inst\
/
images/floppy.img
-R
Include Rock-Ridge extensions for readability everywhere
-o /tmp/cd.iso
This defines the output file, an ISO9660 image ready for burning
/scratch/linuxinst\
/m91inst
/images/floppy.img
This is the file to put on the CD.

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 part
Functionality
dev=0,3,0
The CD burner device. If you don't know it, use the cdrecord -scanbus command to find out.
-speed=12
Set this to the fastest speed supported by your burner/media combination.

-blank=fast
Use this ONLY if burning a rewriteable. This erases the current CD contents, but does it fast rather than thoroughly.
-pad
Add 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
-v
Verbose
-eject
Eject when finished
/tmp/cd.iso
The 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. The cdrecord step is the same as described in the Mastering and Burning it the Easy Way article:
  • As root, make sure there's a /mnt/test directory
  • As root, mount -o loop,ro /scratch/linuxinst/m91inst/images/floppy.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/floppy.img /tmp/floppycopy
  • mkisofs -pad -b floppy.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.

==================================================
How to make a bootable MSDOS USB key
*NOTE: A USB key will boot only if the BIOS in your computer explicity supports that feature.
http://www.bootdisk.com/bootdisk.htm
http://www.abxzone.com/forums/f41/bootable-usb-pen-drive-how-44237.html
http://www.weethet.nl/english/hardware_bootfromusbstick.php
http://www.laptopvideo2go.com/forum/index.php?showtopic=17150
http://www.hardforum.com/showthread.php?t=1200939&highlight=p6n+sli+platinum