Tuesday, November 24, 2009

Making a DOS-bootable USB disk from Ubuntu

It is again the start of a new semester. We need to prepare the laboratory computers for students use. We do this by creating a source disk and doing a disk-copy to the other computers. This approach works because computers in a laboratory have similar specifications.

Last weekend, I run into the problem of making a USB disk DOS-bootable for use in copying hard disks. I needed to create one because the floppy drives in the laboratory computers are not working. The Norton Ghost program needs to run in DOS. The following are the steps I followed to make the disk.

  1. Downloaded a FreeDOS disk image from http://www.finnix.org/Balder.
  2. Installed Qemu.
    $sudo apt-get install qemu
  3. Prepared the USB disk by creating a single FAT16 partition. In my Ubuntu box, my USB disk is /dev/sdb.
    $sudo gparted /dev/sdb
  4. Ran Qemu using the FreeDOS image for the first floppy(A:)  and the USB disk as the second floppy (B:).
  5. $qemu -fda balder10.img -fdb /dev/sdb
  6. From within FreeDOS, I formatted drive B: and made it bootable.
    A:\>format /s b:
  7. Tested if the USB disk is now bootable.
    $qemu -fda /dev/sdb
  8. Copied the Norton Ghost program to the USB disk.
After changing some settings in the BIOS of the PCs in the laboratory, the DOS bootable USB disk from Ubuntu did its job.