Novell Home

Image New Machine in 30 Minutes with Virtual CDs

Novell Cool Solutions: Trench
By Robin Small

Digg This - Slashdot This

Posted: 23 Apr 2002
 

Current Version: ZENworks for Desktops 3.2

Being a governmental agency (City of Fresno), we typically buy our computers in bulk. We needed a way to quickly deploy PCs several at a time. Our techs would have to do application installs, client loads, service pack updates, the list goes on. It would take time to get these done the manual way. Even with application pushes, it would tax their lan segments. So, what we've done is implemented an auto-installing Windows2000 sysprepped image with ZEN Imaging, and created Virtual CDs for post-image application deployment (I won't go into detail about the Virtual CDs, unless you're interested. But, it's really easy to do).

Our techs can pull the PC out of the box, boot from the CD, and walk away for about 20 minutes. When it's done, the PC will eject the CD and then halt the system. (As an anectode, I originally had my scripts perform a reboot. But most PCs pull the CD back in when it starts up. So it would do a continuous loop of imaging. Although it was amusing at first, it wasn't really productive).

When sysprep finishes and it reboots one last time, then we can deploy all the necessary applications again from a CD. It's nice because we don't have the extra traffic across the LAN, we can deploy it to remote sites, and we can give our techs a CD of applications without giving out the originals (or copies).

So, to solve the problem, I started digging into the ins-and-outs of ZEN Imaging. The ATT course helps *immensely* with this. So, for any readers that can spend some well-justified training money, I'd highly recommend it. And, Mike Gord (one of the talented Zen ATT instructors) just *rocks*.

To start, I've got a linux distribution (SuSE) with a cdrw drive. It's not necessary, but it's helpful. You can burn your CDs locally without having to transfer them to Windows and burn them there.

To get things set up, you'll probably need to download a few files. The first one is SYSLINUX. It's a collection of bootloaders for Linux. The one we need is ISOLINUX. You can find that at http://syslinux.zytor.com/ or you can do a lookup at http://www.freshmeat.net for SYSLINUX or ISOLINUX.

The second set is a small utility to eject the CD-ROM. You should compile it, although you may be able to just copy it from your linux distribution. Compiling is safer. I went to http://eject.sourceforge.net/ to get the source files, but you can again find them on http://www.freshmeat.net. For my use, I built the eject utility using the ZenDist.tar.gz file downloaded from Cool Solutions (it talks about how to customize the zen imaging distribution).

Then, you'll need to copy in the bootcd.iso that comes with ZENworks. It's usually in the SYS:\PUBLIC\ZENWORKS\IMAGING on your ZFD server, or anywhere you've installed the ZFD snapins (I think).

On my linux PC, I've got the following directory structure:

~ (home)/
   zen/
     bootcd/
     initrd/
     iso/
       newcd/
     extras/
        eject
       eject.s
       imgit.s
       runme.s
       settings.txt
     bootcd.iso
     isolinux.bin
     mkzeniso.sh

Using the above directory structure as an example (assuming your current directory is ~/zen/):

mount -o loop bootcd.iso ./bootcd
cp ./bootcd/* ./newcd
umount bootcd
cd newcd
gunzip initrd.gz
mount -o loop initrd ../initrd
cd ../initrd/bin
cp ../extras/eject* .
cp ../extras/imgit.s .
cp ../extras/runme.s .

What all of this does is:

  • Mounts the ISO as if it were a device, and copies it into a working directory ( ./newcd ).
  • Un-gnuzip's the initrd file to allow mounting and editing.
  • Mounts the initrd file.
  • Copies in the custom files and scripts.

** Note: the runme.s is a novell-provided script that I've changed. On line 45, the original calls the automated imaging script:

if [ $RUNLEVEL = '2' ]
then
    imaging.s boot
elif ...

I've commented this out, and replaced it with the following four lines:

if [ $RUNLEVEL = '2' ]
then
    # imaging.s boot
    cdrom.s
    imgit.s
    eject.s
    halt
elif ...

What this will do is mount the CDROM, run the customized imaging script, eject the CD when it's done, and halt the system (requiring manual reboot).

cdrom.s is already included with the zen imaging partition.
I created eject.s (the script) using the cdrom.s as an example. The imgit.s and eject.s files are included as attachments. (See below.)

Once that's done (copying all the files and/or editing the runme.s file), then type in the following:

cd ~/zen/newcd
umount ../initrd
gzip initrd
copy ./extras/settings.txt .

This will unmount the initrd file, then recompress it for the image to load.

After that's finished, copy in your image file. I have the NW FTP server running on my imaging server, so I use that. But with NetWare 6 and Native File Access, you can get to it with CIFS or NFS too.

Also, I add in the settings.txt that includes the location of the proxy server and other various settings that the imaging software needs to run.

Then run:
./mkzeniso.sh

This will make the ISO file and name it "~/zen/iso/isoname.iso". The name is arbitrary. Once they've been tested, I'll name it something indicative of the imaged box (for example: gx240ipx for a Dell GX240 with the IPX client).

I'm using a Linux PC with a cdrw drive, so I use XCDRoast to burn the image. If you don't have one, and have a Windows PC, you can copy this completed ISO file and burn it with your favorite Windows cd-burning app.

That's it. Once it's done, you can put this CD into a new PC and have a ready-to-log-in PC in about 30 minutes. Adding on applications takes about another 20. We replicate the master CD, and our techs use it to image same-model PCs in 50% to 25% of the time it used to take them.

Download

Download fresnoimg.zip for the three files Rob has shared:

  • eject.s
  • imgit.s
  • mkzeniso.sh

Rob Small is a Network Systems Specialist for the City of Fresno (California, USA). If you have any questions you may contact him at Robin.Small@ci.fresno.ca.us


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell