From 950d8dffb4feade57c27a76365612463141c57a3 Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 13 Sep 2011 19:51:47 +0000 Subject: [PATCH] updated genimage man page, defect 3408401 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10514 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/genimage | 2 + xCAT-client/pods/man1/genimage.1.pod | 118 +++++++++++++++++++-------- 2 files changed, 86 insertions(+), 34 deletions(-) diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index 81786c200..c99bed4db 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -49,12 +49,14 @@ my $mode; sub print_usage { print "Usage:\n"; + print " genimage\n\n"; print ' genimage -o [-a ] -p -i -n [-r ] [-k ] [-g ] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission ]'."\n\n"; print ' genimage [-o ] [-a ] [-p ] [-i ] [-n ] [-r ] [-k ] [-g ] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission ] '."\n\n"; print " --permission is used for statelite only\n"; print " -g is used for SLES only\n\n"; print " -m is used for urbuntu, debian and fedora12 only\n\n"; print "Examples:\n"; + print " genimage\n"; print " genimage -i eth0 -n tg3 -o sles11 -p compute\n"; print " genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute\n"; print " genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute\n"; diff --git a/xCAT-client/pods/man1/genimage.1.pod b/xCAT-client/pods/man1/genimage.1.pod index 1279ea0a0..2c83776f5 100644 --- a/xCAT-client/pods/man1/genimage.1.pod +++ b/xCAT-client/pods/man1/genimage.1.pod @@ -4,38 +4,61 @@ B - Generates a stateless image to be used for a diskless install. =head1 SYNOPSIS -B B<-o> I B<-p> I [B<-i> I] [B<-n> I] [B<-l> I] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> statelite] [B<--permission> I] +B + +B B<-o> I [B<-a> I] B<-p> I B<-i> I B<-n> I [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> I] [B<-l> I] [B<-t> I] [B<--permission> I] + +B [B<-o> I] [B<-a> I] [B<-p> I] [B<-i> I] [B<-n> I] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> I] [B<-l> I] [B<-t> I] [B<--permission> I] I -B [B<-o> I] [B<-l> I] [B<-i> I] [B<-n> I] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> statelite] imagename B [B<-h> | B<--help> | B<-v> | B<--version>] =head1 DESCRIPTION -Generates a stateless image that can be used to boot xCAT nodes in a diskless mode. +Generates a stateless and a statelite image that can be used to boot xCAT nodes in a diskless mode. If I is not specified, the default packages included -(and excluded) in the image are specified by /opt/xcat/share/xcat/netboot//...pkglist and -/opt/xcat/share/xcat/netboot//.exlist. -Additional packages that are not from the os distro can be specified in a ..otherpkgs.pkglist file. -Customized package list files can be specified under /install/custom/netboot/ directory. The generated image will be put in /install/netboot///. +(and excluded) in the image are specified by -If I is specified, the package list files are specified in the I table and I table. -If B runs on the Management node, both the I table and I table will be updated following the B options. And, if there is no I called --netboot- or --statelite-, the B command will create them into I and I tables. +/opt/xcat/share/xcat/netboot//[.][.].pkglist and + +/opt/xcat/share/xcat/netboot//[.][.].exlist. + +Additional packages that are not from the os distro can be specified in a + +/opt/xcat/share/xcat/netboot//[.][.].otherpkgs.pkglist file. + +Customized package list files can be specified under /install/custom/netboot/ directory. The generated image will be put in /install/netboot/// directory. + +The newly generated image names will have the following format: + + for stateless: --netboot- + + for statelite: --statelite- + +B command will create them into I and I tables. + +If I is specified, the package list file names are read from the I table and I tables. + +If B runs on the management node, both the I table and I table will be updated with the given values from the options. + +The B command will generate two initial ramdisks for B and B, one is B, the other one is B. + +After your image is created, you can chroot to the +image, install any additional software you would like, or make modifications to files, and then run the following command to prepare the image for deployment. + +for stateless: B + +for statelite: B + +Becides prompting for the input for some flags, the B command can not be used in interactive mode. If any of the rpms or other scripts prompt, such as to accept a license agreement, you must use the genimage script specific to your OS from the /opt/xcat/share/xcat/netboot/ directory. The B command must be run on a system that is the same architecture as the nodes it will be used on. If the management node is not the same architecture, copy the contents of -/opt/xcat/share/xcat/netboot/ to a system that is the proper architecture, and mount /install from -the management node to that system. +/opt/xcat/share/xcat/netboot/ to a system that is the proper architecture, and mount /install from +the management node to that system. Then change directory to /opt/xcat/share/xcat/netboot/ and run ./genimage. -The B command will run geninitrd automatically. (You can run geninitrd yourself at a later time, if -you want to rebuild the initrd.) After your image is created, you can chroot to the -image, install any additional software you would like, or make modifications to files, and then run -B to prepare the image for deployment. -The B and B commands will generate two initial ramdisks for B and B, one is B, the other one is B. - -The B command can not be used in interactive mode. If any of the rpms or other scripts prompt, such as to accept a license agreement, you must use the genimage script specific to your OS from the /opt/xcat/share/xcat/netboot/ directory. =head1 Parameters @@ -46,25 +69,25 @@ I specifies the name of a os image definition to be used. The specifi =over 12 -=item B<-o> I +=item B<-a> I + +The hardware architecture of this node: x86_64, ppc64, x86, ia64, etc. If omitted, the current hardware architecture will be used. + +=item B<-o> I The operating system for the image: fedora8, rhel5, sles10, etc. The OS packages must be in -/install// (use L). +/install// (use L). =item B<-p> I The profile (e.g. compute, service) to use to create the image. This determines what package lists are -used from /opt/xcat/share/xcat/netboot/ to create the image with. When deploying nodes with this image, +used from /opt/xcat/share/xcat/netboot/ to create the image with. When deploying nodes with this image, the nodes' nodetype.profile attribute must be set to this same value. =item B<-i> I The network interface the diskless node will boot over (e.g. eth0). -=item B<--permission> I - -The mount permission of B directory for B mode, which is only used for B mode, and the default permission is 755. - =item B<-n> I This argument is now optional, and allows you to specify the driver @@ -81,16 +104,20 @@ which may prove important in some cases. The maximum size allowed for the root file system in the image. Specify in bytes, or can append k, m, or g. -=item B<-r> I +=item B<--permission> I + +The mount permission of B directory for B mode, which is only used for B mode, and the default permission is 755. + +=item B<-r> I Other network interfaces (e.g. eth1) in the image that should be configured via DHCP. -=item B<-k> I +=item B<-k> I Use this flag if you want to use a specific version of the kernel in the image. Defaults to the first kernel found in the install image. -=item B<-g> I +=item B<-g> I This flag is for SLES only. Use this flag to specify the rpm version for kernel packages in the image. It must be present if -k flag is specified in the command for SLES. @@ -121,16 +148,39 @@ Display usage message. =over 3 -=item 1. +=item 1 +To prompt the user for inputs: -For example, to generate a fedora8 image for a compute node architecture + genimage + +=item 2 + +To generate a fedora8 image for a compute node architecture x86_64 and place it in the /install/netboot/fedora8/x86_64/compute/rootimg directory: - cd /opt/xcat/share/xcat/netboot/fedora/ - genimage -i eth0 -o fedora8 -p compute + genimage -i eth0 -o fedora8 -p compute + +=item 3 + + genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute + +=item 4 + + genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute + +=item 5 + + genimage -i eth0 -n igb,e1000e,e1000,bnx2,tg3 -o centos5.4 -p nfsroot --permission 777 + +=item 6 + + genimage -i eth0 -n tg3 myimagename + +=item 7 + + genimage myimagename -This would use the profile information from the /opt/xcat/share/xcat/netboot/fedora/compute* files. =back @@ -144,4 +194,4 @@ This would use the profile information from the /opt/xcat/share/xcat/netboot/fed =head1 SEE ALSO -L, L +L, L, L