Presentation is loading. Please wait.

Presentation is loading. Please wait.

UCCSC 2009 Using BITS to Transfer Ghost Images Tim Leamy IET – Academic Technology Services UC Davis.

Similar presentations


Presentation on theme: "UCCSC 2009 Using BITS to Transfer Ghost Images Tim Leamy IET – Academic Technology Services UC Davis."— Presentation transcript:

1 UCCSC 2009 Using BITS to Transfer Ghost Images Tim Leamy IET – Academic Technology Services UC Davis

2 UCCSC 2009 Outline Why? Background & History Win9X WinXP – initial attempts Two partitions BITS Image creation overview Details Windows FreeDOS Initial PC setup

3 UCCSC 2009 Why? Ghost works well for imaging But built-in tools have issues moving large image files, especially across multiple subnets BITS Solution Single server for all images Images reliably transferred in the background while PCs are in use Very short downtime to image Free – already in Windows Same BITS solution should apply to other imaging packages

4 UCCSC 2009 Background & History Computer Lab Management 18 computer rooms 10 separate networks 330 PCs Maintain 12 different images Ranging from 5–10GB PCs locked down and profiles deleted nightly

5 UCCSC 2009 Background & History Windows 95 – Windows ME Win 9X – used PC-Rdist Worked extremely well Could rebuild registry in DOS before Windows started Easy to copy changes from one lab to the next

6 UCCSC 2009 Background & History Windows XP Win XP Didn’t work well with PC-Rdist Needed to use Ghost for initial install Switched to using Ghost Testing in the office worked well Attempted to use one Ghost console for labs on multiple subnets Attempted to multicast across routers

7 UCCSC 2009 Background & History Ghost network issues Encountered difficulties with Ghost tools working across different networks Network connectivity & reliability across routers Multicast didn’t work across routers Large images meant long downtime

8 UCCSC 2009 Background & History Two Partitions Eureka moment – Ghost uses “virtual partitions” – why not use real ones? Created two partitions on hard drive FreeDOS partition 4GB initially with FreeDOS, Ghost, and image files Now 40GB WinXP partition Rest of disk

9 UCCSC 2009 Background & History Two Partitions Used PC-Rdist to copy ghost image files from server to FreeDOS partition Worked ok Very fast to ghost from one partition to the other Simple – put new image on server and it was copied to all clients Could manage images for all labs from my office But …

10 UCCSC 2009 Background & History Two Partitions Problems PC-Rdist took a while to copy down image files Could make a PC unusable for 15 minutes in middle of day Copying image to entire lab was very slow

11 UCCSC 2009 Background & History BITS Background Intelligent Transfer Service (BITS) Used for Windows Automatic Updates Already Built into XP Robust Uses “spare” bandwidth to download files in background No disruption to student use Uses standard web protocols

12 UCCSC 2009 Background & History BITS Switch to BITS Moved images to web servers Downloaded bitsadmin.exe Created bits.pl script Used cron for automation

13 UCCSC 2009 Background & History BITS Worked Great! Images transferred in background Very reliable – copy image up to server and all PCs restored the next morning Fast – PC have only ~10 minutes downtime for imaging Easy to manage images

14 UCCSC 2009 Image Creation Overview Logon as restore Sets Freedos partition as active Reboots and reimages itself Install new software, configure it, etc. Run freedos.cmd in Windows to reboot to Freedos partition Prepares the PC for imaging Clears event logs, set NIC to DHCP, etc Reboots to FreeDOS partition Run image.bat to create new image

15 UCCSC 2009 Image Creation Overview continued Run windows.bat to reboot into Windows Run upload.cmd to copy new image to server Move the updated image to the proper directory in the web server The other PCs will see new image and download it in background with BITS Takes a few hours to download, but PCs are still in use PCs are turned off that night. PC set to boot at 4:00am everyday Boot to FreeDOS partition Installs new image Reboots to Windows

16 UCCSC 2009 The Details Windows side FreeDOS side Circular – so some things won’t make sense until the end

17 UCCSC 2009 The Details – Windows Side Utilities bitsadmin robocopy gdisk32 cron ActiveState Perl

18 UCCSC 2009 The Details – Windows Side bits.pl Runs every half-hour via cron Checks status of BITS job (lines 39-77) If a new images has been downloaded it copies new image files to Freedos partition and creates flag file (lines 50 – 61) Checks web server for updated image files (lines 79-99) Creates BITS jobs to download images with bitsadmin (lines 106-135)

19 UCCSC 2009 The Details – Windows Side Scripts – Windows Startup script Sets environment variables used by other scripts from the PC name LAB, PC_NUMBER Sets IP address if needed

20 UCCSC 2009 The Details – Windows Side Scripts – Windows Logon script If username is restore it sets the restore flags and reboots PC

21 UCCSC 2009 The Details – Windows Side Scripts – Windows Shutdown script If flag file exists it uses gdisk32 to make the Freedos partition active Runs restore.pl to create restore.bat Clean up before imaging Clears some log files & event logs Set NIC to DHCP Robocopy to make sure Freedos partition has correct files

22 UCCSC 2009 The Details – Windows Side restore.pl Runs in shutdown script Creates restore.bat in the Freedos partition Uses lab and pc_number environment variables restore.bat is custom for each PC  PC Name  SID

23 UCCSC 2009 The Details – Windows Side Scripts - freedos.cmd echo clean > c:\temp\clean gdisk32 1 /act /p:1 /i c:\ucd\sd 4

24 UCCSC 2009 The Details – Freedos Partiton Utilities ghost gdisk ghstwalk wait reboot

25 UCCSC 2009 The Details – Freedos Partiton Scripts - autoexec.bat @echo off path=c:\ del *.tmp wait 5 Starting computer.... if errorlevel 1 goto end echo Starting restore c:\restore.bat :end

26 UCCSC 2009 The Details – Freedos Partiton Scripts - restore.bat rem Setting up to restore PC #00 in 163LIB c:\ghost -clone,mode=pload,src=\images\winxp.gho:1,dst=1:2 -sure -batch -fni -auto c:\ghstwalk /cn=XXXX /bv=1:2 /sid=XXXXXX /ignore_domain /sure /fni c:\gdisk 1 /act /p:2 /i c:\reboot

27 UCCSC 2009 The Details – Freedos Partiton Scripts – image.bat @echo off rem Make new ghost image in c:\images\winxp.gho rem delete ghost files (.gho &.ghs) but keep readme file echo y | del c:\images\*.gh? > nul: ghost -clone,mode=pdump,src=1:2,dst=c:\images\winxp.gho -z2 -fni -span -auto -sure dir c:\images

28 UCCSC 2009 The Details – Freedos Partiton Scripts – windows.bat gdisk 1 /act /p:2 /i reboot

29 UCCSC 2009 The Details – Windows Side Scripts - upload.cmd Updates readme.txt in FreeDOS partition Copies the updated image files to sever as LABNAME.new

30 UCCSC 2009 Initial PC Setup USB Hard Drive FreeDOS Uses ghost to install image with FreeDOS partition and empty 2 nd partition to HD Creates restore.bat Copies image files to FreeDOS partition Reboots to FreeDOS partition and ghosts itself

31 UCCSC 2009 Initial PC Setup Linux Flash Drive Also working on bootable flash drive with Linux Connects to network and downloads image files from web server Partition table differences – so there are some difficulties Initially used floppies with DOS networking. But trying to move away from them.

32 UCCSC 2009 What do you need? Web server for images 2 nd partition on hard drive Determine what restore.bat should contain for your setup Script to create restore.bat if needed

33 UCCSC 2009 For More Info UC Davis BITS Website http://lm.ucdavis.edu/people/tim/lab/winxp/ Tim Leamy tcleamy@ucdavis.edu Q&A


Download ppt "UCCSC 2009 Using BITS to Transfer Ghost Images Tim Leamy IET – Academic Technology Services UC Davis."

Similar presentations


Ads by Google