Tải bản đầy đủ (.pdf) (15 trang)

Using Ubuntu Server for System Imaging

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (592.74 KB, 15 trang )

29
CHAPTER 2
Using Ubuntu Server for
System Imaging
Clonezilla on Ubuntu Server
I
n the first chapter of this book, you read how to perform an enterprise network instal-
lation of Ubuntu Server. The topic of this chapter is somewhat related to installation of
Ubuntu Server. In this chapter you’ll learn how to set up a Clonezilla imaging server.
There may be several reasons why you would want to set up such a server. The most
important of them is that working with workstation images reduces help desk expenses.
If after a minimal period of troubleshooting it turns out that repairing a workstation is
going to take too long, it’s much faster just to restore the image of that workstation. Of
course, this assumes that all work- related files will be written to some other server first.
In this chapter you’ll learn how to set up Clonezilla for imaging.
Setting Up a Clonezilla Imaging Server
The Clonezilla imaging server is currently the most popular open source imaging solu-
tion. It has two versions, a stand- alone version and a server version. Whereas the stand-
alone version does well to make and restore images of single machines, you’ll need the
server version if you need to make images of multiple systems. In its current version, up
to 40 workstations can be imaged simultaneously using a method that uses broadcast or
multicast to ensure optimal use of network bandwidth.
Before installing the required software, make sure that your environment is set up for
imaging. Basically, it comes down to two elements:
CHAPTER 2
N
USING UBUNTU SERVER FOR SYSTEM IMAGING
30
 s !FASTDEDICATEDNETWORKFORIMAGINGYOUDOABSOLUTELYWANT'IGABITORBETTER
This means that you need a second network card installed on your server and
a dedicated Ethernet network connected to that network card.


 s 7ORKSTATIONSTHATCANBOOTFROMTHENETWORKCARD08%BOOT!LLMODERNNETWORK
CARDSSUPPORT08%BOOTSOTHATSHOULDNTBEAPROBLEM*USTMAKESURETHATYOU
enable network boot in the BIOS of your workstation.
I’ll assume that you have both elements. If not, save yourself a great deal of hassle
and make sure that these are in place before you start.
Setting Up Diskless Remote Boot in Linux
To use Clonezilla in a server environment, you need to set up diskless remote boot first.
4HESOLUTIONFORTHATIS$ISKLESS2EMOTE"OOTIN,INUX$2",YOUCANDOWNLOADIT
from
dppl6++`n^h*okqn_abknca*jap+kja0]hh
. Before setting up DRBL, you must set up the
NETWORKINTERFACECARD!SSUMINGTHATYOUVEJUSTINSTALLEDONYOUR5BUNTUSERVER
a second network card for use with DRBL and the network card hasn’t been set up yet,
follow this procedure to set up the second network card:
1. Using root permissions, open the file
+ap_+japskng+ejpanb]_ao
.
2. To add a second network card that is meant to be used for Clonezilla only, add the
FOLLOWINGINFORMATIONTOTHEFILE/FCOURSEYOUAREFREETOUSEANY)0INFORMATION
that you want to use.
]qpkapd-
eb]_aapd-ejapop]pe_
]``naoo-,*,*,*-,
japi]og.11*.11*.11*,
japskng-,*,*,*,
^nk]`_]op-,*,*,*.11
3. Restart the network to activate the new configuration. Don’t forget to make sure
THATYOURNEWNETWORKCARDYOUSHOULDSEEITAS
apd-
REALLYISAVAILABLE

CHAPTER 2
N
USING UBUNTU SERVER FOR SYSTEM IMAGING
31
Installing the DRBL Software
Now that the network is prepared, you can install the DRBL software. It is a good idea to
use Ubuntu’s secure
]lp
TODOTHISSOYOUFIRSTNEEDTODOWNLOADTHE$2",'0'KEYAND
install it. Use the following two commands to do that:
scapdppl6++`n^h*j_d_*knc*ps+CLC)GAU)@N>H
]lp)gau]``CLC)GAU)@N>H
Next, you need to change the
+ap_+]lp+okqn_ao*heop
file to add the new installation
sources that allow you to add the DRBL software and keep it up to date. Make sure to add
the following two lines to the
okqn_ao*heop
file:
`a^dppl6++bnaa*j_d_*knc*ps+q^qjpqd]n`ui]ejnaopne_pa`qjeranoaiqhperanoa
`a^dppl6++bnaa*j_d_*knc*ps+`n^h)_kna`n^hop]^ha
Next, execute the following commands to install the software:
]lp)capql`]pa
]lp)capejop]hh`n^h
$EPENDINGONTHESPEEDOFYOUR)NTERNETCONNECTIONTHISMAYTAKEAWHILE!FTER
this command has finished execution, all required software is downloaded but nothing is
installed yet.
When you run the
]lp)capejop]hh`n^h
command, the installation program asks the

following questions, the recommend answers to which are provided:
1. Do you want to install some network boot images for different Linux distributions?
Doing so would download more than 100 MB from the Internet to allow you to
perform an easy installation of workstations. Normally, you don’t need to do this,
so press Enter to accept the default value No and proceed.
2. Do you want serial console output for typical clients? Unless you know you do
need it, choose the default option, which is No.
CHAPTER 2
N
USING UBUNTU SERVER FOR SYSTEM IMAGING
32
3. What kind of kernel do you want to use on the clients to do imaging? Typically,
YOUWOULDCHOOSEOPTIONWHICHOFFERSIANDBETTER/PTIONISFOROLD
PRE0ENTIUMCLIENTSONLYANDOPTIONISONLYFORIFYOUR#05ISTHESAMEONTHE
DRBL server and clients. This would typically not be the case, so choose 1 here
and proceed.
4. $OYOUWANTTOUPGRADEYOUROPERATINGSYSTEM!SSUMINGYOUDONTNEEDTODO
THATATTHISPOINTPRESS%NTERTOACCEPTTHEDEFAULTVALUEOF.O'OHAVEACUP
of coffee now, because several megabytes of files need to be downloaded at this
stage.
Configuring the DRBL Software
!FTERthe download is finished, you can start the configuration. I’ll assume that your DRBL
SERVERHASTWONETWORKINTERFACESSEE&IGURE
apd,
, which is used for normal Internet
and user traffic, and
apd-
, which is used for DRBL.
apd-
ISCONFIGUREDWITHTHE)0ADDRESS

INTHISEXAMPLEOFCOURSEYOUAREFREETOUSEANYOTHERADDRESSRANGEYOULIKE
$OMAKESUREHOWEVERTHATYOUAREUSINGABITSUBNETMASKBECAUSEOTHERWISETHE
broadcast/multicast performance will be very bad.
Figure 2-1. Schematic overview of the imaging network
Now to configure DRBL, use the
+klp+`n^h+o^ej+`n^hlqod)e
command. This will set
up your server. Setting up your server this way is easy, because the program will detect
almost all settings automatically.
CHAPTER 2
N
USING UBUNTU SERVER FOR SYSTEM IMAGING
33
The first couple of questions ask you about the DNS configuration you want to use.
0AYATTENTIONWHENYOUREASKEDWHICHNETWORKCARDISUSEDFORYOUR)NTERNETCONNEC-
TIONSPECIFYTHECORRECTCARDHEREORELSEYOULLHAVE$2",TRAFFICONTHATCARD!FTERYOU
select the Internet interface, the DRBL interface is selected automatically.
.EXTYOUCANPOPULATETHEDATABASEOFYOUR$2",SERVERWITHTHE-!#ADDRESSESOF
THECLIENTS(OWDOESTHISWORK0RESS9TOTELL$2",THATITSHOULDSTARTCOLLECTING-!#
addresses now.
&INALLYSTARTUPALLTHECLIENTCOMPUTERSONEBYONEANDMAKESURETHEYBOOTFROM
THEIRNETWORKCARD!SINDICATEDINTHEMENUPRESSTOFINDOUTIFALLTHECLIENTSHAVE
BEENFOUND/NCEYOUARECONFIDENTTHATALLCLIENTSHAVEBEENDETECTEDPRESSTOFINISH
COLLECTING-!#ADDRESSESOFCONNECTEDCLIENTSANDQUIT4HEADVANTAGEOFDOINGTHIS
ISTHATYOUCANBINDPARTICULARCONFIGURATIONSTOPARTICULARWORKSTATIONS9OUARENOT
REQUIREDTODOTHISTHOUGH7ITHOUTTHEFIXED-!#ADDRESSTO)0ADDRESSCONNECTION
$2",ALSOWORKSWELL!NDAFTERALLYOUHAVEMOREFLEXIBILITYIFYOUDONTHAVETOCREATE
FIXED)0ADDRESSTO-!#ADDRESSMAPPINGSfirst.
N
Note

You also can use DRBL to boot workstations with a Ubuntu image. The software even allows you
to store private configuration environments on the server for each of these workstations. If you want to go
this way, it is a very good idea to make a mapping between IP addresses and MAC addresses of the work-
stations. If you just want to do imaging, there is no reason to create this mapping.
Setting Up the DHCP Server
In the NEXTSTEPSEE,ISTINGTHE$2",PROGRAMASKSYOUWHETHERYOUWANTTHE
$(#0SERVERWHICHISCONFIGUREDAUTOMATICALLYTOHANDOUTTHESAME)0ADDRESSTO
clients at all times. This is useful if you want the same client to work with the same con-
FIGURATIONATALLTIMES)FTHISISTHECASEPRESS9OTHERWISEPRESS%NTERTOCONTINUE)N
CASEYOUDOWANTTHECLIENTSTOWORKWITHTHESAME)0ADDRESSESATALLTIMESTHEIR-!#
addresses must be stored in a configuration file. The DRBL setup program creates this file
AUTOMATICALLYFORYOU*USTPRESS%NTERTOaccept the default name for this file.
CHAPTER 2
N
USING UBUNTU SERVER FOR SYSTEM IMAGING
34
Listing 2-1. The DRBL Program Sets Up a DHCP Server Automatically
@kukqs]jppkhappda@D?Loanre_aej@N>Hoanrankbbano]iaEL]``naoopkpda
_heajparanupeiasdaj_heajp^kkpo$Ebukqs]jppdeobqj_pekj(ukqd]rapk
_khha_ppdaI=?]``naooaokb_heajpo(]j`o]rapdaiejbeha$o%$]oejpda
lnarekqolnk_a`qna%%*Pdeoeobknpda_heajpo_kjja_pa`pk@N>Hoanran#o
apdanjapjapskngejpanb]_aapd-;
Wu+JY
.EXTYOUMUSTSPECIFYTHE)0ADDRESSTHATTHE$(#0SERVERWILLHANDOUTFORTHE
FIRSTCLIENT9OUDOTHISBYSPECIFYINGTHELASTBYTEONLYSEE,ISTING3OFOREXAMPLE
IFYOUAREONTHENETWORKANDYOUWANTTHEFIRSTCLIENTTOHAVETHE)0ADDRESS
JUSTENTERHERE!$(#0RANGEWILLTHENBECONFIGUREDAUTOMATICALLY
0RESS9TOACCEPTTHISRANGE9OUWILLSEEANOVERVIEWOFTHENETWORKCONFIGURATIONOF
your DRBL server. Happy with it? Then press Enter to continue.
Listing 2-2. Specify How the DHCP Range to Be Used Must Be Configured

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
@kukqs]jppkhappda@D?Loanre_aej@N>Hoanrankbbano]iaEL]``naoopkpda
_heajparanupeiasdaj_heajp^kkpo$Ebukqs]jppdeobqj_pekj(ukqd]rapk_khha_p
pdaI=?]``naooaokb_heajpo(]j`o]rapdaiejbeha$o%$]oejpdalnarekqo
lnk_a`qna%%*Pdeoeobknpda_heajpo_kjja_pa`pk@N>Hoanran#oapdanjapjapskng
ejpanb]_aapd-;
Wu+JYj
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
KGHapÑo_kjpejqa(sasehhoappdaEL]``naookb_heajpo^ubenop^kkpcapoEL
benopejopa]`kbbeta`kja
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Sd]peopdaejepe]hjqi^an`kukqs]jppkqoaejpdah]opoapkb`ecepoejpdaEL
$e*a*pdaejepe]hr]hqakb`ejpdaEL]``naoo]*^*_*`%bkn@N>H_heajpo_kjja_pa`
pkpdeoapdanjaplknpapd-*
W-Y
Once THE$(#0SERVERHASBEENFULLYCONFIGUREDTHECONFIGURATIONPROGRAMTELLS
YOUWHATTHE$2",NETWORKSHOULDCURRENTLYLOOKLIKESEE,ISTING#HECKTHATTHISIS
what you expected, and if it is, proceed with the configuration.

×