Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR...

26
Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito 1 Francesco Maria Taurino 1,2 Gennaro Tortone 1

Transcript of Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR...

Page 1: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

Installation of W2K/WXP using theunattended.sourceforge.net

project

INFN - Napoli1

INFM - UDR Napoli2

HEPiX/HEPNT 2003 – Vancouver

Rosario Esposito1

Francesco Maria Taurino1,2

Gennaro Tortone1

Page 2: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 2

Scenario

Installation of a large number of Windows 2K/XP workstations must be frequently managed by few people

Windows installation is a time-consuming activity (long and boring… )

Hardware on each workstation can be very heterogeneous

Installation of a typical set of applications (Office, Acrobat Reader, Ghostview, Netscape…) is required on each workstation

Page 3: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 3

How to install Windows 2K/XP ? [1/3]

1) Manual installation Advantages: High customization level of

system configuration, disk partitions, applications, updates & service packs…

Disadvantages: Requires the presence of an operator during the installation process

Page 4: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 4

How to install Windows 2K/XP ? [2/3]

2) Disk Imaging based installation Advantages: installation is very fast and

consists of a simple copy of files from the “image” of a preconfigured workstation (golden client) to the target machine

Disadvantages: In the case of heterogeneous hardware a large set of “similar” images must be maintained. Deploying new applications requires an image rebuilding

Page 5: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 5

3) Unattended installation (unmanaged) Advantages:

Human activity during installation is (almost) zero. Fresh installations usually work better than disk

imaging when workstations have different hardware Disadvantages:

It’s a “real” installation, not a simple file copy, thus it takes about 1 hour to be completed

Initial setup activity is required to configure an installation server

How to install Windows 2K/XP ? [3/3]

Page 6: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 6

Unattended installation systems [1/3]

Microsoft RIS (Remote Installation Service) Advantages:

Supports both unattended and disk imaging based installations

It’s user-friendly (GUI, Wizards, Online Helps…) Disadvantages:

Runs only on Windows2K (or 2003) and requires Active Directory

Supports a fixed partition scheme (C:) Limited set of supported NICs. Deployed applications must be in .msi format

Page 7: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 7

Unattended installation systems [2/3]

Unattended.sourceforge.netIt’s an OpenSource project to manage unattended installations of Windows 2K/XP workstations

Advantages: No need of Windows and Active Directory at server

side Supports a large number of network adapters Customizable partition scheme No need of .msi format to deploy applications

Page 8: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 8

Unattended installation systems [3/3]

Unattended.sourceforge.net

Disadvantages: No user-friendly interfaces Tuning of some perl scripts and batch files is

required at server side to obtain a good site dependent installation system

No support for disk imaging based installations

Page 9: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 9

Typical Unattended Installation Steps

Server side:1) Export the i386 directory, containing the operating

system2) Create an “unattend.txt” file for client workstations

Client side:1) Load MS-DOS somehow2) Create and format system partition3) Mount the i386 directory via network

4) Execute:…\i386\winnt.exe /u:unattend.txt …

Page 10: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 10

Unattended.sourceforge.net Requirements

Server Side Any computer that can export a read-only

directory via NetBios A DHCP server Optional: a TFTP server (for PXE network

based installations)

Client Side Any Windows 2K/XP compatible PC with a

network adapter Optional: a PXE compliant network adapter

Page 11: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 11

The installation directory (Z:)

dosbin: DOS utility programs (like fdisk) from the project. Also contains install.pl, the master installation script.

lib: helper files for the master installation script. This includes the default unattend.txt

djgpp: set of unix tools for MS-DOS, such as the perl interpreter site: site-specific customizations (i.e., unattend.txt templates) os: contains Windows installation media (i.e., copies of the CD-

ROMs) scripts: contains scripts needed to deploy applications packages: contains application installers (Office, Acrobat

Reader, Netscape, …) …

Page 12: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 12

Unattended.sourceforge.net Server side setup

1) Create an incomplete unattended installation file Z:\site\unattend.txt (i.e. using setupmgr.exe from Windows deployment tools)

2) Copy OS installation files in z:\os subdir(i.e. z:\os\winxpsp1-eng, z:\os\win2ksp4-ita …)

3) Add device drivers in z:\os\winXXX\$OEM$\$14) Apply service packs:

\xpsp1\i386\update\update.exe /s:Z:\os\winxpsp1

5) Put installers in z:\packages subdir(i.e. z:\packages\officeXP, z:\packages\netscape, …)

6) Create an installation script for each application(i.e. z:\scripts\office2k.bat, z:\scripts\netscape.bat, …)

Page 13: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 13

Unattended.sourceforge.net Client side setup [1/4]

MS-DOS boot[Floppy, CD-ROM,

PXE]

\\server\install Z:

Z:\dosbin\install.pl

Z:\<winXX>\winnt.exe /u c:\netinst\unattend.txtC:\netinst\

postinst.bat

Page 14: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 14

Unattended.sourceforge.net Client side setup [2/4]

The install.pl script:

Selects partition scheme (free-fdisk). Reboots in case of change.

Selects the OS (winxpsp1-eng, win2ksp4-ita, …) Inserts missing parameters in z:\site\unattend.txt

(computer name, administrator password, additional drivers, network setup…) [z:\site\config.pl]

Selects application set(ex. base.bat, developer.bat, sales.bat, …)

Creates c:\netinst directory(contains postinst.bat, complete unattend.txt, installation logs…)

Runs winnt.exe for unattended installation

Page 15: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 15

Unattended.sourceforge.net Client side setup [3/4]

The postinst.bat script:

Connects the installation directory to drive Z: Installs ActivePerl in unattended mode Runs the script c:\netinst\todo.pl to build a “todo

list” to install the requested application set Runs application installers and configuration scripts

in unattended mode, following the “todo list” Disables the Administrator autologon

Page 16: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 16

Unattended.sourceforge.net Client side setup [4/4]

Example:postinst.bat

net use z: \\server\install

call z:\scripts\activeperl.bat

PATH=z:\bin;%PATH%

todo.pl .reboot

todo.pl “autolog.pl –logon=0”

todo.pl z:\scripts\base.bat

todo.pl --go

todo.pl printers.bat

todo.pl xpupdates.bat

todo.pl ghostview.bat

todo.pl sav.bat

todo.pl netscape.bat

todo.pl ie6.bat

todo.pl office2k.bat

todo.pl acrobat-reader.bat

todo.pl hidepw.pl

todo.pl "auconfig.pl 3"

base.bat

Page 17: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 17

Installing applications [1/6]

Win32 applications use several installer programs.(Almost) all of them support unattended installation mode

MSI packagesmsiexec /qb /l* logfile.txt /i package.msi OPT1=VAL1 OPT2=VAL2 …

InstallShield, PackageForTheWebstart /wait package.exe /a /s /sms /f1package.iss /f2logfile.txt

Wise InstallMaster, Nullsoft Scriptable Install Systemstart /wait package.exe /s

Inno Setupstart /wait package.exe /silent

Microsoft hotfixesQ811493.exe -q -z –n or q330994.exe /q:a

Page 18: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 18

Installing applications [2/6]

Some applications (very few) do not support unattended installation mode. In this case we can:

Write scripts for the AutoIt.exe tool Application repackaging (ex. Wise,

Microsoft free tools, …) Create “ad hoc” scripts (ex. unpack the

application, copy all files, insert keys in the registry…)

Page 19: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 19

Installing applications [3/6]

Unattended.sourceforge.net provides: Batch/perl scripts for unattended installation of popular applications (Office, Acrobat Reader, Visual C++, Internet

Explorer, Netscape/Mozilla, etc…) Detailed instructions to recognize application installer types and switches to use for unattended installation mode Scripts to automate operations during the installation (autologon, printers configuration, WindowsUpdate client

configuration, etc.) Some directives to be used in todo.pl script for special purposes (.reboot, .ignore-err, .sleep, …)

Page 20: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 20

Installing applications [4/6]

Example: Office2K [or XP] Download Office Resource Kit (free) from Microsoft Create in z:\packages\office2k a customized Office distribution (license code, office components, installation path, etc..) Download service pack (i.e. o2ksp3.exe) Use the office2k.bat (or officexp.bat) script from unattended.sourceforge.net

todo.pl .reboottodo.pl “z:\packages\office2k\o2ksp3.exe /q … “todo.pl “msiexec /qb /i Z:\packages\office2k\data1.msi … “

Page 21: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 21

Installing applications [5/6]

Example: Internet Explorer 6 Download Internet Explorer Administration Kit (free) from Microsoft Create in z:\packages\ie6 a customized distribution of IE6 (components, settings, home page, etc..) Download cumulative patches Use the ie6.bat script from unattended.sourceforge.net

todo.pl .reboottodo.pl ".ignore-err 194 z:\packages\ie6\q88529.exe /q:a"todo.pl .reboottodo.pl ".ignore-err 194 z:\packages\ie6\IE6setup.exe /q /r:n"

Page 22: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 22

Installing applications [6/6]

Example: Acrobat ReaderThe installer is in “Package For The Web” format:

Register an answer file:AcroReader51.exe /a /r /f1c:\acroread.iss

Create a file z:\scripts\acroread.bat with:start /wait AcroReader51.exe /a /s /sms /f1z:\packages\acroread.iss

Example: Netscape 7.02Just create a file z:\scripts\netscape.bat with:start /wait z:\packages\netscape\NS702base.exe -ms -ira -ispf

Page 23: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 23

Configuring printers

Use the rundll32.exe with some switches…

Example:Push this command to the “todo list” stack:

start /wait rundll32 printui.dll,PrintUIEntry /if /r "\\server\printer" /m "HP LaserJet 8150 Series PS"

Page 24: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 24

How we use it…

90% of installations are performed via PXE At the moment we deploy only WXP in Italian Install.pl script has been customized to ask only:

system partition size computer name IP address and gateway

All the available MS hotfixes are installed silently during installation

Default application set: OffixeXP, IE6sp1, acroread, winzip, netscape7, NortonAV, putty, winscp2, ghostview, JRE, mediaplayer

Page 25: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 25

Conclusion

Unattended.sourceforge.net is a valid alternative for Remote Installation Service (~OpenRIS !), primarily in a Unix-oriented server environment

It’s completely FREE and presents all of the advantages (and flaws) of an OpenSource project

It has interesting features, like the extreme flexibility of installation scripts

It’s not the optimal choice in the case of homogeneous hardware

No support for application deployment after the installation

Page 26: Installation of W2K/WXP using the unattended.sourceforge.net project INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.

HEPiX/HEPNT 2003 – Vancouver 26

References

http://unattended.sourceforge.net

“ The two basic principles of Windows system administration:

For minor problems, reboot For major problems, reinstall ”

;-)