1. Trang chủ
  2. » Công Nghệ Thông Tin

Using Ubuntu Server for System Imaging

15 347 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Using Ubuntu Server for System Imaging
Thể loại Chapter
Định dạng
Số trang 15
Dung lượng 592,74 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Using Ubuntu Server for System Imaging Clonezilla on Ubuntu Server In the first chapter of this book, you read how to perform an enterprise network instal-lation of Ubuntu Server.. In t

Trang 1

Using Ubuntu Server for

System Imaging

Clonezilla on Ubuntu Server

In 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 instalinstal-lation 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:

Trang 2

s This means that you need a second network card installed on your server and

a dedicated Ethernet network connected to that network card

CARDS 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 from dppl6++`n^h*okqn_abknca*jap+kja0]hh Before setting up DRBL, you must set up the NETWORK

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 that you want to use

]qpkapd-eb]_aapd-ejapop]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

Trang 3

Installing the DRBL Software

Now that the network is prepared, you can install the DRBL software It is a good idea to

install it Use the following two commands to do that:

scapdppl6++`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^qjpqd]n`ui]ejnaopne_pa`qjeranoaiqhperanoa

`a^dppl6++bnaa*j_d_*knc*ps+`n^h)_kna`n^hop]^ha

Next, execute the following commands to install the software:

]lp)capql`]pa

]lp)capejop]hh`n^h

$EPENDING

this command has finished execution, all required software is downloaded but nothing is

installed yet

When you run the ]lp)capejop]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

Trang 4

3 What kind of kernel do you want to use on the clients to do imaging? Typically, YOU DRBL server and clients This would typically not be the case, so choose 1 here and proceed

THAT

of coffee now, because several megabytes of files need to be downloaded at this stage

Configuring the DRBL Software

!FTER SERVERapd,, which is used for normal Internet and user traffic, and apd-, which is used for DRBL apd-



$O 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

Trang 5

The first couple of questions ask you about the DNS configuration you want to use

0AY

TION

select the Internet interface, the DRBL interface is selected automatically

.EXT

THE

addresses now

&INALLY

THEIR

BEEN

COLLECTING

IS

REQUIRED

$2",

FIXED

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

$(#0

clients at all times This is useful if you want the same client to work with the same

con-FIGURATION

CASE

addresses must be stored in a configuration file The DRBL setup program creates this file AUTOMATICALLY

Trang 6

Listing 2-1 The DRBL Program Sets Up a DHCP Server Automatically

@kukqs]jppkhappda@D?Loanre_aej@N>Hoanrankbbano]iaEL]``naoopkpda _heajparanupeiasdaj_heajp^kkpo$Ebukqs]jppdeobqj_pekj(ukqd]rapk

_khha_ppdaI=?]``naooaokb_heajpo(]j`o]rapdaiejbeha$o%$]oejpda

lnarekqolnk_a`qna%%*Pdeoeobknpda_heajpo_kjja_pa`pk@N>Hoanran#o

apdanjapjapskngejpanb]_aapd-;

Wu+JY

.EXT FIRST IF

 0RESS 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

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

@kukqs]jppkhappda@D?Loanre_aej@N>Hoanrankbbano]iaEL]``naoopkpda _heajparanupeiasdaj_heajp^kkpo$Ebukqs]jppdeobqj_pekj(ukqd]rapk_khha_p pdaI=?]``naooaokb_heajpo(]j`o]rapdaiejbeha$o%$]oejpdalnarekqo

lnk_a`qna%%*Pdeoeobknpda_heajpo_kjja_pa`pk@N>Hoanran#oapdanjapjapskng ejpanb]_aapd-;

Wu+JYj

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

KGHapÑo_kjpejqa(sasehhoappdaEL]``naookb_heajpo^ubenop^kkpcapoEL benopejopa]`kbbeta`kja

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Sd]peopdaejepe]hjqi^an`kukqs]jppkqoaejpdah]opoapkb`ecepoejpdaEL

$e*a*pdaejepe]hr]hqakb`ejpdaEL]``naoo]*^*_*`%bkn@N>H_heajpo_kjja_pa` pkpdeoapdanjaplknpapd-*

W-Y

Once THE YOU what you expected, and if it is, proceed with the configuration

Trang 7

Listing 2-3 The DRBL Setup Program Shows What It Is Going to Configure

PdaH]ukqpbknukqn@N>Hajrenkjiajp6

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

JE?JE?EL?heajpo

')))))))))))))))))))))))))))))'

x@N>HOANRANx

xx

x'))Wapd,Y-5.*-24*-*2,')pkS=J

xx

x'))Wapd-Y-,*,*,* -')pk_heajpocnkql-W-._heajpo(pdaenEL

xxbnki-,*,*,*1,)-,*,*,*2-Y

')))))))))))))))))))))))))))))'

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Pkp]h_heajpo6-

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

LnaooAjpanpk_kjpejqa***

Next you need to specify which DRBL mode you want to use There are two

differ-ENT

you’ll use to give them a useable operating system Do this at all times, because it gives

you a complete working environment available on the client, and that may be useful if

YOU

During the next step, specify that you want to use full Clonezilla mode This provides

everything a client needs to boot and do its work in the Clonezilla environment, which

enables you to do easy workstation imaging

Completing Clonezilla Configuration

Now YOU

that can be used by Clonezilla I suggest using a rather large storage device,

USE

+ap_+bop]^ file is modified to activate this directory the next time your server boots To

configure this, follow these steps:

Trang 8

1 !SSUMING which is reachable via the device +`ar+o`^-, use igbo*tbo+`ar+o`^- to format the DEVICE

2 Use ig`en+_hkjavehh] to create the Clonezilla directory

3 Make sure your +ap_+bop]^ includes the following line to mount the Clonezilla directory automatically:

+`ar+o`^-+_hkjavehh]tbo`ab]qho,,

!FTER want to set a password as well If you use a password, only authenticated clients can use Clonezilla services Do what fits your situation best here

Now the installer asks if you want to define a boot prompt for clients It may be

a good idea to do so, so that your clients have the option to specify what they want to do WHEN

of 7 seconds is generated for this boot prompt If this is not enough time, change it in the NEXT boot menu on the client computers

.EXT SERVER QUESTIONS SERVER them into the Clonezilla server

Configuring the Clients for Cloning

Now that you’ve set up a basic Clonezilla environment, you are going to use the

`n^h)_heajp)osep_d command to add the appropriate Clonezilla options to the boot menu, thus enabling end users to specify what they want to do on their client work-STATIONS

or in such a way that the administrator starts the cloning process manually after using

set up the server, and then you’ll learn how to start cloning on the clients

Trang 9

Setting Up the Server for Cloning

The following procedure, typically a one-time- only procedure, allows you to set up the

Clonezilla server for cloning:

Figure 2-2 You can set up imaging for all nodes, or for a limited selection of nodes only.

YOULL

engine

Trang 10

Figure 2-3 Make sure to select clonezilla- start to start the cloning process automatically after your workstation boots from its network card.

SEE use multicast mode, thus allowing you to clone at the highest possible speed The disadvantage of using an automatic option, where your selection is predefined,

is that you’ll always need to run the `n^h)_heajp)osep_d command before every major job The alternative is to use the option oaha_p)ej)_heajp, which uses uni-cast but gives more flexibility from within the client Because it is more flexible, I’ll use this option

4 Specify what to offer as the default client boot option Make sure to select the option )u-, which halts to show you the boot menu In the next and last screen, select )lna^kkp, which will reboot the client machine automatically after it has been cloned

Trang 11

Figure 2-4 For optimal performance, use one of the first four options; for optimal flexibility,

use the select-in- client option

Cloning the Client

Now that everything is set up, you are ready to start cloning your client:

1 Make sure the workstation that you want to boot boots from its network card

9OULL

IN`are_a)ei]ca to write an image file to the Clonezilla

server The `are_a)`are_a option is useful only if you want to clone the contents of

A

CLONES

used for this purpose, as long as it is at least as big as the hard drive you want to

clone

Trang 12

Figure 2-5 When booting the workstation from the network card, the Clonezilla option automatically pops up

Figure 2-6 Use the device- image option to write the cloned disk to an image file on the Clonezilla server

are o]ra`eog, which clones the entire disk to the image file, and naopkna`eog, which restores the client from an image file The other two options allow you to save and restore individual partitions only

Trang 13

Figure 2-7 Select savedisk to write the contents of the entire hard drive to an

image file.

SLOW `` command to clone the disk Count on that to take a couple of hours,

though, because `` is rather inefficient

5 Make sure that the option is selected that forces the client to wait before

clon-ing This option makes sure that nothing will happen by accident, and as you can

imagine, that’s rather important

6 In the following screen, you need to specify what command you want to use to

compress the cloned image The default value, which uses cvel, will do rather well

HERE

This is very important, because when restoring the original state of your hard

drive, this image name will be the only thing that you’ve got So, make sure that

ALL

BY

Trang 14

Figure 2-8 Make sure to use something more descriptive than the default name for your image.

disk will be offered, but if the machine you’re cloning has more than one hard drive, you can clone all of them with Clonezilla

Figure 2-9 Select all disks that you want to include in your image.

Trang 15

That’s all The cloning process will start now Be patient, because it can take some

time to complete

Summary

In this chapter you’ve learned how to use Ubuntu Server as a system imaging solution

This is a very useful solution that allows you to recover from problems on workstations

fast and easily In the next chapter you’ll learn all about performance monitoring on

Ubuntu Server

... NEXT boot menu on the client computers

.EXT SERVER QUESTIONS SERVER them into the Clonezilla server

Configuring the Clients for Cloning

Now that you’ve set... data-page="9">

Setting Up the Server for Cloning

The following procedure, typically a one-time- only procedure, allows you to set up the

Clonezilla server for cloning:

... complete

Summary

In this chapter you’ve learned how to use Ubuntu Server as a system imaging solution

This is a very useful solution that allows you to recover from

Ngày đăng: 19/10/2013, 02:20

TỪ KHÓA LIÊN QUAN

w