2. Making preparations
2.1 Creating a g4u diskette on the server
2.2 Creating a g4u diskette on another computer
2.3 Ghost for unix on CD
2.4 The list of MAC addresses
3. Before restoring an image on a new workstation
3.1 Preparing the hardware
3.2 Booting the computer with g4u
3.3 Retrieving the MAC-address
3.4 Assigning a fixed IP-address
3.5 Hints and tips
4. Restoring an image on a workstation
4.1 Booting the computer with g4u
4.2 Using the slurpdisk command
4.3 Setting the workstation name
4.4 Setting the default printer
4.5 Hints and tips
5. Creating an image of a workstation
5.1 Booting the computer with g4u
5.2 Using the uploaddisk command
5.3 Hints and tips
This chapter describes the necessary preparations for working with g4u. Also the procedure to create and restore a disk 'image' on a workstation is discussed. An image of a hard drive is an identical copy of the hard drive, including empty sectors, akin to cloning the data. Also known as creating a 'mirror image' or 'mirroring' the drive or creating a 'ghost image'. (adapted from: http://precisecyberforensics.com/glossary.html).
NOTICE: In order to work with g4u you need to have a valid username and corresponding password on the server. Your local systems administrator or your ICT coordinator can provide these. Please refer to section 13.1 Creating a g4u user account in chapter V. Configuring all ServerAtSchool components of the ServerAtSchool Installation Guide for more information.
In section 2. Making preparations the necessary steps to create a bootable g4u boot floppy are discussed. This section also talks about collecting MAC-addresses of all workstations. These are all procedures that need to be done only once. This section is recommend reading for the local systems administrator.
Section 3. Before restoring an image on a new workstation handles the case of restoring an image on a new workstation. This is different from restoring an image in general because the BIOS of the workstation needs to be configured and the MAC-address has to be retrieved. This is a procedure that is necessary only once per workstation. This section is recommended reading for the local systems administrator and perhaps for the ICT coordinator too.
Section 4. Restoring an image on a workstation documents the task of bringing a workstation back to a 'known-good' state by restoring an image that was created earlier. This section is recommended reading for both the ICT coordinator and the local systems administrator. It could be of interest for selected members of the staff interested in keeping the workstations in their classroom clean.
Finally, section 5. Creating an image of a workstation deals with uploading an image of a workstation to the server. After an image has been created this way it can be downloaded to all other workstations, bringing them up to date. This section is recommended reading for both the ICT coordinator and the local systems administrator.
NOTICE: This chapter continues using the example school introduced in section 2. The Exemplum Primary School of chapter II. ServerAtSchool User Manual Overview. At this school Freddie Frinton (userid 'ffrint') is the local systems administrator and Amelia Cackle (userid 'acackl') is the ICT coordinator. The user account used for storing g4u images on the server is called 'install', with password 'cooT9joo'. Note that your school may have a different account and/or password; these are just examples.
NOTICE: Image creation and restoring was done on a 4.3 GB harddisk.
On the g4u site you can also find additional documentation for ghost
for unix. There is also a CD-ROM image available for download on the
g4u site. A CD-ROM image for version 1.17 can be found on your server
in \\SERVER\install\goodies\g4u
. If your client computers have
CD-ROM players but no diskette drives, you can use this image and run
g4u without diskettes. See also section 2.3 Ghost for
unix on CD below.
00:80:D0:9B:DC:F7
.
Every workstation has to have an IP-address in order to communicate
with the server. IP stands for Internet Protocol. These addresses are
usually written as four decimal numbers separated with dots, for
example 192.0.34.166
. This notation is called
'dotted-decimal'.
In a standard ServerAtSchool setup the server has been assigned the
fixed IP-address 172.17.2.1
whereas the
workstations receive a dynamic IP-address from the DHCP-server. DHCP
stands for Dynamic Host Configuration Protocol. This dynamic
IP-address is allocated from the pool of dynamic addresses as
defined in the configuration file /etc/dhcpd.conf
of the
DHCP-server. By default this range starts with
172.17.2.141
and ends with 172.17.2.240
.
In the standard ServerAtSchool DHCP configuration file another range
is reserved for the so-called static pool. This range starts
with 172.17.2.21
and ends with 172.17.2.120
.
By combining the unique and machine-specific MAC-address with an
IP-address from this static pool of IP-addresses it is possible to
make absolutely certain that a computer with a particular MAC-address
always gets the same IP-address. This mapping between
MAC-address and IP-address is established by editing the aforementioned
configuration file /etc/dhcpd.conf
and restarting the
DHCP server.
For further details on this issue see section 5. DHCPD in V. Configuring all ServerAtSchool components of the ServerAtSchool Installation Guide.
It is important that all workstations always get the same
IP-address because otherwise you can never be sure that the machine
labeled '34' on the outside (with a felt tip pen) is in fact
workstation 'C34' with IP-address 172.17.2.34
. It is
also important (and efficient) to let all workstations use the DHCP
protocol to receive an IP-address because it is a lot of work to
assign IP-addresses in the workstation configuration manually. If you
want to satisfy both conditions, you should create a list of all
MAC-addresses of all workstations and assign an IP-address from the
static pool to each one of them. This way every workstation always
gets the IP-address you assigned rather than some random address from
the dynamic pool.
NOTICE: It is also a good security measure to let the 'known' workstations have an IP-address from the static pool. The local systems administrator can easily track individual workstation behaviour and can prevent, for example, unauthorized laptops accessing the schools LAN (Local Area Network). That would be a matter of disabling the dynamic pool alltogether.
NOTICE:
It is a good idea to also write down the MAC-addresses of any network
printers you may have. By convention a ServerAtSchool network uses
IP-addresses in the range 172.17.2.10
to
172.17.2.19
for printers. For printers it is even more
important that they receive the same IP-address every time. You even
may want to add a special 'printer pool' in the configuration file
/etc/dhcpd.conf
and use it for documenting the printer
devices.
The bottom line of the story is that we need the MAC-addresses of all workstations throughout the school. See section 2.4 The list of MAC addresses for the necessary steps to collect all MAC-addresses.
The necessary steps to create a boot floppy are repeated below, for your convenience. The easiest way is to create it on the server. The hard way is to use the DOS prompt on a workstation.
The remainder of this section discusses other necessary preparations such as making a list of MAC-addresses.
dd if=/home/share/install/goodies/g4u/g4u-1.17.fs of=/dev/fd0
This is the preferred method to create the g4u diskette because it is quick and easy compared to the alternative procedure discussed in the next section.
g4u-1.17.fs
.
RAWRITE.EXE
.
Both files are available on the server (in the directory tree under
/home/share/install/goodies
). They can also be accessed
via the 'Network Neighbourhood' on a correctly configured workstation.
Both files should be copied to a directory on the
workstation. However, you need a workstation that is
already configured to communicate with the server. This could be a classical
chicken-egg situation since you may still be busy setting up a
workstation. In that case there might not (yet) be another working
workstation available. Fortunately there is another way. You can simply use the
ServerAtSchool distribution CD-ROM on an existing DOS/Windows
computer. Here is the step-by-step procedure:
RAWRITE.EXE
to a temporary directory on
the workstation. Remember in which directory you saved the file.
g4u-1.17.fs
to the same temporary directory on
the workstation.
g4u-1.17.fs
to G4U.IMG
) in order to
prevent difficulties with the short DOS-name lateron.
RAWRITE.EXE
and click on the [Open]
button.
Enter source file name:
G4U-11~1.FS
. If
you had renamed the file to G4U.IMG
as suggested
above you would of course enter that name.
Enter destination drive:
Please insert a formatted diskette into drive A: and press
-ENTER-
Done.
, indicating
the diskette writing process is finished.
NOTICE: This procedure is similar to the procedure of creating an Autoclave diskette in section section 3.1.2 Creating an Autoclave diskette on another computer in chapter IV. Workstation setup.
NOTICE:
It can be hard to use files with so-called long filenames
(e.g. g4u-1.17.fs
or Boot Diskette.img
) with
software that expects a plain old-fashioned DOS filename consisting of
8 (upper case) characters, a dot and a 3-character (uppercase)
extension. Windows tries hard to maintain compatibility by changing
the long names into acceptable short names, usually by truncating the
name and using a tilde '~' followed by a number. However, in order to
prevent problems it is best to stick to the 8.3 type filenames.
\\SERVER\install\goodies\g4u
or
/home/share/install/goodies/g4u
). This file is called
g4u-1.17.iso
.
This file contains everything necessary to create a bootable CD-ROM that can be used to boot a computer without a floppy drive with g4u after all.
If you happen to have modern workstations, booting from CD-ROM should not be a problem, if you configured the BIOS correctly. Note that a CD-ROM would provide you with a lot more space than a diskette ever could (650 MB versus 1.44 MB). Therefore newer versions of g4u, including support for many network devices, can be stored on a single CD-ROM, even when otherwise that version would need more than one diskette.
The process of burning a CD-ROM based on the .ISO-file provided is beyond the scope of this manual. Please refer to the documentation that comes with the software you use for burning CD-ROMs. You may also want to look at the g4u project page at http://www.feyrer.de/g4u for more information.
/etc/dhcpd.conf
on the server.
In the worksheet in the appendix there is also space to write down the
physical location of the workstation, e.g. kids from room 402,
headmaster office, faculty office, Amelia's computer, etc. This
information can also be entered in /etc/dhcpd.conf
as a
comment (using a '#') as illustrated in the snippet below.
|
If you want to assign numbers to all your workstations in a systematic way, you could take the following steps.
By assigning numbers this way you can easily identify individual computers by
C34
c34.exemplum.serveratschool.net
172.17.2.34
It is strongly advised to conform to the ServerAtSchool convention and start numbering your workstations beginning with number 21. For more information on the computername is see section 5.1 Default configuration in ServerAtSchool in chapter V. Configuring all ServerAtSchool components in the ServerAtSchool Installation Guide.
Usually that means that you have to enter the workstation setup screen and make sure the BIOS-settings are the same. Since you are now configuring individual workstation hardware, now would also be a good time to collect the individual MAC-address too.
In order to make the workstations identical you should take at least the following steps.
NOTICE: Depending on the workstation you may be able to retrieve the MAC-address from the BIOS setup screen. If you can, you can write this number on the list of MAC-addresses and skip the procedure of retrieving the MAC-address discussed below.
[Ctrl-Alt-Del]
or pressing the reset-button.
At this point the computer should boot from the diskette or the CD-ROM. The monitor will show a long list of messages. Eventually you see the following screen.
|
You are now at the g4u command prompt.
If you do not end up at the g4u command prompt, you should double check the hardware and the BIOS settings. Please refer to section 3.1 Preparing the hardware above for more information. It can also be that your g4u boot floppy has worn out. In that case you could create another one, using the procedure in section 2. Making preparations above.
[Enter]
after typing the command.
|
The command ifconfig is the command to configure network interfaces and ex0 is the first interface. Issuing the command without any options but the name of the interface displays the actual settings of that interface.
The fourth line of the output shows the MAC-address. Here the address is 00:b0:80:9b:ac:f6. Note that the address is case insensitive and often written in capitals to improve readability. A handwritten lowercase letter 'A' may resemble the digit '0'. On the other hand: an uppercase letter 'D' may also resemble the digit '0'. A common trick is to always write the digit '0' as a 'slashed zero' (something like 'Ø').
Also note that the computer automatically has received IP-address
172.17.2.240. This is the first address from the dynamic pool of
addresses as assigned by the DHCP server. (Actually the last, but
dhcpd
works from top to bottom).
You now should take the following steps.
At this point you can simply switch off this computer and proceed with the next one.
/etc/dhcpd.conf
in your favourite
editor, e.g. nano(1)
or vi(1)
.
|
At this point all MAC-addresses should be linked to a fixed
IP-address from the static pool. You can check this by (re)booting a
computer (say computer 22) and issuing the command ifconfig
ex0
at the g4u prompt. The output should now show IP-address
172.17.2.22 instead of 172.17.2.240.
WINIPCFG /ALL
A tip for the advanced user: you can collect MAC-addresses
on the server by uploading the output of ifconfig
from
the client computer to a file. Name the file after the workstation,
e.g. 'c22'. Afterwards you can use your skills at the server
commandline to create a list of computer names and MAC-addresses,
without having to fear typing errors. It goes something like this.
|
Afterwards the commands cd /var/lib/g4u
and
grep -H address c*
will give you a list of lines like
c22: address: 00:b0:80:9b:ac:f6 |
which can be converted into the two-lines-per-workstation format
relatively easy, using search-and-replace. The great advantage is that
you have the MAC-addresses in electronic form with no chance of read
errors (distinguishing the handwritten 'a' and 'D' and '0'). And what
is more, you have proven, beyond reasonable doubt, that the network
connection of the workstation actually works. The bad news is that you
have to retype the command ifconfig
and the password of
the install account over and over again. Also, you still have to
manually enter the location of the workstation as a comment. The choice is yours.
NOTICE:
On a properly configured ServerAtSchool network, you can use a
symbolic name to refer to the server instead of a difficult to type
dotted-decimal address. Simply use the name server
instead of 172.17.2.1
, e.g. ftp
install@server
.
An image can be restored on a workstation by taking the following steps.
These steps are all disscussed below. Section 4.5. Hints and tips provides you with a few suggestions to improve efficiency of the whole process.
[Ctrl-Alt-Del]
or pressing the reset-button.
At this point the computer should boot from the diskette or the CD-ROM. The monitor will show a long list of messages scrolling by. Eventually you see the following screen.
|
You are now at the g4u command prompt.
NOTICE: If you do not see this screen eventually, you should consult you local systems administrator. There might be something wrong with the workstation hardware or the configuration settings. It is not necessarily your job to fix this.
If you do not know these things you should ask your local systems administrator or your ICT coordinator to enlighten you. If you wish, you can lookup the names of existing images on the server using the procedure discussed in section 4.5.1 Names of images below. Note that you still need the password for the 'install' account, even if you only want to lookup the names of the images.
After booting the computer with the boot floppy or the bootable CD-ROM you eventually arrive at the g4u prompt. You should now take the following steps.
g4u>
prompt, type the slurpdisk
command, followed by two parameters:
172.17.2.1
),
dell_800_9.tgz
),
[Enter]
. The complete commandline looks like this.
slurpdisk 172.17.2.1 dell_800_9.tgz
Password:
prompt, enter the password for the
'install' account. The password you type will not be
visible on the screen. Press the [Enter
] key after
you have typed the password.
123 MB 2.21 MB/s
. The ascending
MB
number shows the number of megabytes already
downloaded to the workstation. The MB/s
number shows
the download speed in megabytes per second.
g4u
prompt again. Note that this download process
can quite take some time. This depends on the the size of the
image and speed of your network.
Here is an illustration of the whole process. Your input is emphasised.
|
NOTICE:
Observe the gzip: invalid compressed data--length error
error message. This means that the last block of the image was not a
multiple of the block size. There is no need for alarm, though. The
image should work fine.
At this point you must remove the diskette (or the CD-ROM) if you have not done so before.
NOTICE: You can remove the diskette as soon as the download process is underway. This means that you can start two or more downloads simultaneously, using the same diskette. You simply move to the next workstation as soon as you have one working on downloading an image. Depending on the network and the speed of the server you can restore a number of workstations in almost the same time as it takes to restore a single workstation. This effect is very noticable with workstations with a 10/100 Mbps network interface connected to the server via a switch with a 1000 Mbps connection to the server (see section 2.4 Network interfaces in chapter II. Preparing the hardware for installation of the ServerAtSchool Installation Guide.
NOTICE:
On a properly configured ServerAtSchool network, you can use a
symbolic name to refer to the server instead of a difficult to type
dotted-decimal address. Simply use the name server
instead of 172.17.2.1
, e.g. slurpdisk server
dell_800_9.tgz
.
NOTICE: It is important to set the correct computer name. Windows Networking might get confused and stop working if two or more workstations with the exact same name (say 'C21') are present on the network.
You should take the following steps to set the name of the workstation.
[Ctrl-Alt-Del]
does not work in g4u.
[Esc]
key or
press the [Cancel] button. Eventually the workstation will be
ready for you.
If access to the dialogue where you can change the computer
name is denied (as a security measure) after you pressed [Cancel] or
[Esc]
, you have no other option than to logon to the
network the proper way, using your own account and your own
password. At that point the machine with number '22' will announce its
presence on the network but it will use the name 'C21', the same as
your original image machine. The best way to deal with this is to
switch off the original 'C21' before you reboot machine
'22'. You can then set the correct name (C22) and reboot once
again. This way there will never be two machines with the same name at
the same time on the network.
NOTICE: If you restore images to a batch of machines at the same time you may experience a little weird behaviour when Windows Networking gets confused about that funny machine 'C21' that keeps logging in, each time using another IP-address. Eventually this confusion will fade away, after a time out of somewhere between 30 minutes and 1 hour. This effect is due to the caching of computer names on the server. Do not worry about it. Tomorrow everything will be better.
For instance, at the Exemplum Primary School almost every workstation will be printing on 'Printer Central' by default. Only the workstation in the Faculty Office and the workstations of the headmaster and the headmisstress have a different default printer: 'Printer Faculty'. For these workstations the default printer has to be adjusted. This procedure is described below.
NOTICE: This assumes that you did not reboot the workstation in the previous section by pressing the [Yes] button at the end of the procedure there. If you did reboot the workstation you need to go through the 'Windows Network Logon' dialogue again.
Proceed as follows to set the default printer:
At this point you should reboot the workstation. After it is rebooted again, it is ready for use.
If you want to find out the names of the available images you should take the following steps.
g4u>
prompt type the following text.
ftp install@172.17.2.1
[Enter]
.
Password:
prompt type the password for the
'install' account and press [Enter]
. If you do not
know the password, ask you local systems administrator or ICT
coordinator to enlighten you. Note that the password will not be
shown on the screen.
ftp>
prompt type the command
ls
[Enter]
key.
bye
[Enter]
. You are back at
the g4u>
prompt again.
Here is an illustration of the whole process. Your input is emphasised.
|
NOTICE:
If you do not specify the correct username as part of the initial
command (the word install
in ftp
install@172.17.2.1
) you will be prompted for the username.
NOTICE:
If there are not too many images, the names of the images will not yet
have scrolled off the screen after you said bye
to
FTP. In that case you do not have to write down the exact name of the
image of interest; you can simply read if on screen.
NOTICE:
The names of these images are case sensitive. Please make sure that
you type the exact name, including the extension
.tgz
when applicable.
NOTICE:
On a properly configured ServerAtSchool network, you can use a
symbolic name to refer to the server instead of a difficult to type
dotted-decimal address. Simply use the name server
instead of 172.17.2.1
, e.g. ftp install@server
.
You can gain some efficiency by booting a batch of workstations one by
one, using the same g4u boot diskette. This is possible because the
diskette can be removed from the workstation as soon as the
g4u
prompt appears.
When you start this mass restore job on Friday aafternoon, you have a lot of confguring to do on Monday morning. Good luck (and have a nice weekend)!
The latter two steps are disscussed below. Section 5.3. Hints and tips provides you with a few suggestions to improve efficiency of the whole process.
[Ctrl-Alt-Del]
or pressing the reset-button.
At this point the computer should boot from the diskette or the CD-ROM. The monitor will show a long list of messages scrolling by. Eventually you see the following screen.
|
You are now at the g4u command prompt.
NOTICE: If you do not see this screen eventually, you should consult you local systems administrator. There might be something wrong with the workstation hardware or the configuration settings. It is not necessarily your job to fix this.
If you do not know these things you should ask your local systems administrator or your ICT coordinator to enlighten you. If you wish, you can lookup the names of existing images on the server using the procedure discussed in section 4.5.1 Names of images . Note that you still need the password for the 'install' account, even if you only want to lookup the names of existing images.
It is a good idea to choose a name as descriptive as possible. The
Exemplum Primary School owns a batch of Dell OptiPlex 110 computers
with an 800 MHz CPU. Therefore the names of the images all look like
dell_800_N.tgz
. Think of this name as 'brand',
'model' and 'image sequence number', separated with underscores. As
soon as the school invests in new(er) computers, the images of those computers
can easily be distinguished from the existing ones if those were to be
called ibm_netvista_N.tgz
or
asus_px800_N.tgz
. The choice is yours.
NOTICE: You should not use spaces as part of the image name because it will not work. Stick to underscores instead. Letters, digits, dots, dashes, underscores are OK in image names.
NOTICE:
The extension .tgz
indicates that these files are tarred
(jargon for 'tape archived') and gzipped (jargon for 'GNU compressed')
files. The tar.gz or .tgz process is comparable with zipping. You do
not have to add this extension to the filenames, it is simply
a matter of taste and perhaps a little of adhering to conventions too.
NOTICE: It is a good idea to write down the names of the images somewhere in a logfile or even in a paper notebook. This may make it even easier to 'know' which image is which. It is hard to remember the details of a particular image after a few months. Therefore deciding which of the images to download can be a challenge, even when you have named the images in a very systematic way.
After booting the computer with the boot floppy or the bootable CD-ROM you eventually arrive at the g4u prompt. You should now take the following steps.
g4u>
prompt, type the uploaddisk
command, followed by two parameters:
172.17.2.1
),
dell_800_10.tgz
),
[Enter]
. The complete commandline looks like this.
uploaddisk 172.17.2.1 dell_800_10.tgz
Password:
prompt, enter the password for the
'install' account. The password you type will be
visible on the screen. Press the [Enter
] key after
you have typed the password.
287 MB 1.83 MB/s
. The ascending
MB
number shows the number of megabytes already
uploaded to the server. The MB/s
number shows
the download speed in megabytes per second.
g4u
prompt again. Note that this upload process
can quite take some time. It takes longer than the corresponding
download process. The speed depends on the the size of the
disk and speed of your network.
Here is an illustration of the whole process. Your input is emphasised.
|
At this point you have successfully uploaded an image to the server.
NOTICE:
On a properly configured ServerAtSchool network, you can use a
symbolic name to refer to the server instead of a difficult to type
dotted-decimal address. Simply use the name server
instead of 172.17.2.1
, e.g. uploaddisk server
dell_800_10.tgz
.
The reason for doing this is that the workstation where you want to install new software can be contaminated during its usage over time. The caches may be filled with lots of sites, maybe someone downloaded some undesired software from the Internet, etcetera. So it is vital to start with a clean image before upgrading it.
Suppose your latest 'golden image' was created on computer 'C21'. Then it would be wise to use that particular workstation to install the new or updated software. If you would use workstation 'C34' instead, you would have to change the name of the workstation from 'C21' to 'C34' first, in order to prevent name clashes with the 'real' workstation 'C21'. That is extra work and not necessary.
If you want to retain a clean uncontaminated image, you should take the following steps.
CONTENTS.TXT
file in
which you meticulously document the changes you have made to the
workstation installation. Add dates and other details. You
tend to forget what you have done over time.
Another solution is to use a small partition and fill the remainder of the disks with zeros. This procedure is described in section 3.1 Scrubbing the disk in chapter IV. Workstation setup. You only need to do this once.
Yet another solution would be to use the uploadpart
command in g4u rather than the uploaddisk
command. The advantage is that the uploadpart
command
only looks at the contents of the designated partition (which could be
say 4 GB). The remainder of the disk (say 80 - 4 = 76 GB) is never
touched by this command, it does not have to be uploaded and does not
have to be downloaded. That's a real time saver! However, the
uploadpart
command (and its companion
slurppart
) do not take the Master Boot Record into
account. That means that if somehow this MBR is damaged, by a
virus or because you had to replace a dead disk, you can not revive
the workstation with just slurppart
. Refer to
http://www.feyrer.de/g4u
for more information.
Here are some good reasons to keep at least a few older images.
Authors: Peter Fokker <peter (at) berestijn.nl> and Dirk Schouten <schoutdi (at) knoware.nl> $Id: g4u.html,v 1.12 2006/03/30 13:07:56 peter Exp $