Go to the first, previous, next, last section, table of contents.

8. Disk Imaging

Disk imaging is a method for avoiding the tedious Windows install process. For example, if you want to install Windows and Office on 1000 machines, it'll probably take you about 5 times 1000 hours. Things aren't so bad with GNU/Linux, because there are programs like Red Hat's kickstart, which allow you to automate the install of other programs, or practically anything you need to do. Therefore, disk imaging is really only used for Windows machines. Obviously, we urge you to not use Windows (or any non-free software) at all, but we realise that most organisations would find it impossible switch from Windows to GNU/Linux (or other free software) without a transition period, where both systems are available.

With disk imaging, you can burn a CD with a disk image of a partition containing Windows and Office, and copy the partition directly onto the hard disks of all the computers, by sticking in a boot disk and the CD, and letting it fly. But the partition on the Windows disk is probably going to be bigger, so the partition will also have to be resized. I've had several people say that they've managed to automate this process with Linux boot floppies and Parted. It is possible to use the CDROM only, by using the floppy as the boot image on the CD. Read the CD writing HOWTO for more information. There are a few weird things you have to do to get this whole thing to work (which will be fixed in the next stable series). Anyway, this is the general process:

  1. Install Windows on a machine, with the setup you want. You can have the partition as big as you want, so long as you don't use more than 640 Mb, and you leave enough room for a complete Linux install, and another 1300 Mb for two copies of the CD image.
  2. Install Linux on the machine.
  3. Make a directory for the CD image (e.g.: `/root/cdimage')
  4. Create a 640 disk image file (e.g.: `/root/cdimage/diskimage') in the CD image directory:
    # dd if=/dev/zero of=/root/cdimage/diskimage bs=1M count=640
  5. Use Parted to copy the Windows partition to the disk image:
    # parted /root/cdimage/diskimage mklabel msdos
    # parted /root/cdimage/diskimage mkpart primary fat32 0 639
    # parted /root/cdimage/diskimage cp /dev/hda 1 1
  6. Create the CD image from the CD image directory, and burn it to CD with your favourite CD writing tools.
  7. Compile a special version of Parted without native language support and readline support (or download the special RPM from Freshmeat):
    localhost:~/parted-1.0.0# ./configure --disable-nls --without-readline --disable-shared; make
  8. Create a Linux boot disk (see the Bootdisk HOWTO).
  9. Put the cut-down version of Parted on the boot disk (or a supplementary root disk).
  10. Write a shell script to do the following:
    mount /dev/cdrom /mnt/cdrom
    parted --script /dev/hda mklabel msdos
    parted --script /dev/hda mkpartfs primary fat 0 some-size
    parted --script /dev/hda cp /mnt/cdrom/diskimage 1 1
    parted --script /dev/hda set 1 boot on
    some-size is the size you desire the first partition to use.
  11. Start installing! Stick the floppy + CD into each computer, and let it roll...

Obviously, I can and will make this process a lot easier. We're considering making a mini-distribution to do this. I wouldn't have time to maintain such a thing -- any volunteers?

Go to the first, previous, next, last section, table of contents.