summaryrefslogtreecommitdiffstats
path: root/docs/ka_method/html/duplication.html
diff options
context:
space:
mode:
authorMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-02-06 22:37:08 +0000
committerMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-02-06 22:37:08 +0000
commitfd8bbba2f02b8bccd69e67c326fd320c0827941d (patch)
treeade69986b2f99e113c95009736399966d4a3d511 /docs/ka_method/html/duplication.html
parent368f416649ed34557702a946ec8c0cec2fd45294 (diff)
downloaddrakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.gz
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.bz2
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.xz
drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.zip
Synthesized commit during git-svn import combining previous Mandriva history with Mageia.
This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line Add drakx structure on the SVN ------------------------------------------------------------------------ r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned advertising ------------------------------------------------------------------------ r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line Import Clean perl-install ------------------------------------------------------------------------ r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line Add cleaned files ------------------------------------------------------------------------ r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned kernel ------------------------------------------------------------------------ r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned tools ------------------------------------------------------------------------ r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line Import stage1 ------------------------------------------------------------------------ r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line Import images ------------------------------------------------------------------------ r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines readd missing file ------------------------------------------------------------------------ r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line Import rescue ------------------------------------------------------------------------ r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines import cleaned rescue for Mageia ------------------------------------------------------------------------ r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line import (cleaned) doc ------------------------------------------------------------------------
Diffstat (limited to 'docs/ka_method/html/duplication.html')
-rw-r--r--docs/ka_method/html/duplication.html1257
1 files changed, 0 insertions, 1257 deletions
diff --git a/docs/ka_method/html/duplication.html b/docs/ka_method/html/duplication.html
deleted file mode 100644
index e0efa1dfe..000000000
--- a/docs/ka_method/html/duplication.html
+++ /dev/null
@@ -1,1257 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>Clone a node/computer using KA method</title><link rel="stylesheet" href="styleguibo.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="#id2251469" title="Clone a node/computer using KA method" /><link rel="next" href="#id2514268" title="1. CLONING WILL ERASE ALL CLIENT NODES DATA !" /></head><body><div xml:lang="en" class="article" title="Clone a node/computer using KA method" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id2251469"></a>Clone a node/computer using KA method</h2></div></div><hr /></div><div class="toc"><dl><dt><span class="sect1"><a href="#id2514268">1. CLONING WILL ERASE ALL CLIENT NODES DATA !</a></span></dt><dt><span class="sect1"><a href="#id2514275">2. Clone a computer over the network</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2514297">2.1. KA method</a></span></dt><dt><span class="sect2"><a href="#id2514686">2.2. HOW it works</a></span></dt><dd><dl><dt><span class="sect3"><a href="#id2514692">2.2.1. Steps</a></span></dt><dt><span class="sect3"><a href="#id2514762">2.2.2. Needed files</a></span></dt></dl></dd><dt><span class="sect2"><a href="#id2514817">2.3. Step 1: PXE, TFTP, DHCPD services</a></span></dt><dd><dl><dt><span class="sect3"><a href="#id2514853">2.3.1. PXE parameters on server</a></span></dt><dt><span class="sect3"><a href="#id2514934">2.3.2. TFTP server</a></span></dt><dt><span class="sect3"><a href="#id2514965">2.3.3. PXE configuration</a></span></dt><dt><span class="sect3"><a href="#id2514977">2.3.4. DHCPD configuration</a></span></dt></dl></dd></dl></dd><dt><span class="sect1"><a href="#id2515083">3. Setup a node as a golden node</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2515089">3.1. The rescue.sqfs file</a></span></dt><dd><dl><dt><span class="sect3"><a href="#id2515145">3.1.1. ka-d.sh</a></span></dt><dt><span class="sect3"><a href="#id2515179">3.1.2. replication.conf</a></span></dt><dt><span class="sect3"><a href="#id2515190">3.1.3. fdisk_to_desc</a></span></dt><dt><span class="sect3"><a href="#id2515219">3.1.4. gen_modprobe_conf.pl</a></span></dt><dt><span class="sect3"><a href="#id2515242">3.1.5. ka-d-client</a></span></dt><dt><span class="sect3"><a href="#id2515277">3.1.6. ka-d-server</a></span></dt><dt><span class="sect3"><a href="#id2515326">3.1.7. ka_replication.sh</a></span></dt><dt><span class="sect3"><a href="#id2515350">3.1.8. store_log.sh</a></span></dt><dt><span class="sect3"><a href="#id2515378">3.1.9. bootable_flag.sh</a></span></dt><dt><span class="sect3"><a href="#id2515390">3.1.10. make_initrd_grub</a></span></dt><dt><span class="sect3"><a href="#id2515413">3.1.11. make_initrd_lilo</a></span></dt><dt><span class="sect3"><a href="#id2515436">3.1.12. prepare_node.sh</a></span></dt><dt><span class="sect3"><a href="#id2515461">3.1.13. send_status.pl</a></span></dt><dt><span class="sect3"><a href="#id2515484">3.1.14. status_node.pl</a></span></dt></dl></dd></dl></dd><dt><span class="sect1"><a href="#id2515504">4. The golden node, KA server</a></span></dt><dt><span class="sect1"><a href="#id2515652">5. KA client node</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2515657">5.1. PXE server (kamethod)</a></span></dt><dt><span class="sect2"><a href="#id2515694">5.2. Stage1 KA method, node waiting stage2 </a></span></dt><dt><span class="sect2"><a href="#id2515741">5.3. Stage2, the duplication process</a></span></dt><dt><span class="sect2"><a href="#id2515811">5.4. Prepare the node</a></span></dt><dt><span class="sect2"><a href="#id2515837">5.5. PXE server to local boot</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2515854">6. Step by step from scratch KA duplication</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2515889">6.1. Golden node side</a></span></dt><dt><span class="sect2"><a href="#id2516032">6.2. KA client side</a></span></dt><dt><span class="sect2"><a href="#id2516818">6.3. Post duplication process</a></span></dt></dl></dd></dl></div><div class="sect1" title="1. CLONING WILL ERASE ALL CLIENT NODES DATA !"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2514268"></a>1. CLONING WILL ERASE ALL CLIENT NODES DATA !</h2></div></div></div><p>!! USE WITH CARE !! </p></div><div class="sect1" title="2. Clone a computer over the network"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2514275"></a>2. Clone a computer over the network</h2></div></div></div><p>
- Goal of duplication is to easily deploy a computer over network without taking care of numbers of computer. In this documentation, we call golden node the node we want to clone. We can duplicate SCSI or IDE hard drive, and duplication support multiple filesystem (reiserfs, ext2, ext3, ext4, xfs, jfs).
- This method came from a very old project called CLIC, and was used under IGGI project, all Mandrake Clustering products, and now it is used under XtreemOS project. Now it should be available in 2010 spring, and all futur product.
- </p><p>WARNING: all data on client nodes will be ERASED ! We duplicate partitions of HDD's golden node, and the process will do an fdisk command on the client node, so ALL YOUR DATA will be erased on client nodes.</p><div class="sect2" title="2.1. KA method"><div class="titlepage"><div><div><h3 class="title"><a id="id2514297"></a>2.1. KA method</h3></div></div></div><p>
- With KA method you can quickly duplicate a node using a <span class="bold"><strong>desc</strong></span>
- file describing partitions. KA method only duplicate data on partitions, so if you have 80go HDD disk, and
- only 10go on it, KA only duplicates 10go, and not the whole disk. KA method doesn't not support RAID software.
- </p><p>
- Drawbacks:
- </p><p>
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>KA method doesn't support RAID software (use dolly to do that)</p></li><li class="listitem"><p>all data on client nodes are erased</p></li><li class="listitem"><p>you need a PXE, DHDCP and TFTP server</p></li><li class="listitem"><p>you must re-create same partition table as the golden node (even if size can differ)</p></li><li class="listitem"><p>even if it has been tested, it's still an experimental method</p></li><li class="listitem"><p>cloning script are old, and need a full rewrite</p></li><li class="listitem"><p>now it's only works with the Mandriva installer (need to patch it to support a KA method)</p></li><li class="listitem"><p>if a node crash while doing a duplication, the duplication process stop (or became very unstable)</p></li><li class="listitem"><p>using fdisk to erase and re-format the HDD is not a good way to proceed</p></li><li class="listitem"><p>UUID support is not really done (fstab use old /dec/sdX)</p></li><li class="listitem"><p>you can only clone Linux filesystems (if you want to duplicate another kinf of FS, it's up to you to modify the scripts)</p></li><li class="listitem"><p>of course various other things !</p></li></ul></div><p>
- </p></div><div class="sect2" title="2.2. HOW it works"><div class="titlepage"><div><div><h3 class="title"><a id="id2514686"></a>2.2. HOW it works</h3></div></div></div><div class="sect3" title="2.2.1. Steps"><div class="titlepage"><div><div><h4 class="title"><a id="id2514692"></a>2.2.1. Steps</h4></div></div></div><p>
- The clone process works in three steps
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>PXE boot to retrieve stage1</strong></span>: the computer boot on PXE mode, retrieve <span class="bold"><strong>vmlinuz</strong></span> and an <span class="bold"><strong>initrd</strong></span> image. The computer is in <span class="bold"><strong>stage1</strong></span> mode, and is able to get the stage2 throug KA. Network is up.</p></li><li class="listitem"><p><span class="bold"><strong>get stage2</strong></span>: the computer gets the stage2 with the KA method. The <span class="bold"><strong>stage2</strong></span> contains all necessary tools to recognize your hardware (the most important things is to detect your HDD and your network card), and all necessary tools/scripts to finalize the cloning process.</p></li><li class="listitem"><p><span class="bold"><strong>Duplication process</strong></span>: the computer auto-probes needed modules to be able to access the HDD. A basic log server is launched on the client node to be able to run command and get status of the KA duplication process. The computer reconfigure the modprobe.conf and restore the booloader (grub or lilo)</p></li></ul></div></div><div class="sect3" title="2.2.2. Needed files"><div class="titlepage"><div><div><h4 class="title"><a id="id2514762"></a>2.2.2. Needed files</h4></div></div></div><p>
- All needed files are available in Mandriva Linux cooker.
- </p><p>
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>install/stage2/rescue.sqfs</strong></span>: this is the stage2 file with all needed files to detect and probe modules, and launch the third step of the duplication process. This file will be used on the golden node.</p></li><li class="listitem"><p><span class="bold"><strong>isolinux/alt0/vmlinuz</strong></span>: linux kernel, needed in the <span class="bold"><strong>/var/lib/tftpboot/X86PC/linux/images/</strong></span> directory of the PXE server</p></li><li class="listitem"><p><span class="bold"><strong>isolinux/alt0/all.rdz</strong></span>: stage1 and all needed modules and tools.</p></li></ul></div><p>
- </p></div></div><div class="sect2" title="2.3. Step 1: PXE, TFTP, DHCPD services"><div class="titlepage"><div><div><h3 class="title"><a id="id2514817"></a>2.3. Step 1: PXE, TFTP, DHCPD services</h3></div></div></div><p>
- To easily clone a computer node, we use PXE technology to boot a <span class="bold"><strong>kernel</strong></span>, and an <span class="bold"><strong>initrd</strong></span> image wich contains all needed modules for network and media storage. Documentation about PXE can be found here: <a class="ulink" href="http://people.mandriva.com/~aginies/doc/pxe/" target="_top">PXE doc</a>. Please, keep in mind setting such services can <span class="bold"><strong>DISTURB</strong></span> your current network architecture.
- </p><div class="sect3" title="2.3.1. PXE parameters on server"><div class="titlepage"><div><div><h4 class="title"><a id="id2514853"></a>2.3.1. PXE parameters on server</h4></div></div></div><p>
- Mandriva Linux installer supports various methods to install a computer. With PXE configuration file you can specify wich method you want to use to install your node, or add a specific option at boot prompt. Edit your default PXE configuration file to add your custom entry (<span class="bold"><strong>/var/lib/tftpboot/X86PC/linux/pxelinux.cfg/default</strong></span>).
- </p><p>
- </p><pre class="screen">
-PROMPT 1
-DEFAULT local
-DISPLAY messages
-TIMEOUT 50
-F1 help.txt
-
-label local
- LOCALBOOT 0
-
-label kamethod
- KERNEL images/vmlinuz
- APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 \
- automatic=method:ka,interface:eth0,network:dhcp root=/dev/ram3 rw kamethod</pre><p>
- </p><p>
- At boot prompt no you can boot:
- </p><p>
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>DEFAULT local</strong></span>: default boot will be local one, change it with the name of a <span class="bold"><strong>LABEL</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>local</strong></span>: boot local</p></li><li class="listitem"><p><span class="bold"><strong>kamethod</strong></span>: automatic mode, get stage2 through <span class="bold"><strong>KA</strong></span>. Network interface is set to eth0. Auto setup the network with DHCP, and use the KA technology to launch the replication method.</p></li></ul></div><p>
- </p></div><div class="sect3" title="2.3.2. TFTP server"><div class="titlepage"><div><div><h4 class="title"><a id="id2514934"></a>2.3.2. TFTP server</h4></div></div></div><p>
- TFTP server should be activated in <span class="bold"><strong>/etc/xinetd.d/tftp</strong></span> file, and the <span class="bold"><strong>xinetd</strong></span> service started.
- </p><p>
- </p><pre class="screen">
-service tftp
-{
- disable= no
- socket_type= dgram
- protocol= udp
- wait= yes
- user= root
- server= /usr/sbin/in.tftpd
- server_args = -s /var/lib/tftpboot
- per_source= 11
- cps= 100 2
- flags= IPv4
-}</pre><p>
- </p></div><div class="sect3" title="2.3.3. PXE configuration"><div class="titlepage"><div><div><h4 class="title"><a id="id2514965"></a>2.3.3. PXE configuration</h4></div></div></div><p>
-</p><pre class="programlisting">
-# which interface to use
-interface=eth0
-default_address=IPADDR_PXE
-
-# the multicast ip address to listen on
-multicast_address=224.0.1.2
-
-# mtftp info
-mtftp_address=IPADDR_TFTP
-mtftp_client_port=1758
-mtftp_server_port=1759
-
-# the port to listen on
-listen_port=4011
-
-# enable multicast?
-use_multicast=1
-
-# enable broadcast?
-use_broadcast=0
-
-# user prompt
-prompt=Press F8 to view menu ...
-prompt_timeout=2
-
-# what services to provide, priority in ordering
-# CSA = Client System Architecture
-# service=&lt;CSA&gt;,&lt;min layer&gt;,&lt;max layer&gt;,&lt;basename&gt;,&lt;menu entry&gt;
-service=X86PC,0,2,linux,Mandriva Linux x86
-service=IA64PC,0,2,linux,Mandriva Linux IA64
-service=X86PC,0,0,local,Local boot
-
-# tftpd base dir
-tftpdbase=/
-
-# domain=guibland.com
-domain=
-</pre><p>
- </p></div><div class="sect3" title="2.3.4. DHCPD configuration"><div class="titlepage"><div><div><h4 class="title"><a id="id2514977"></a>2.3.4. DHCPD configuration</h4></div></div></div><p>
- IE of an <span class="bold"><strong>/etc/dhcpd.conf</strong></span> configuration file. Change <span class="bold"><strong>IPADDR_TFTP</strong></span> with the IP address of the TFTP serrver, and the <span class="bold"><strong>NET</strong></span> value. Don't forget to adjust the <span class="bold"><strong>domain-name</strong></span> and the <span class="bold"><strong>domain-name-servers</strong></span>.
- </p><p>
- </p><pre class="screen">
-ddns-update-style none;
-allow booting;
-allow bootp;
-
-authoritative;
-
-# Definition of PXE-specific options
-# Code 1: Multicast IP address of bootfile
-# Code 2: UDP port that client should monitor for MTFTP responses
-# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests
-# Code 4: Number of secondes a client must listen for activity before trying
-# to start a new MTFTP transfer
-# Code 5: Number of secondes a client must listen before trying to restart
-# a MTFTP transfer
-
-# define Option for the PXE class
-option space PXE;
-option PXE.mtftp-ip code 1 = ip-address;
-option PXE.mtftp-cport code 2 = unsigned integer 16;
-option PXE.mtftp-sport code 3 = unsigned integer 16;
-option PXE.mtftp-tmout code 4 = unsigned integer 8;
-option PXE.mtftp-delay code 5 = unsigned integer 8;
-option PXE.discovery-control code 6 = unsigned integer 8;
-option PXE.discovery-mcast-addr code 7 = ip-address;
-
-#Define options for pxelinux
-option space pxelinux;
-option pxelinux.magic code 208 = string;
-option pxelinux.configfile code 209 = text;
-option pxelinux.pathprefix code 210 = text;
-option pxelinux.reboottime code 211 = unsigned integer 32;
-site-option-space "pxelinux";
-
-option pxelinux.magic f1:00:74:7e;
-option pxelinux.reboottime 30;
-
-#Class that determine the options for Etherboot 5.x requests
-class "Etherboot" {
-#if The vendor-class-identifier equal Etherboot-5.0
-match if substring (option vendor-class-identifier, 0, 13) = "Etherboot-5.0";
-# filename define the file retrieve by the client, there nbgrub
-# our tftp is chrooted so is just the path to the file
-filename "/etherboot/nbgrub";
-#Used by etherboot to detect a valid pxe dhcp server
-option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
-# Set the "vendor-class-identifier" field to "PXEClient" in dhcp answer
-# if this field is not set the pxe client will ignore the answer !
-option vendor-class-identifier "Etherboot-5.0";
-vendor-option-space PXE;
-option PXE.mtftp-ip 0.0.0.0;
-# IP of you TFTP server
-next-server IPADDR_TFTP;
-}
-
-# create the Class PXE
-class "PXE" {
-# if the "vendor-class-identifier" is set to "PXEClient" in the client dhcp request
-match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
-filename "/X86PC/linux/linux.0";
-option vendor-class-identifier "PXEClient";
-vendor-option-space PXE;
-option PXE.mtftp-ip 0.0.0.0;
-next-server IPADDR_TFTP;
-}
-
-#host node20 {
-# hardware ethernet 00:40:CA:8C:B6:E9;
-# fixed-address node20;
-#}
-
-subnet NET.0 netmask 255.255.255.0 {
- option subnet-mask 255.255.255.0;
- option routers IPADDR_GW;
- default-lease-time 288000;
- max-lease-time 864000;
- option domain-name "guibland.com";
- option domain-name-servers IPADDR_DNS;
- next-server IPADDR_TFTP;
- pool {
- range NET.30 NET.40;
- }
-}</pre><p>
- </p></div></div></div><div class="sect1" title="3. Setup a node as a golden node"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2515083"></a>3. Setup a node as a golden node</h2></div></div></div><div class="sect2" title="3.1. The rescue.sqfs file"><div class="titlepage"><div><div><h3 class="title"><a id="id2515089"></a>3.1. The rescue.sqfs file</h3></div></div></div><p>
- You need the rescue disk (wich contains the <span class="bold"><strong>/ka</strong></span> directory),
- Just extract this file, and copy all directory in <span class="bold"><strong>/mnt/ka</strong></span>.
- </p><p>
- </p><pre class="screen">
-[root@guibpiv ~]# mkdir /mnt/ka
-[root@guibpiv ~]# cd /mnt/ka/
-[root@guibpiv ka]# unsquashfs rescue.sqfs
-[root@guibpiv ka]# mv squashfs-root/* .
-[root@guibpiv ka]# ls
-bin/ dev/ etc/ ka/ lib/ modules/ proc/ sbin/ squashfs-root/ tmp/ usr/ var/
-</pre><p>
- </p><p>
- Go in the <span class="bold"><strong>/mnt/ka/ka</strong></span> directory, and see all new files available. All those files are needed to do a <span class="bold"><strong>KA</strong></span> duplication process. We will explain now the rule of each of them. You can modify all them, those files will be copied in the directory <span class="bold"><strong>/tmp/stage2</strong></span> of the client node of the duplication process (second step).
- </p><div class="sect3" title="3.1.1. ka-d.sh"><div class="titlepage"><div><div><h4 class="title"><a id="id2515145"></a>3.1.1. ka-d.sh</h4></div></div></div><p>
- This is the master script to declare a node as a golden node. This script takes a lot of arguments. This script should be run
- on the host wich have the <span class="bold"><strong>/mnt/ka</strong></span> directory.
-</p><pre class="screen">
- -h, --help : display this message
- -n num : specify the number of (destination) nodes
- -x dir : exclude directory
- -X sdb|sdc : exclude sdb for the replication
- -m drive : copy the master boot record (for windows) of this drive (not really tested yet)
- -M drive file : use 'file' as master boot record (must be 446 bytes long) for the specified drive
- -D partition : also copy partition 'partition'
- -p drive pdesc : use 'pdesc' file as partition scheme (see doc) for the specified drive
- -d delay : delay beteween the release of 2 clients (1/10 second)
- -r 'grub|lilo' : choose the bootloader (you can add mkinitrd options)
-
- ie: ka-d.sh -n 3 -p sda /tmp/desc -X 'sdb|sdc' -r 'grub --with=ata_piix --with=piix'</pre><p>
- </p></div><div class="sect3" title="3.1.2. replication.conf"><div class="titlepage"><div><div><h4 class="title"><a id="id2515179"></a>3.1.2. replication.conf</h4></div></div></div><p>
- This file contains all variables needed by other scripts. It also tries to get information like IP address.
- </p></div><div class="sect3" title="3.1.3. fdisk_to_desc"><div class="titlepage"><div><div><h4 class="title"><a id="id2515190"></a>3.1.3. fdisk_to_desc</h4></div></div></div><p>
- This script generate the description table of the hard drive disk in the <span class="bold"><strong>/tmp/desc</strong></span> file.
- This file must follow some rules: one line per partition, with two fields : type of partition and size in megabytes.
- The type can be linux, swap, extended. Other types can be obtained by appending their hexadecimal number to 'type'.
- For example linux is the same as type83. The size is either a number of megabytes, or the keyword fill (to take all
- available space). The logical partitions must have the logical keyword. Do a <span class="bold"><strong>man ka-d</strong></span> for more help.
- </p></div><div class="sect3" title="3.1.4. gen_modprobe_conf.pl"><div class="titlepage"><div><div><h4 class="title"><a id="id2515219"></a>3.1.4. gen_modprobe_conf.pl</h4></div></div></div><p>
- This script creates a basic output like the content of the<span class="bold"><strong>/etc/modprobe.conf</strong></span> file. Drawbacks
- this file must be updated for each new modules available in the kernel (based on the <span class="bold"><strong>kernel/list_modules.pm</strong></span> file).
- </p></div><div class="sect3" title="3.1.5. ka-d-client"><div class="titlepage"><div><div><h4 class="title"><a id="id2515242"></a>3.1.5. ka-d-client</h4></div></div></div><p>
- The <span class="bold"><strong>ka-d-client</strong></span> binary file is used to get stage2 with the <span class="bold"><strong>KA</strong></span> method, and after get the whole system. The important argument is the <span class="bold"><strong>-s</strong></span> session name. A <span class="bold"><strong>KA</strong></span> can only connect to a specific session (getstage2, kainstall ...). The code source is available in the ka-deploy SRPM.
- </p></div><div class="sect3" title="3.1.6. ka-d-server"><div class="titlepage"><div><div><h4 class="title"><a id="id2515277"></a>3.1.6. ka-d-server</h4></div></div></div><p>
- The <span class="bold"><strong>ka-d-server</strong></span> binary file is used to be a <span class="bold"><strong>KA</strong></span> golden node server. Like the <span class="bold"><strong>ka-d-client</strong></span> the session arguments is an important parameter (<span class="bold"><strong>-s session_name</strong></span>). The session name will be <span class="bold"><strong>getstage2</strong></span> to retrieve the stage2 (after the PXE boot) and will be <span class="bold"><strong>kainstall1</strong></span> at duplication process step. If you want to do more than one duplication process of nodes at the same time, you should synchronize the ka_sesion name between the server and the client. The code source is available in the ka-deploy SRPM.
- </p></div><div class="sect3" title="3.1.7. ka_replication.sh"><div class="titlepage"><div><div><h4 class="title"><a id="id2515326"></a>3.1.7. ka_replication.sh</h4></div></div></div><p>
- Script launched on the <span class="bold"><strong>KA</strong></span> client (after getting stage2 and probing modules), to do the full process of the <span class="bold"><strong>Ka</strong></span> duplication.
- This script call other scripts to prepare the node (prepare_node.sh), configure the bootloader (make_initrd_grub or make_initrd_lilo).
- </p></div><div class="sect3" title="3.1.8. store_log.sh"><div class="titlepage"><div><div><h4 class="title"><a id="id2515350"></a>3.1.8. store_log.sh</h4></div></div></div><p>
- Basic script to store the log of the <span class="bold"><strong>KA</strong></span> duplication process on an FTP server. Adjust to feet your need, and uncomment the line <span class="bold"><strong>#store_log.sh</strong></span> in the <span class="bold"><strong>/mnt/ka/ka/ka_replication.sh</strong></span> file.
- </p></div><div class="sect3" title="3.1.9. bootable_flag.sh"><div class="titlepage"><div><div><h4 class="title"><a id="id2515378"></a>3.1.9. bootable_flag.sh</h4></div></div></div><p>
- Script to set bootable an HDD using fdisk. First arg must be the HDD device.
- </p></div><div class="sect3" title="3.1.10. make_initrd_grub"><div class="titlepage"><div><div><h4 class="title"><a id="id2515390"></a>3.1.10. make_initrd_grub</h4></div></div></div><p>
- Restore and reload the Grub bootloader in the <span class="bold"><strong>/mnt/disk</strong></span> directory. It's a very basic script, and perhaps use the <span class="bold"><strong>restore_bootloader</strong></span> of the Mandriva Linux Rescue should be a better idea.</p></div><div class="sect3" title="3.1.11. make_initrd_lilo"><div class="titlepage"><div><div><h4 class="title"><a id="id2515413"></a>3.1.11. make_initrd_lilo</h4></div></div></div><p>
- Restore and reload the lilo bootloader in the <span class="bold"><strong>/mnt/disk</strong></span> directory. Again it's a very basic script, perhaps we should use the <span class="bold"><strong>restore_bootloader</strong></span> of the Mandriva Linux Rescue.
- </p></div><div class="sect3" title="3.1.12. prepare_node.sh"><div class="titlepage"><div><div><h4 class="title"><a id="id2515436"></a>3.1.12. prepare_node.sh</h4></div></div></div><p>
- This script remove in the futur system the old network's udev rules, old dhcp cache files, launch the script <span class="bold"><strong>gen_modprobe_conf.pl</strong></span> to regenerate an up to date <span class="bold"><strong>/etc/modprobe.conf</strong></span> in the new system, and launch the script to restore the bootloader. If you want to do more action on the installed, system, you can modify this script.
- </p></div><div class="sect3" title="3.1.13. send_status.pl"><div class="titlepage"><div><div><h4 class="title"><a id="id2515461"></a>3.1.13. send_status.pl</h4></div></div></div><p>
- Very basic perl script to open the port 12345, and paste the content of the <span class="bold"><strong>/tmp/ka*</strong></span> file. It also permit the execution of commands on node, if user send a message from the golden node with the <span class="bold"><strong>exec</strong></span> prefix.
- </p></div><div class="sect3" title="3.1.14. status_node.pl"><div class="titlepage"><div><div><h4 class="title"><a id="id2515484"></a>3.1.14. status_node.pl</h4></div></div></div><p>
- Script to connect to a client node, first arg must be the IP address of the node. You can run command on the node with the <span class="bold"><strong>exec</strong></span> prefix.
- </p></div></div></div><div class="sect1" title="4. The golden node, KA server"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2515504"></a>4. The golden node, KA server</h2></div></div></div><p>
- Now, it is time to build a description of the node partitions. You can use the script <span class="bold"><strong>/mnt/ka/ka/fdisk_to_desc</strong></span> as root user, or your favorite text editor,
- you can write a file like this one:
- </p><p>
- </p><pre class="screen">
-linux 3500
-extended fill
-logical swap 500
-logical linux fill</pre><p>
- </p><p>
- This file describes your partition table and the sample above can be considered as a default one for a recommended
- installation. There is a 3.5GB <span class="bold"><strong>/</strong></span> partition, a 500 MB swap
- partition, and <span class="bold"><strong>/var</strong></span> fills the rest, of course you can adjust
- sizes accoding to your system.
- </p><p>
- Type the following to start the ka replication server as root user on the golden node:
- </p><p>
-</p><pre class="programlisting">
-[root@node40 ka]# ./ka-d.sh -n 1 -p sda /root/desc -X sdb -r "grub --with=jfs --with=ata_piix"
-takembr =
-desc = sda /root/desc
-+ Mount points :
- /dev/sda5 / ext3
- /dev/sda1 swap swap
-+ Hard drives :
- sda
-+ Reading partition table description for sda
- Added partition 1 : type 82
- Added partition 5 : type 83
-+ Included mount points : /
-+ Bootloader is: grub --with=jfs --with=ata_piix
-+++ Sending Stage2 +++
-Compiled : Aug 23 2007 12:58:29
-ARGS=+ka-d-server+-s+getstage2+-n+1+-e+(cd /mnt/ka; tar --create --one-file-system --sparse . )+
-Server IP = 10.0.1.40
-command = (cd /mnt/ka; tar --create --one-file-system --sparse . )
-I want 1 clients
-Socket 4 on port 30765 on node40.guibland.com ready.
-Socket 5 on port 30764 on node40.guibland.com ready.
-</pre><p>
- </p><p>
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>-r "grub --with=jfs --with=ata_piix"</strong></span>: use grub bootloader and <span class="bold"><strong>--with=jfs --with=piix</strong></span> mkinitrd option in the chrooted system after the <span class="bold"><strong>KA</strong></span> deploiement</p></li><li class="listitem"><p><span class="bold"><strong>-n nb_nodes</strong></span>: specify how many nodes are clients</p></li><li class="listitem"><p><span class="bold"><strong>-p sda desc</strong></span>: specify the name of the hdd</p></li><li class="listitem"><p><span class="bold"><strong>-x /tmp</strong></span>: exclude <span class="bold"><strong>/tmp</strong></span> directory</p></li><li class="listitem"><p><span class="bold"><strong>-X sdb</strong></span>: exclude <span class="bold"><strong>sdb</strong></span> hdd for the duplication</p></li></ul></div><p>
- </p><p>
- Now the golden node is waiting for clients nodes to start replication.
- </p></div><div class="sect1" title="5. KA client node"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2515652"></a>5. KA client node</h2></div></div></div><div class="sect2" title="5.1. PXE server (kamethod)"><div class="titlepage"><div><div><h3 class="title"><a id="id2515657"></a>5.1. PXE server (kamethod)</h3></div></div></div><p>
- We have to configure the PXE to boot by default on <span class="bold"><strong>kamethod</strong></span>.
- To do this just edit <span class="bold"><strong>/var/lib/tftpboot/X86PC/linux/pxelinux.cfg/default</strong></span> and set
- <span class="bold"><strong>DEFAULT</strong></span> to kamethod:
- </p><pre class="screen">DEFAULT kamethod</pre><p>
- So, next time a node boots, the PXE server will force the node to boot using the kamethod entry.
- </p></div><div class="sect2" title="5.2. Stage1 KA method, node waiting stage2"><div class="titlepage"><div><div><h3 class="title"><a id="id2515694"></a>5.2. Stage1 KA method, node waiting stage2 </h3></div></div></div><p>
- Now, you boot all remaining nodes. The replication process
- will start once all nodes are up and waiting on the <span class="bold"><strong>KA</strong></span>
- screen.
- </p><p>
- If the nodes can't reach the golden node, running the <span class="bold"><strong>KA</strong></span>
- server the message <span class="bold"><strong>Can't reach a valid KA server</strong></span> will appear.
- Each node will try five times to reach the <span class="bold"><strong>KA</strong></span> server, after that the node will reboot.
- As the node boots on <span class="bold"><strong>kamethod</strong></span>, it will retry until it finds it.
- </p></div><div class="sect2" title="5.3. Stage2, the duplication process"><div class="titlepage"><div><div><h3 class="title"><a id="id2515741"></a>5.3. Stage2, the duplication process</h3></div></div></div><p>
- Once all the nodes have found the <span class="bold"><strong>KA</strong></span> server, the first
- duplication process will start. This step duplicates the
- <span class="bold"><strong>stage2</strong></span> from the <span class="bold"><strong>/mnt/ka</strong></span> directory
- of the golden node, in the client's nodes memory (<span class="bold"><strong>/dev/ram3</strong></span> formated as ext2). Then, nodes chroot their memories (the <span class="bold"><strong>/tmp/stage2</strong></span> directory), and launch the <span class="bold"><strong>drvinst</strong></span> command from the stage2, to probe all needed their modules (drivers). Then, the second step of the duplication starts.
- </p><p>
- The duplication process will clone your drives following
- the description you have made (<span class="bold"><strong>/tmp/desc</strong></span> of the golden node).
- Nodes will rewrite their partition table, then format their filesystems (ReiserFs, XFS,
- ext2/3/4, JFS). All new partitions will be mounted in the <span class="bold"><strong>/mnt/disk</strong></span> directory.
- Then, the drive duplication process will begin. On a fast Ethernet switch you can reach speeds of 10MBytes/sec.
- </p></div><div class="sect2" title="5.4. Prepare the node"><div class="titlepage"><div><div><h3 class="title"><a id="id2515811"></a>5.4. Prepare the node</h3></div></div></div><p>
- At the end of the duplication process, each node will
- chroot its partitions and rebuild its <span class="bold"><strong>/boot/initrd.img</strong></span>,
- and <span class="bold"><strong>/etc/modprobe.conf</strong></span> files.
- This step ensures that your node will reboot using its potential
- SCSI drives and adjusting its network card driver. Before
- rebooting, each node reinstalls lilo/grub. All your node are
- now ready, and are clone of master node.
- </p></div><div class="sect2" title="5.5. PXE server to local boot"><div class="titlepage"><div><div><h3 class="title"><a id="id2515837"></a>5.5. PXE server to local boot</h3></div></div></div><p>
- Don't forget to change the default PXE boot to <span class="bold"><strong>local</strong></span>
- so node after replication will boot localy.
- </p></div></div><div class="sect1" title="6. Step by step from scratch KA duplication"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2515854"></a>6. Step by step from scratch KA duplication</h2></div></div></div><p>We will use a PIV 3gz box as golden node, with a SATA hard drive, and an Intel 82540EM Gigabit Ethernet Controller card. This golden box will be the: PXE, DHCPD, TFTP server. Client nodes are</p><p>
- </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>basic PIV 2.8gz, with a Realtek Semiconductor 8139 network card, and a IDE hard drive disk</p></li><li class="listitem"><p>PE2650 dual XEON 2.4gz, SCSI Hard Drive disk, and NetXtreme BCM5701 Gigabit Ethernet cards</p></li></ul></div><p>
- </p><p>Both nodes are configured to boot on their network card.</p><div class="sect2" title="6.1. Golden node side"><div class="titlepage"><div><div><h3 class="title"><a id="id2515889"></a>6.1. Golden node side</h3></div></div></div><p>
- Prepapre the golden node, install all needed tools.
- </p><p>
-</p><pre class="programlisting">
-[root@localhost ~]# urpmi ka-deploy-source-node
- http://192.168.1.253/cooker/i586/media/main/release/ka-deploy-source-node-0.94.1-1mdv2010.1.i586.rpm
-installing ka-deploy-source-node-0.94.1-1mdv2010.1.i586.rpm from /var/cache/urpmi/rpms
-Preparing... ###############################################################################
- 1/1: ka-deploy-source-node ###############################################################################
-
-[root@localhost ~]# rpm -ql ka-deploy-source-node
-/etc/ka
-/etc/ka/replication.conf
-/usr/bin/bootable_flag.sh
-/usr/bin/fdisk_to_desc
-/usr/bin/gen_modprobe_conf.pl
-/usr/bin/ka-d-client
-/usr/bin/ka-d-server
-/usr/bin/ka-d.sh
-/usr/bin/ka_replication.sh
-/usr/bin/make_initrd_grub
-/usr/bin/make_initrd_lilo
-/usr/bin/prepare_node.sh
-/usr/bin/send_status.pl
-/usr/bin/status_node.pl
-/usr/bin/store_log.sh
-/usr/bin/udev_creation.sh
-/usr/share/ka-deploy-0.94.1
-/usr/share/man/man1/ka-d-client.1.lzma
-/usr/share/man/man1/ka-d-server.1.lzma
-/usr/share/man/man1/ka-d.1.lzma
-/usr/share/man/man1/ka-d.sh.1.lzma
-/usr/share/man/man1/ka-deploy.1.lzma
-</pre><p>
- </p><p>Create the /mnt/ka directory, and put all stuff in it (this directory will be sent to all client nodes and use to finish
- the duplication process)</p><p>
-</p><pre class="programlisting">
-[root@localhost ~]# mkdir /mnt/ka
-lftp ftp.proxad.net:~&gt; cd pub/Distributions_Linux/MandrivaLinux/devel/cooker/i586/install/stage2/
-lftp ftp.proxad.net:/pub/Distributions_Linux/MandrivaLinux/devel/cooker/i586/install/stage2&gt; pget rescue.sqfs
-19132416 bytes transferred in 78 seconds (241.1K/s)
-
-[root@localhost ~]# urpmi squashfs-tools
- http://192.168.1.253/cooker/i586/media/main/release/squashfs-tools-4.0-3.20091221.1mdv2010.1.i586.rpm
-installing squashfs-tools-4.0-3.20091221.1mdv2010.1.i586.rpm from /var/cache/urpmi/rpms
-Preparing... ############################################################################
- 1/1: squashfs-tools ############################################################################
-
-[root@localhost ~]# unsquashfs rescue.sqfs
-Parallel unsquashfs: Using 2 processors
-988 inodes (1222 blocks) to write
-[============================================================================================-] 1222/1222 100%
-created 550 files
-created 93 directories
-created 60 symlinks
-created 371 devices
-created 1 fifos
-
-[root@localhost ~]# cd squashfs-root/
-[root@localhost squashfs-root]# ls
-bin/ dev/ etc/ ka/ lib/ modules/ proc/ sbin/ tmp/ usr/ var/
-[root@localhost squashfs-root]# mv * /mnt/ka/
-</pre><p>
- </p><p>Install all needed packages to be able to be a PXE, DHCPD and TFTP server</p><p>
-</p><pre class="programlisting">
-[root@localhost ka]# ka-d.sh -h
-/usr/bin/ka-d.sh : clone this machine
-Usage:
- -h, --help : display this message
- -n num : specify the number of (destination) nodes
- -x 'dir|dir2' : exclude directory
- -X 'sdb|sdc' : exclude sdb for the replication
- -m drive : copy the master boot record (for windows) of this drive
- -M drive file : use 'file' as master boot record (must be 446 bytes long) for the specified drive
- -D partition : also copy partition 'partition'
- -p drive pdesc : use 'pdesc' file as partition scheme (see doc) for the specified drive
- -d delay : delay beteween the release of 2 clients (1/10 second)
- -r 'grub|lilo' : choose the bootloader (you can add mkinitrd options)
-
- ie: ka-d.sh -n 3 -p sda /tmp/desc -X sdb -r 'grub --with=ata_piix --with=piix'
-
-[root@localhost ka]# urpmi ka-deploy-server
-To satisfy dependencies, the following packages are going to be installed:
- Package Version Release Arch
-(medium "Main")
- bind-utils 9.7.0 4mdv2010.1 i586
- clusterscripts-common 3.5 1mdv2010.1 noarch
- clusterscripts-server-conf 3.5 1mdv2010.1 noarch
- clusterscripts-server-pxe 3.5 1mdv2010.1 noarch
- dhcp-server 4.1.1 5mdv2010.1 i586
- ka-deploy-server 0.94.1 1mdv2010.1 i586
- perl-Crypt-PasswdMD5 1.300.0 1mdv2010.1 noarch
- pxe 1.4.2 19mdv2010.1 i586
- pxelinux 3.83 1mdv2010.1 i586
- syslinux 3.83 1mdv2010.1 i586
- tftp-server 5.0 4mdv2010.1 i586
- xinetd 2.3.14 11mdv2010.1 i586
-12MB of additional disk space will be used.
-2.5MB of packages will be retrieved.
-Proceed with the installation of the 12 packages? (Y/n)
-</pre><p>
- </p><p>Configure all services</p><p>
-</p><pre class="programlisting">
-[root@localhost ~]# hostname
-node42.guibland.com
-[root@localhost ~]# domainname
-guibland.com
-
-[root@localhost ~]# ip addr show eth0
-2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 100
- link/ether 00:17:31:19:a0:78 brd ff:ff:ff:ff:ff:ff
- inet 10.0.1.42/24 brd 10.0.1.255 scope global eth0
- inet6 fe80::217:31ff:fe19:a078/64 scope link
- valid_lft forever preferred_lft forever
-
-[root@localhost ~]# vi /etc/pxe.conf
-# which interface to use
-interface=eth0
-default_address=10.0.1.42
-
-# the multicast ip address to listen on
-multicast_address=224.0.1.2
-
-# mtftp info
-mtftp_address=10.0.1.42
-mtftp_client_port=1758
-mtftp_server_port=1759
-
-# the port to listen on
-listen_port=4011
-
-# enable multicast?
-use_multicast=1
-
-# enable broadcast?
-use_broadcast=0
-
-# user prompt
-prompt=Press F8 to view menu ...
-prompt_timeout=2
-
-# what services to provide, priority in ordering
-# CSA = Client System Architecture
-# service=&lt;CSA&gt;,&lt;min layer&gt;,&lt;max layer&gt;,&lt;basename&gt;,&lt;menu entry&gt;
-service=X86PC,0,2,linux,Mandriva Linux x86
-service=IA64PC,0,2,linux,Mandriva Linux IA64
-service=X86PC,0,0,local,Local boot
-
-# tftpd base dir
-tftpdbase=/
-
-# domain name
-domain=guibland.com
-
-[root@localhost ~]# vi /etc/xinetd.d/tftp
-service tftp
-{
- disable = no
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s /var/lib/tftpboot
- per_source = 11
- cps = 100 2
- flags = IPv4
-}
-
-
-[root@localhost ~]# cp /etc/dhcpd.conf.pxe.single /etc/dhcpd.conf
-cp: overwrite `/etc/dhcpd.conf'? y
-
-[root@localhost ~]# cat /etc/resolv.conf
-nameserver 10.0.1.253
-search guibland.com
-
-[root@localhost ~]# cat /etc/dhcpd.conf
-# for explanation in french go to : http://www.delafond.org/traducmanfr/man/man5/dhcpd.conf.5.html
-ddns-update-style none;
-allow booting;
-allow bootp;
-
-# Your dhcp server is not master on your network !
-#not authoritative;
-# Your dhcpd server is master on your network !
-#authoritative;
-authoritative;
-
-#Interface where dhcpd is active
-#DHCPD_INTERFACE = "eth0";
-
-# Definition of PXE-specific options
-# Code 1: Multicast IP address of bootfile
-# Code 2: UDP port that client should monitor for MTFTP responses
-# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests
-# Code 4: Number of secondes a client must listen for activity before trying
-# to start a new MTFTP transfer
-# Code 5: Number of secondes a client must listen before trying to restart
-# a MTFTP transfer
-
-# define Option for the PXE class
-option space PXE;
-option PXE.mtftp-ip code 1 = ip-address;
-option PXE.mtftp-cport code 2 = unsigned integer 16;
-option PXE.mtftp-sport code 3 = unsigned integer 16;
-option PXE.mtftp-tmout code 4 = unsigned integer 8;
-option PXE.mtftp-delay code 5 = unsigned integer 8;
-option PXE.discovery-control code 6 = unsigned integer 8;
-option PXE.discovery-mcast-addr code 7 = ip-address;
-
-#Define options for pxelinux
-option space pxelinux;
-option pxelinux.magic code 208 = string;
-option pxelinux.configfile code 209 = text;
-option pxelinux.pathprefix code 210 = text;
-option pxelinux.reboottime code 211 = unsigned integer 32;
-site-option-space "pxelinux";
-# These lines should be customized to your setup
-#option pxelinux.configfile "configs/common";
-#option pxelinux.pathprefix "/pxelinux/files/";
-#filename "/pxelinux/pxelinux.bin";
-
-option pxelinux.magic f1:00:74:7e;
-option pxelinux.reboottime 30;
-#if exists dhcp-parameter-request-list {
-# Always send the PXELINUX options
-# append dhcp-parameter-request-list 208, 209, 210, 211;
-# append dhcp-parameter-request-list 208,211;
-# }
-
-#Class that determine the options for Etherboot 5.x requests
-class "Etherboot" {
-
-#if The vendor-class-identifier equal Etherboot-5.0
-match if substring (option vendor-class-identifier, 0, 13) = "Etherboot-5.0";
-
-# filename define the file retrieve by the client, there nbgrub
-# our tftp is chrooted so is just the path to the file
-filename "/etherboot/nbgrub";
-
-#Used by etherboot to detect a valid pxe dhcp server
-option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
-
-# Set the "vendor-class-identifier" field to "PXEClient" in dhcp answer
-# if this field is not set the pxe client will ignore the answer !
-option vendor-class-identifier "Etherboot-5.0";
-
-vendor-option-space PXE;
-option PXE.mtftp-ip 0.0.0.0;
-
-# IP of you TFTP server
-next-server 10.0.1.42;
-}
-
-
-# create the Class PXE
-class "PXE" {
-# if the "vendor-class-identifier" is set to "PXEClient" in the client dhcp request
-match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
-
-# filename define the file retrieve by the client, there pxelinux.0
-# our tftp is chrooted so is just the path to the file
-# If you prefer use grub, use pxegrub compiled for your ethernet card.
-#filename "/PXEClient/pxegrub";
-filename "/X86PC/linux/linux.0";
-
-# Set the "vendor-class-identifier" field to "PXEClient" in dhcp answer
-# if this field is not set the pxe client will ignore the answer !
-option vendor-class-identifier "PXEClient";
-
-
-vendor-option-space PXE;
-option PXE.mtftp-ip 0.0.0.0;
-
-# IP of you TFTP server
-next-server 10.0.1.42;
-}
-
-# Tags uses by dhcpnode and setup_add_nodes_to_dhcp
-# TAG: NODE_LIST_ADMIN_BEGIN
-
-# TAG: NODE_LIST_ADMIN_END
-
-# TAG: MY_ADMIN_BEGIN
-subnet 10.0.1.0 netmask 255.255.255.0 {
- option subnet-mask 255.255.255.0;
- option routers 10.0.1.253;
- default-lease-time 288000;
- max-lease-time 864000;
- option domain-name "guibland.com";
- option domain-name-servers 10.0.1.253;
- next-server 10.0.1.42;
-
- pool {
- range 10.0.1.110 10.0.1.120;
- }
-}
-
-# TAG: MY_ADMIN_END
-
-
-[root@localhost ~]# service xinetd restart
-Stopping xinetd [FAILED]
-Starting xinetd [ OK ]
-[root@localhost ~]# service pxe restart
-Stopping PXE server [FAILED]
-Dhcp server is not running on this machine !
-Be sure that a valid PXE Dhcp server is running on your network
-Starting PXE server [ OK ]
-[root@localhost ~]# service dhcpd restart
-Shutting down dhcpd: [ OK ]
-Starting dhcpd: [ OK ]
-</pre><p>
- </p><p>KA listen only listen on eth0, and need a FQDN. So if it is not the case, ka-d-server will try to open
- a port on 0.0.0.0 IP address, wich cause an error. You can fix it easely setting an valid hostname in /etc/hosts file.
- Don't forget to kill ka-d-server with crtl+C key, after testing it will open a port on a valid IP address.</p><p>
-</p><pre class="programlisting">
-[root@node42 ~]# ka-d-server
-Compiled : May 4 2010 20:33:07
-ARGS=+ka-d-server+
-Server IP = 0.0.0.0
-command = (cd /; tar --create --one-file-system --sparse /)
-I want 1 clients
-ka-d-server: server.c:1987: main: Assertion `socket_server &gt;=0' failed.
-Aborted
-
-
-[root@node42 ~]# cat /etc/hosts
-127.0.0.1 localhost.localdomain localhost
-10.0.1.42 node42.guibland.com
-
-[root@node42 ~]# ka-d-server
-Compiled : May 4 2010 20:33:07
-ARGS=+ka-d-server+
-Server IP = 10.0.1.42
-command = (cd /; tar --create --one-file-system --sparse /)
-I want 1 clients
-Socket 3 on port 30765 on node42.guibland.com ready.
-Socket 4 on port 30764 on node42.guibland.com ready.
-[root@node42 ~]# ^C
-</pre><p>
- </p><p>We need to describe the partition table of our golden node, to send it to client nodes.</p><p>
-</p><pre class="programlisting">
-[root@node42 ~]# fdisk -l
-
-Disk /dev/sda: 80.0 GB, 80026361856 bytes
-255 heads, 63 sectors/track, 9729 cylinders
-Units = cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / 512 bytes
-Disk identifier: 0xd9b576f2
-
- Device Boot Start End Blocks Id System
-/dev/sda1 * 1 1019 8185086 82 Linux swap / Solaris
-/dev/sda2 1020 4843 30716280 83 Linux
-/dev/sda3 4844 9729 39246795 5 Extended
-/dev/sda5 4844 9729 39246763+ 83 Linux
-
-
-[root@node42 ~]# fdisk_to_desc
- -devices: sda1 -size en Mo: 7993 -filesystem: Linux
-Use of uninitialized value $e in concatenation (.) or string at /usr/bin/fdisk_to_desc line 50.
- -devices: sda2 -size en Mo: 29996 -filesystem: Linux
-Use of uninitialized value $e in concatenation (.) or string at /usr/bin/fdisk_to_desc line 55.
- -devices: sda3 -size en Mo: 38326 -filesystem: Extended
- -devices: sda5 -size en Mo: 38326 -filesystem: Linux
-Desc file is /tmp/desc
-[root@node42 ~]# cat /tmp/d
-ddebug.log desc
-[root@node42 ~]# cat /tmp/desc
-swap 7993
-linux 29996
-extended 38326
-logical linux 38326
-
-[root@node42 ~]# cat /tmp/desc
-swap 7993
-linux 29996
-extended fill
-logical linux fill
-</pre><p>
- </p><p>Set default PXE boot to kamethod</p><p>
-</p><pre class="programlisting">
-[root@node42 ~]# cat /var/lib/tftpboot/X86PC/linux/pxelinux.cfg/default
-PROMPT 1
-DEFAULT kamethod
-DISPLAY messages
-TIMEOUT 50
-
-label local
- LOCALBOOT 0
-
-label kamethod
- KERNEL images/vmlinuz
- APPEND initrd=images/all.rdz ramdisk_size=64000 vga=788 automatic=method:ka,interface:eth0,network:dhcp root=/dev/ram3 rw kamethod
-
-
-[root@node42 ~]# cd /var/lib/tftpboot/X86PC/linux/
-[root@node42 linux]# ls
-help.txt linux.0 memdisk messages pxelinux.cfg/
-[root@node42 linux]# mkdir images
-
-lftp ftp.proxad.net:/pub/Distributions_Linux/MandrivaLinux/devel/cooker/i586/isolinux/alt0&gt; ls
--rw-r--r-- 1 ftp ftp 15613654 Apr 23 17:26 all.rdz
--rw-r--r-- 1 ftp ftp 2279584 Apr 23 17:26 vmlinuz
-lftp ftp.proxad.net:/pub/Distributions_Linux/MandrivaLinux/devel/cooker/i586/isolinux/alt0&gt; mget *
-17893238 bytes transferred in 77 seconds (227.9K/s)
-Total 2 files transferred
-lftp ftp.proxad.net:/pub/Distributions_Linux/MandrivaLinux/devel/cooker/i586/isolinux/alt0&gt;
-
-[root@node42 images]# pwd
-/var/lib/tftpboot/X86PC/linux/images
-[root@node42 images]# ls
-all.rdz vmlinuz
-</pre><p>
- </p><p>Now it's time to launch the duplication process</p><p>
-</p><pre class="programlisting">
-[root@node42 ka]# ka-d.sh -n 2 -p sda /tmp/desc -r grub
-takembr =
-desc = sda /tmp/desc
-`/etc/fstab' -&gt; `/tmp/ka-d3156/pfstab.tmp'
-+ Mount points :
- /dev/sda2 / ext3 relatime 1 1
- /dev/sda5 /home ext4 relatime 1 2
- /dev/sda1 swap swap defaults 0 0
-+ Hard drives :
- sda
-+ Reading partition table description for sda
- Added partition 1 : type 82
- Added partition 2 : type 83
- Added partition 5 : type 83
-+ Included mount points : / /home
-+ Bootloader is: grub
-+++ Sending Stage2 +++
-Compiled : May 4 2010 20:33:07
-ARGS=+ka-d-server+-s+getstage2+-n+2+-e+(cd /mnt/ka; tar --create --one-file-system --sparse . )+
-Server IP = 10.0.1.42
-command = (cd /mnt/ka; tar --create --one-file-system --sparse . )
-I want 2 clients
-Socket 4 on port 30765 on node42.guibland.com ready.
-Socket 5 on port 30764 on node42.guibland.com ready.
-got UDP packet from 10.0.1.111
-Session name matches
-Sending UDP reply to 10.0.1.111
-Accepting connection from 10.0.1.111
-Clients : want_data 0 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-got UDP packet from 10.0.1.110
-Session name matches
-Sending UDP reply to 10.0.1.110
-Accepting connection from 10.0.1.110
-Clients : want_data 1 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-Added client 10.0.1.110, daddy = 10.0.1.42
-Added client 10.0.1.111, daddy = 10.0.1.110
-Accepting connection from 10.0.1.110
-checking connection auth10.0.1.42 reports 10.0.1.110 has opened data connection
-Client 10.0.1.110 reports data position : 0
-10.0.1.42 reports 10.0.1.110 has been accepted
-Welcome son, you are number 1 (MAX 4)
-Client got client
-10.0.1.110 reports 10.0.1.111 has opened data connection
-Client 10.0.1.111 reports data position : 0
-sending auth for 10.0.1.111 to 10.0.1.110
-Client got client
-10.0.1.110 reports 10.0.1.111 has been accepted
-Let's go!
-Total data read = 43 Megs, BUF: 34M FREE = 0M startpos = 8MM
-End of data flow
-Dropping children
-Dropping child 10.0.1.110
-All children dropped
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 1 -- connected : 2
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 0 -- connected : 2
-Peer closed connection on socket 7
-close_connection(7)
-Busy clients: 0 -- connected : 1
-Peer closed connection on socket 6
-close_connection(6)
-Busy clients: 0 -- connected : 0
-All clients left, I quit
-Total data sent = 44 Megs, in 1543 packets
-Transfer time = 0.858 seconds, throughput = 51.307 Mbytes/second
-The pipeline was emptied in 3.250 seconds
- - Sending partition/filesystem/mount points informations...
- +++ Running ka-deploy +++
-Compiled : May 4 2010 20:33:07
-ARGS=+ka-d-server+-s+kainstall1+-n+2+-e+(cd /tmp/ka-d3156 &amp;&amp; tar c *)+
-Server IP = 10.0.1.42
-command = (cd /tmp/ka-d3156 &amp;&amp; tar c *)
-I want 2 clients
-Socket 4 on port 30765 on node42.guibland.com ready.
-Socket 5 on port 30764 on node42.guibland.com ready.
-got UDP packet from 10.0.1.110
-Session name matches
-Sending UDP reply to 10.0.1.110
-Accepting connection from 10.0.1.110
-Clients : want_data 0 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-got UDP packet from 10.0.1.111
-Session name matches
-Sending UDP reply to 10.0.1.111
-Accepting connection from 10.0.1.111
-Clients : want_data 1 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-Added client 10.0.1.110, daddy = 10.0.1.42
-Added client 10.0.1.111, daddy = 10.0.1.110
-Accepting connection from 10.0.1.110
-checking connection auth10.0.1.42 reports 10.0.1.110 has opened data connection
-Client 10.0.1.110 reports data position : 0
-10.0.1.42 reports 10.0.1.110 has been accepted
-Welcome son, you are number 1 (MAX 4)
-Client got client
-10.0.1.110 reports 10.0.1.111 has opened data connection
-Client 10.0.1.111 reports data position : 0
-sending auth for 10.0.1.111 to 10.0.1.110
-Client got client
-10.0.1.110 reports 10.0.1.111 has been accepted
-Let's go!
-Total data read = 0 Megs, BUF: 0M FREE = 34M startpos = 0M
-End of data flow
-Dropping children
-Dropping child 10.0.1.110
-All children dropped
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 1 -- connected : 2
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 0 -- connected : 2
-Peer closed connection on socket 6
-close_connection(6)
-Busy clients: 0 -- connected : 1
-Peer closed connection on socket 7
-close_connection(7)
-Busy clients: 0 -- connected : 0
-All clients left, I quit
-Total data sent = 0 Megs, in 1 packets
-Transfer time = 0.006 seconds, throughput = 1.698 Mbytes/second
-The pipeline was emptied in 0.038 seconds
- WAITING node (partition/format)
- - Sending Linux filesystem...
- +++ Running ka-deploy +++
-Compiled : May 4 2010 20:33:07
-ARGS=+ka-d-server+-s+kainstall2+-n+2+-e+(cd /; tar --create --one-file-system --sparse / /home)+
-Server IP = 10.0.1.42
-command = (cd /; tar --create --one-file-system --sparse / /home)
-I want 2 clients
-Socket 4 on port 30765 on node42.guibland.com ready.
-Socket 5 on port 30764 on node42.guibland.com ready.
-got UDP packet from 10.0.1.110
-Session name matches
-Sending UDP reply to 10.0.1.110
-Accepting connection from 10.0.1.110
-Clients : want_data 0 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-got UDP packet from 10.0.1.111
-Session name matches
-Sending UDP reply to 10.0.1.111
-Accepting connection from 10.0.1.111
-Clients : want_data 1 / connected 0
-client says hello !
-Client sends options
-Client accepts data
-Added client 10.0.1.110, daddy = 10.0.1.42
-Added client 10.0.1.111, daddy = 10.0.1.110
-Accepting connection from 10.0.1.110
-checking connection auth10.0.1.42 reports 10.0.1.110 has opened data connection
-Client got client
-10.0.1.110 reports 10.0.1.111 has opened data connection
-Client 10.0.1.110 reports data position : 0
-10.0.1.42 reports 10.0.1.110 has been accepted
-Welcome son, you are number 1 (MAX 4)
-Client 10.0.1.111 reports data position : 0
-sending auth for 10.0.1.111 to 10.0.1.110
-Client got client
-10.0.1.110 reports 10.0.1.111 has been accepted
-Let's go!
-Total data read = 789 Megs, BUF: 34M FREE = 0M startpos = 754M
-End of data flow
-Dropping children
-Dropping child 10.0.1.110
-All children dropped
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 1 -- connected : 2
-Client says dad disconnected
-Client says he has finished
-Client has finished transfer
-Busy clients: 0 -- connected : 2
-Peer closed connection on socket 7
-close_connection(7)
-Busy clients: 0 -- connected : 1
-Peer closed connection on socket 6
-close_connection(6)
-Busy clients: 0 -- connected : 0
-All clients left, I quit
-Total data sent = 792 Megs, in 25445 packets
-Transfer time = 69.904 seconds, throughput = 11.343 Mbytes/second
-The pipeline was emptied in 4.002 seconds
-</pre><p>
- </p></div><div class="sect2" title="6.2. KA client side"><div class="titlepage"><div><div><h3 class="title"><a id="id2516032"></a>6.2. KA client side</h3></div></div></div><p>
- To get the log of the client node, launch <span class="bold"><strong>/mnt/ka/ka/status_node.pl IPADD</strong></span> on the golden node.
- </p><pre class="programlisting">
-[root@node42 ka]# status_node.pl 10.0.1.111
-
- Get the status of the Ka duplication process
- If you want to execute a command on node, just use the 'exec' prefix
-10.0.1.111&gt; ------| Ka |---- Install starting...
-10.0.1.111&gt; Current session is -s kainstall1
-10.0.1.111&gt; Receiving partitions information...OK
-10.0.1.111&gt; Cleaning hard drive...
-10.0.1.111&gt; ==&gt; /tmp/kacmd &lt;==
-10.0.1.111&gt; Starting log server..
-10.0.1.111&gt;
-10.0.1.111&gt; ==&gt; /tmp/ka_log-10.0.1.111-20100507-10h32 &lt;==
-10.0.1.111&gt; OK
-10.0.1.111&gt; Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
-10.0.1.111&gt; Building a new DOS disklabel with disk identifier 0x59be1427.
-10.0.1.111&gt; Changes will remain in memory only, until you decide to write them.
-10.0.1.111&gt; After that, of course, the previous content won't be recoverable.
-10.0.1.111&gt;
-10.0.1.111&gt;
-10.0.1.111&gt; The number of cylinders for this disk is set to 1116.
-10.0.1.111&gt; There is nothing wrong with that, but this is larger than 1024,
-10.0.1.111&gt; and could in certain setups cause problems with:
-10.0.1.111&gt; 1) software that runs at boot time (e.g., old versions of LILO)
-10.0.1.111&gt; 2) booting and partitioning software from other OSs
-10.0.1.111&gt; (e.g., DOS FDISK, OS/2 FDISK)
-10.0.1.111&gt; Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
-10.0.1.111&gt;
-10.0.1.111&gt; Command (m for help): The partition table has been altered!
-10.0.1.111&gt;
-10.0.1.111&gt; Calling ioctl() to re-read partition table.
-10.0.1.111&gt; Syncing disks.
-10.0.1.111&gt; Writing partition table for sda using fdisk...OK
-10.0.1.111&gt; Formatting /dev/sda2 as ext3...OK
-10.0.1.111&gt; Formatting /dev/sda5 as ext4...OK
-10.0.1.111&gt; Formatting /dev/sda1 as swap...OK
-10.0.1.111&gt; - Mounting /dev/sda2 as /mnt/disk/ ......OK
-10.0.1.111&gt; - Mounting /dev/sda5 as /mnt/disk/home ......OK
-10.0.1.111&gt; ++++++++++++++++++++++++++
-10.0.1.111&gt; none on /sys type sysfs (rw,relatime)
-10.0.1.111&gt; none on /proc/bus/usb type usbfs (rw,relatime)
-10.0.1.111&gt; /dev/ram3 on /tmp/stage2 type ext2 (rw,relatime,errors=continue)
-10.0.1.111&gt; /dev/sda2 on /mnt/disk type ext3 (rw,relatime,errors=continue,data=ordered)
-10.0.1.111&gt; /dev/sda5 on /mnt/disk/home type ext4 (rw,relatime,barrier=1,data=ordered)
-10.0.1.111&gt; ++++++++++++++++++++++++++
-10.0.1.111&gt; Linux copy is about to start
-10.0.1.111&gt; Server IP is 10.0.1.42
-10.0.1.111&gt; Buffers names :pipe
-Total data received = 21 Megs (10.830 Mbytes/sec); BUF :0M
-10.0.1.111&gt; ==&gt; /tmp/kacmd &lt;==
-10.0.1.111&gt; Starting log server..
-10.0.1.111&gt;
-10.0.1.111&gt; ==&gt; /tmp/ka_log-localhost-20100507-11h17 &lt;==
-Total data received = 788 Megs (10.796 Mbytes/sec); BUF :0M End of data flow
-10.0.1.111&gt; Flushing buffers
-10.0.1.111&gt; Total data received = 792 Megs, in 574479 packets
-10.0.1.111&gt; Elapsed time = 73.413 seconds, throughput = 10.801 Mbytes/second
-10.0.1.111&gt; Syncing disks...OK
-10.0.1.111&gt; Linux copy done.
-10.0.1.111&gt; Creating excluded directories
-10.0.1.111&gt; - bootloader is grub (user choice)
-10.0.1.111&gt; `/tmp/partfiles/pfstab' -&gt; `/mnt/disk/etc/fstab'
-10.0.1.111&gt; - Removing duplicated dhcp cache
-10.0.1.111&gt; - Writing modprobe.conf
-10.0.1.111&gt; ********************
-10.0.1.111&gt; install scsi_hostadapter /sbin/modprobe aic7xxx; /bin/true
-10.0.1.111&gt; install scsi_hostadapter /sbin/modprobe pata_serverworks; /bin/true
-10.0.1.111&gt; alias eth0 tg3
-10.0.1.111&gt; alias eth1 tg3
-10.0.1.111&gt; ********************
-10.0.1.111&gt; - Remove persistent udev rules
-10.0.1.111&gt; removed `/mnt/disk/etc/udev/rules.d/70-persistent-net.rules'
-10.0.1.111&gt; - Fix /dev in /mnt/disk
-10.0.1.111&gt; `/ka2/udev_creation.sh' -&gt; `/mnt/disk/sbin/udev_creation.sh'
-10.0.1.111&gt; Starting udev: [ OK ]
-10.0.1.111&gt; umount: /mnt/disk/dev: device is busy.
-10.0.1.111&gt; (In some cases useful info about processes that use
-10.0.1.111&gt; the device is found by lsof(8) or fuser(1))
-10.0.1.111&gt; - Running mkinitrd
-10.0.1.111&gt; - Looking for default grub menu
-10.0.1.111&gt; - erase old initrd.img link
-10.0.1.111&gt; removed `/mnt/disk/boot/initrd.img'
-10.0.1.111&gt; initrd will be : /boot/initrd-2.6.33.3-desktop-1mnb.img
-10.0.1.111&gt; running: chroot /mnt/disk /sbin/mkinitrd -v -f /boot/initrd-2.6.33.3-desktop-1mnb.img 2.6.33.3-desktop-1mnb
-10.0.1.111&gt; Creating initramfs
-10.0.1.111&gt; Looking for driver for /dev/sda2 in /sys/block/sda/sda2
-10.0.1.111&gt; Looking for deps of module scsi:t-0x00: crc-t10dif scsi_mod sd_mod
-10.0.1.111&gt; Looking for deps of module pci:v00009005d000000CFsv00001028sd00000121bc01sc00i00: scsi_mod scsi_transport_spi aic7xxx
-10.0.1.111&gt; Looking for deps of module pci:v00008086d00000309sv00000000sd00000000bc06sc04i00: pci_hotplug shpchp
-10.0.1.111&gt; Looking for driver for /dev/sda1 in /sys/block/sda/sda1
-10.0.1.111&gt; Using modules: usbhid ehci-hcd ohci-hcd uhci-hcd ext3 crc-t10dif scsi_mod sd_mod scsi_transport_spi aic7xxx pci_hotplug shpchp pata_serverworks
-10.0.1.111&gt; Building initrd in /tmp/initrd.uuIIkZ
-10.0.1.111&gt; /sbin/nash -&gt; /tmp/initrd.uuIIkZ/bin/nash
-10.0.1.111&gt; /usr/lib/libnash.so.6.0.93 -&gt; /tmp/initrd.uuIIkZ/usr/lib/libnash.so.6.0.93
-10.0.1.111&gt; /lib/libdevmapper.so.1.02 -&gt; /tmp/initrd.uuIIkZ/lib/libdevmapper.so.1.02
-10.0.1.111&gt; /lib/libreadline.so.6 -&gt; /tmp/initrd.uuIIkZ/lib/libreadline.so.6
-10.0.1.111&gt; /lib/libreadline.so.6.1 -&gt; /tmp/initrd.uuIIkZ/lib/libreadline.so.6.1
-10.0.1.111&gt; /lib/libncurses.so.5 -&gt; /tmp/initrd.uuIIkZ/lib/libncurses.so.5
-10.0.1.111&gt; /lib/libncurses.so.5.7 -&gt; /tmp/initrd.uuIIkZ/lib/libncurses.so.5.7
-10.0.1.111&gt; /lib/libc.so.6 -&gt; /tmp/initrd.uuIIkZ/lib/libc.so.6
-10.0.1.111&gt; /lib/libc-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/libc-2.11.1.so
-10.0.1.111&gt; /lib/ld-linux.so.2 -&gt; /tmp/initrd.uuIIkZ/lib/ld-linux.so.2
-10.0.1.111&gt; /lib/ld-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/ld-2.11.1.so
-10.0.1.111&gt; /lib/libdl.so.2 -&gt; /tmp/initrd.uuIIkZ/lib/libdl.so.2
-10.0.1.111&gt; /lib/libdl-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/libdl-2.11.1.so
-10.0.1.111&gt; /lib/libudev.so.0 -&gt; /tmp/initrd.uuIIkZ/lib/libudev.so.0
-10.0.1.111&gt; /lib/libudev.so.0.7.0 -&gt; /tmp/initrd.uuIIkZ/lib/libudev.so.0.7.0
-10.0.1.111&gt; /usr/lib/libparted.so.0 -&gt; /tmp/initrd.uuIIkZ/usr/lib/libparted.so.0
-10.0.1.111&gt; /usr/lib/libparted.so.0.0.1 -&gt; /tmp/initrd.uuIIkZ/usr/lib/libparted.so.0.0.1
-10.0.1.111&gt; /lib/libuuid.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/libuuid.so.1
-10.0.1.111&gt; /lib/libuuid.so.1.3.0 -&gt; /tmp/initrd.uuIIkZ/lib/libuuid.so.1.3.0
-10.0.1.111&gt; /lib/libblkid.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/libblkid.so.1
-10.0.1.111&gt; /lib/libblkid.so.1.1.0 -&gt; /tmp/initrd.uuIIkZ/lib/libblkid.so.1.1.0
-10.0.1.111&gt; /lib/libpopt.so.0 -&gt; /tmp/initrd.uuIIkZ/lib/libpopt.so.0
-10.0.1.111&gt; /lib/libpopt.so.0.0.0 -&gt; /tmp/initrd.uuIIkZ/lib/libpopt.so.0.0.0
-10.0.1.111&gt; /lib/libresolv.so.2 -&gt; /tmp/initrd.uuIIkZ/lib/libresolv.so.2
-10.0.1.111&gt; /lib/libresolv-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/libresolv-2.11.1.so
-10.0.1.111&gt; /usr/lib/libelf.so.1 -&gt; /tmp/initrd.uuIIkZ/usr/lib/libelf.so.1
-10.0.1.111&gt; /usr/lib/libelf-0.146.so -&gt; /tmp/initrd.uuIIkZ/usr/lib/libelf-0.146.so
-10.0.1.111&gt; /lib/libm.so.6 -&gt; /tmp/initrd.uuIIkZ/lib/libm.so.6
-10.0.1.111&gt; /lib/libm-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/libm-2.11.1.so
-10.0.1.111&gt; /lib/libgcc_s.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/libgcc_s.so.1
-10.0.1.111&gt; /lib/libgcc_s-4.4.3.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/libgcc_s-4.4.3.so.1
-10.0.1.111&gt; /usr/lib/libbdevid.so.6.0.93 -&gt; /tmp/initrd.uuIIkZ/usr/lib/libbdevid.so.6.0.93
-10.0.1.111&gt; /sbin/modprobe -&gt; /tmp/initrd.uuIIkZ/bin/modprobe
-10.0.1.111&gt; /lib/libmodprobe.so.0 -&gt; /tmp/initrd.uuIIkZ/lib/libmodprobe.so.0
-10.0.1.111&gt; /lib/libmodprobe.so.0.0.0 -&gt; /tmp/initrd.uuIIkZ/lib/libmodprobe.so.0.0.0
-10.0.1.111&gt; /lib/libz.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/libz.so.1
-10.0.1.111&gt; /lib/libz.so.1.2.3 -&gt; /tmp/initrd.uuIIkZ/lib/libz.so.1.2.3
-10.0.1.111&gt; /sbin/rmmod -&gt; /tmp/initrd.uuIIkZ/bin/rmmod
-10.0.1.111&gt; /bin/ln -&gt; /tmp/initrd.uuIIkZ/bin/ln
-10.0.1.111&gt; resolving for MODULES
-10.0.1.111&gt; and that has items of usbhid ehci-hcd ohci-hcd uhci-hcd ext3 crc-t10dif scsi_mod sd_mod scsi_transport_spi aic7xxx pci_hotplug shpchp pata_serverworks
-10.0.1.111&gt; Looking for deps of module usbhid: usbcore hid
-10.0.1.111&gt; Looking for deps of module ehci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module ohci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module uhci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module ext3: jbd
-10.0.1.111&gt; Looking for deps of module crc-t10dif
-10.0.1.111&gt; Looking for deps of module scsi_mod
-10.0.1.111&gt; Looking for deps of module sd_mod: crc-t10dif scsi_mod
-10.0.1.111&gt; Looking for deps of module scsi_transport_spi: scsi_mod
-10.0.1.111&gt; Looking for deps of module aic7xxx: scsi_mod scsi_transport_spi
-10.0.1.111&gt; Looking for deps of module pci_hotplug
-10.0.1.111&gt; Looking for deps of module shpchp: pci_hotplug
-10.0.1.111&gt; Looking for deps of module pata_serverworks: scsi_mod libata
-10.0.1.111&gt; Looking for deps of module aic7xxx: scsi_mod scsi_transport_spi
-10.0.1.111&gt; Looking for deps of module crc-t10dif
-10.0.1.111&gt; Looking for deps of module ehci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module ext3: jbd
-10.0.1.111&gt; Looking for deps of module hid
-10.0.1.111&gt; Looking for deps of module jbd
-10.0.1.111&gt; Looking for deps of module libata: scsi_mod
-10.0.1.111&gt; Looking for deps of module ohci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module pata_serverworks: scsi_mod libata
-10.0.1.111&gt; Looking for deps of module pci_hotplug
-10.0.1.111&gt; Looking for deps of module scsi_mod
-10.0.1.111&gt; Looking for deps of module scsi_transport_spi: scsi_mod
-10.0.1.111&gt; Looking for deps of module sd_mod: crc-t10dif scsi_mod
-10.0.1.111&gt; Looking for deps of module shpchp: pci_hotplug
-10.0.1.111&gt; Looking for deps of module uhci-hcd: usbcore
-10.0.1.111&gt; Looking for deps of module usbcore
-10.0.1.111&gt; Looking for deps of module usbhid: usbcore hid
-10.0.1.111&gt; resolving for availmodules
-10.0.1.111&gt; and that has items of
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/scsi/aic7xxx/aic7xxx.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/aic7xxx.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/lib/crc-t10dif.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/crc-t10dif.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/usb/host/ehci-hcd.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/ehci-hcd.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/fs/ext3/ext3.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/ext3.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/hid/hid.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/hid.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/fs/jbd/jbd.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/jbd.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/ata/libata.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/libata.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/usb/host/ohci-hcd.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/ohci-hcd.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/ata/pata_serverworks.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/pata_serverworks.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/pci/hotplug/pci_hotplug.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/pci_hotplug.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/scsi/scsi_mod.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/scsi_mod.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/scsi/scsi_transport_spi.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/scsi_transport_spi.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/scsi/sd_mod.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/sd_mod.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/pci/hotplug/shpchp.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/shpchp.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/usb/host/uhci-hcd.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/uhci-hcd.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/usb/core/usbcore.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/usbcore.ko.gz
-10.0.1.111&gt; /lib/modules/2.6.33.3-desktop-1mnb/kernel/drivers/hid/usbhid/usbhid.ko.gz -&gt; /tmp/initrd.uuIIkZ/lib/modules/2.6.33.3-desktop-1mnb/usbhid.ko.gz
-10.0.1.111&gt; /etc/sysconfig/keyboard -&gt; /tmp/initrd.uuIIkZ/etc/sysconfig/keyboard
-10.0.1.111&gt; /bin/loadkeys -&gt; /tmp/initrd.uuIIkZ/bin/loadkeys
-10.0.1.111&gt; /etc/sysconfig/console/default.kmap -&gt; /tmp/initrd.uuIIkZ/etc/sysconfig/console/default.kmap
-10.0.1.111&gt; /etc/sysconfig/i18n -&gt; /tmp/initrd.uuIIkZ/etc/sysconfig/i18n
-10.0.1.111&gt; /bin/setfont -&gt; /tmp/initrd.uuIIkZ/bin/setfont
-10.0.1.111&gt; /usr/lib/kbd/consolefonts/lat0-16.psfu.gz -&gt; /tmp/initrd.uuIIkZ/usr/lib/kbd/consolefonts/lat0-16.psfu.gz
-10.0.1.111&gt; /lib/udev/console_init -&gt; /tmp/initrd.uuIIkZ/lib/udev/console_init
-10.0.1.111&gt; probing for drm modules for pci device /sys/bus/pci/devices/0000:00:0e.0
-10.0.1.111&gt; Adding graphics device /sys/bus/pci/devices/0000:00:0e.0
-10.0.1.111&gt; Looking for deps of module pci:v00001002d00004752sv00001028sd00000121bc03sc00i00
-10.0.1.111&gt; resolving for GRAPHICSMODS
-10.0.1.111&gt; and that has items of
-10.0.1.111&gt; Adding module usbhid
-10.0.1.111&gt; Adding module ehci-hcd
-10.0.1.111&gt; Adding module ohci-hcd
-10.0.1.111&gt; Adding module uhci-hcd
-10.0.1.111&gt; Adding module ext3
-10.0.1.111&gt; Adding module crc-t10dif
-10.0.1.111&gt; Adding module scsi_mod
-10.0.1.111&gt; Adding module sd_mod
-10.0.1.111&gt; Adding module scsi_transport_spi
-10.0.1.111&gt; Adding module aic7xxx
-10.0.1.111&gt; Adding module pci_hotplug
-10.0.1.111&gt; Adding module shpchp
-10.0.1.111&gt; Adding module pata_serverworks
-10.0.1.111&gt; /usr/sbin/resume -&gt; /tmp/initrd.uuIIkZ/bin/resume
-10.0.1.111&gt; /usr/lib/suspend/resume -&gt; /tmp/initrd.uuIIkZ/usr/lib/suspend/resume
-10.0.1.111&gt; /usr/lib/liblzo2.so.2 -&gt; /tmp/initrd.uuIIkZ/usr/lib/liblzo2.so.2
-10.0.1.111&gt; /usr/lib/liblzo2.so.2.0.0 -&gt; /tmp/initrd.uuIIkZ/usr/lib/liblzo2.so.2.0.0
-10.0.1.111&gt; /lib/libpthread.so.0 -&gt; /tmp/initrd.uuIIkZ/lib/libpthread.so.0
-10.0.1.111&gt; /lib/libpthread-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/libpthread-2.11.1.so
-10.0.1.111&gt; /lib/libply.so.2 -&gt; /tmp/initrd.uuIIkZ/lib/libply.so.2
-10.0.1.111&gt; /lib/libply.so.2.0.0 -&gt; /tmp/initrd.uuIIkZ/lib/libply.so.2.0.0
-10.0.1.111&gt; /lib/librt.so.1 -&gt; /tmp/initrd.uuIIkZ/lib/librt.so.1
-10.0.1.111&gt; /lib/librt-2.11.1.so -&gt; /tmp/initrd.uuIIkZ/lib/librt-2.11.1.so
-10.0.1.111&gt; /lib/libply-splash-core.so.2 -&gt; /tmp/initrd.uuIIkZ/lib/libply-splash-core.so.2
-10.0.1.111&gt; /lib/libply-splash-core.so.2.0.0 -&gt; /tmp/initrd.uuIIkZ/lib/libply-splash-core.so.2.0.0
-10.0.1.111&gt; /etc/suspend.conf -&gt; /tmp/initrd.uuIIkZ/etc/suspend.conf
-10.0.1.111&gt; This initrd uses dynamic shared objects.
-10.0.1.111&gt; Adding dynamic linker configuration files.
-10.0.1.111&gt; /etc/ld.so.conf -&gt; /tmp/initrd.uuIIkZ/etc/ld.so.conf
-10.0.1.111&gt; Running ldconfig
-10.0.1.111&gt; Installation finished. No error reported.
-10.0.1.111&gt; This is the contents of the device map /boot/grub/device.map.
-10.0.1.111&gt; Check if this is correct or not. If any of the lines is incorrect,
-10.0.1.111&gt; fix it and re-run the script `grub-install'.
-10.0.1.111&gt;
-10.0.1.111&gt; (hd0) /dev/sda
-10.0.1.111&gt; Umounting /dev/sda5...OK
-10.0.1.111&gt; Umounting /dev/sda2...OK
-10.0.1.111&gt; ftp: connect: Connection refused
-10.0.1.111&gt; Local directory now /tmp
-10.0.1.111&gt; Not connected.
-</pre></div><div class="sect2" title="6.3. Post duplication process"><div class="titlepage"><div><div><h3 class="title"><a id="id2516818"></a>6.3. Post duplication process</h3></div></div></div><p>Now client nodes reboots, so we have to switch PXE to a local boot.</p><p>
-</p><pre class="programlisting">
-[root@node42 ka]# vi /var/lib/tftpboot/X86PC/linux/pxelinux.cfg/default
-DEFAULT local
-</pre><p>
- </p><p>Nodes hsould be up, we can to see their hardware.</p><p>
- </p><pre class="programlisting">
-[root@node42 ka]# ssh render@10.0.1.110
-[render@linux ~]$ lspcidrake
-8139too : Realtek Semiconductor Co., Ltd.|RTL-8139/8139C/8139C+ [NETWORK_ETHERNET] (rev: 10)
-snd_intel8x0 : Intel Corporation|82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller [MULTIMEDIA_AUDIO] (rev: 02)
-i2c_i801 : Intel Corporation|82801EB/ER (ICH5/ICH5R) SMBus Controller [SERIAL_SMBUS] (rev: 02)
-ata_piix : Intel Corporation|82801EB/ER (ICH5/ICH5R) IDE Controller [STORAGE_IDE] (rev: 02)
-iTCO_wdt : Intel Corporation|82801EB/ER (ICH5/ICH5R) LPC Interface Bridge [BRIDGE_ISA] (rev: 02)
-shpchp : Intel Corporation|82801 PCI Bridge [BRIDGE_PCI] (rev: c2)
-ehci_hcd : Intel Corporation|82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller [SERIAL_USB] (rev: 02)
-uhci_hcd : Intel Corporation|82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 [SERIAL_USB] (rev: 02)
-uhci_hcd : Intel Corporation|82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 [SERIAL_USB] (rev: 02)
-uhci_hcd : Intel Corporation|82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 [SERIAL_USB] (rev: 02)
-uhci_hcd : Intel Corporation|82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 [SERIAL_USB] (rev: 02)
-unknown : Intel Corporation|82865G/PE/P Processor to I/O Memory Interface [SYSTEM_OTHER] (rev: 02)
-Card:Intel 810 and later: Intel Corporation|82865G Integrated Graphics Controller [DISPLAY_VGA] (rev: 02)
-unknown : Intel Corporation|82865G/PE/P DRAM Controller/Host-Hub Interface [BRIDGE_HOST] (rev: 02)
-hub : Linux 2.6.33.3-desktop-1mnb uhci_hcd|UHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-hub : Linux 2.6.33.3-desktop-1mnb uhci_hcd|UHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-hub : Linux 2.6.33.3-desktop-1mnb uhci_hcd|UHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-usbhid : |SCISSORS Keyboard [Human Interface Device|Boot Interface Subclass|Keyboard]
-hub : Linux 2.6.33.3-desktop-1mnb uhci_hcd|UHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-hub : Linux 2.6.33.3-desktop-1mnb ehci_hcd|EHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-[render@linux ~]$ cat /etc/modprobe.conf
-install scsi_hostadapter /sbin/modprobe ata_piix; /sbin/modprobe ahci; /bin/true
-alias eth0 8139too
-install usb-interface /sbin/modprobe ehci_hcd; /sbin/modprobe uhci_hcd; /bin/true
-alias sound-slot-0 snd_intel8x0
-
-[root@node42 ka]# ssh render@10.0.1.111
-[render@localhost ~]$ lspcidrake
-ath5k : Atheros Communications Inc.|AR2413 802.11bg NIC [NETWORK_ETHERNET] (rev: 01)
-tg3 : Broadcom Corporation|NetXtreme BCM5701 Gigabit Ethernet [NETWORK_ETHERNET] (rev: 15)
-tg3 : Broadcom Corporation|NetXtreme BCM5701 Gigabit Ethernet [NETWORK_ETHERNET] (rev: 15)
-aic7xxx : Adaptec|AIC-7899P U160/m [STORAGE_SCSI] (rev: 01)
-aic7xxx : Adaptec|AIC-7899P U160/m [STORAGE_SCSI] (rev: 01)
-shpchp : Intel Corporation|80303 I/O Processor PCI-to-PCI Bridge [BRIDGE_PCI] (rev: 01)
-unknown : Broadcom|CIOB-X2 PCI-X I/O Bridge [BRIDGE_HOST] (rev: 03)
-unknown : Broadcom|CIOB-X2 PCI-X I/O Bridge [BRIDGE_HOST] (rev: 03)
-unknown : Broadcom|CIOB-X2 PCI-X I/O Bridge [BRIDGE_HOST] (rev: 03)
-unknown : Broadcom|CIOB-X2 PCI-X I/O Bridge [BRIDGE_HOST] (rev: 03)
-unknown : Broadcom|CSB5 LPC bridge [BRIDGE_ISA]
-ohci_hcd : Broadcom|OSB4/CSB5 OHCI USB Controller [SERIAL_USB] (rev: 05)
-pata_serverworks: Broadcom|CSB5 IDE Controller [STORAGE_IDE] (rev: 93)
-i2c_piix4 : Broadcom|CSB5 South Bridge [BRIDGE_HOST] (rev: 93)
-Card:ATI Mach 64-based cards (no 3D acceleration): ATI Technologies Inc|Rage XL [DISPLAY_VGA] (rev: 27)
-unknown : Dell|Embedded Remote Access: BMC/SMIC device
-unknown : Dell|Remote Access Card III
-unknown : Dell|Embedded Remote Access or ERA/O
-unknown : Broadcom|CMIC-LE [BRIDGE_HOST]
-unknown : Broadcom|CMIC-WS Host Bridge (GC-LE chipset) [BRIDGE_HOST]
-unknown : Broadcom|CMIC-WS Host Bridge (GC-LE chipset) [BRIDGE_HOST] (rev: 13)
-hub : Linux 2.6.33.3-desktop-1mnb ohci_hcd|OHCI Host Controller [Hub|Unused|Full speed (or root) hub]
-
-
-[render@localhost ~]$ cat /etc/modprobe.conf
-install scsi_hostadapter /sbin/modprobe pata_serverworks; /sbin/modprobe aic7xxx; /bin/true
-alias eth0 tg3
-alias eth1 tg3
-install ide-controller /sbin/modprobe ide_generic; /bin/true
-install usb-interface /sbin/modprobe ohci_hcd; /bin/true
-alias wlan0 ath5k
-</pre><p>
- </p></div></div></div></body></html>