[NCLUG] "ghost" a Windows box using dd, other Linux tools

Gabriel L Somlo somlo at CS.ColoState.EDU
Mon Jul 23 12:11:43 MDT 2001


We've done this here at the CSU/CS dept:

first, boot off the Slackware CDROM (it gives you a shell and lets you
play, as opposed to other distros which try to control everything you do
:) :) )

Then, you  'dd if=/dev/zero of=/dev/hda', so that later you can gzip the
whole thing and have the result be less than 2Gb (linux won't like it if
it's bigger)

Then, you install windows on the box, and tweak it until it's happy.

next, you boot off the Slackware CD again, load the network drivers, use
ifconfig and route to get on the network, and mount an NFS partition.

Then, you do

dd if=/dev/hda | gzip -v9 > /mnt/nfs/image.hda.gz

The gzip is necessary to make sure the resulting file is less than 2Gb,
otherwise linux might throw a hissy fit. This is when you'll thank
yourself for having dd'ed from /dev/zero before installing windows.

To do the reverse operation, boot the Slackware disk, gain access to NFS,
and

gzip -d < /mnt/nfs/image.hda.gz | dd of=/dev/hda

This takes care of EVERYTHING, including the partition table, and the
machine is bootable and usable right after...


I've tinkered a little with the Slack CDROM to automate some of the stuff
required to get on the network. email me if you want the iso image of the
cloner CD we're using here (cca. 4Mb or so)...

Cheers,

Gabriel



-- 
-----------------------------------------------------------------------
      Gabriel L.  Somlo                 Assistant System Administrator

 Computer Science Department
  Colorado State University             e-mail: somlo at cs.colostate.edu
   601 Howes St. 2nd Floor               phone: +1 (970) 491-5305
   Fort Collins,  CO 80523
-----------------------------------------------------------------------




More information about the NCLUG mailing list