Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Tip of the Day: "ghosting" a machine with nc and dd



On Tuesday 17 July 2007 16:18:24 Josh Glover wrote:
> Thanks, and you just reminded me of something from the meeting:
>
> Travis advised running:
>
> dd if=/dev/zero of=/dev/hda
>
> on the target host before starting. I have updated the wiki to include
> that tip. He also suggested using bz2 or gzip if the network is the
> bottleneck.

If you use gz/bz2 or other compression program to compress the disk images, 
run the above command before you install and set up the source system so that 
you do not waste time (and space) compressing unneeded data.

I made use of this at a previous job where we had to support our software in a 
number of window managers, with 16 possible language settings, for four 
distributions of Linux.  I became involved because I was the only one on the 
development team who could grok CJK, which were the most difficult languages 
for people to work with.  (This was back in the days of kinput2, of course.)  
With so many possible system configurations, I would store gz drive images of 
fully configured systems on a network share.  When a tester reported a 
significant CJK bug, it was then easy for the developer to transfer 
and "install" the applicable system with a single Linux command.

I have also used the /dev/zero and gz/bz2 combination to create backups of 
(large) drives that easily fit on CD-R or DVD-R media.  If you want to roll 
out a large number of identical systems "ghost style," using DVDs allows you 
to do many in parallel without flooding the LAN.

One more note: I usually specify the block size when I use the dd command.
	Example: dd bs=1MB if=/dev/zero of=/dev/hda
Note that the MB multiplicative suffix is the hardware definition of megabtye 
(1000*1000, not 1024*1024), which is what you want when you use dd on hard 
disks.  See `man dd` for details.
	http://linux.die.net/man/1/dd

> Travis, care to add that to the wiki as a note?

I have to leave soon, but I will do so soon.

Cheers,

Travis


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links