From ddf56b2788ae770d855d08aa449e571ed4273f0c Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 18 Mar 2014 14:51:33 -0400 Subject: [PATCH] clarify that genimage -i is optional --- xCAT-client/bin/genimage | 12 ++-- xCAT-client/pods/man1/genimage.1.pod | 88 +++++++++++++++------------- 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index 2f210d811..0fb485fea 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -117,7 +117,7 @@ if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { if ($? == 0) { if (($tmpimgs) && ($tmpimgs !~ /^Could/)) { #Could is returned when the osimage table is empty my @images=split('\n', $tmpimgs); - print "Do you want to re-genarate an existing image from the osimage table? "; + print "Do you want to re-generate an existing image from the osimage table? "; print "[y/n] "; my $conf = ; chomp($conf); @@ -128,7 +128,7 @@ if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { foreach(sort @images){ print " $_\n"; } - # default is the first image cause in many cases + # default is the first image print "Which image do you want to re-generate? ["; print $images[0]; print "] "; @@ -294,13 +294,10 @@ if ($profile) { print " Profile: $profile\n"; } # get the interface if ((!$imagename) && (!$interface)){ while(1){ - print "Which network interface do you want the image to boot from? ["; - print "eth0"; - print "] "; + print "OPTIONAL: Which specific network interface will the image boot from? []"; $interface = ; chomp($interface); if($interface eq ""){ - $interface = "eth0"; last; }else{ print "You want your stateless machines to boot off of "; @@ -317,8 +314,9 @@ if ((!$imagename) && (!$interface)){ } } } + if ($interface) { print " Interface: $interface\n"; } + else { print " No interface specified. The interface will be determined at network boot time.\n"; } } -if ($interface) { print " Interface: $interface\n"; } diff --git a/xCAT-client/pods/man1/genimage.1.pod b/xCAT-client/pods/man1/genimage.1.pod index 11a46e2c8..fdd3f5f88 100644 --- a/xCAT-client/pods/man1/genimage.1.pod +++ b/xCAT-client/pods/man1/genimage.1.pod @@ -6,10 +6,10 @@ B - Generates a stateless image to be used for a diskless install. B -B B<-o> I [B<-a> I] B<-p> I B<-i> I B<-n> I [B<--onlyinitrd>] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> I] [B<-l> I] [B<--permission> I] [B<--interactive>] [B<--dryrun>] - B [B<-o> I] [B<-a> I] [B<-p> I] [B<-i> I] [B<-n> I] [B<--onlyinitrd>] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> I] [B<-l> I] [B<--permission> I] [B<--interactive>] [B<--dryrun>] [B<--ignorekernelchk>] I +B B<-o> I [B<-a> I] B<-p> I B<-i> I B<-n> I [B<--onlyinitrd>] [B<-r> I] [B<-k> I] [B<-g> I] [B<-m> I] [B<-l> I] [B<--permission> I] [B<--interactive>] [B<--dryrun>] + B [B<-h> | B<--help> | B<-v> | B<--version>] @@ -17,43 +17,43 @@ B [B<-h> | B<--help> | B<-v> | B<--version>] =head1 DESCRIPTION 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 +The I format of the command is recommended. When specified, genimage will use the osimage definition for information to generate this image. Additional options specified on the command line will override any corresponding previous osimage settings, and will be written back to the osimage definition. + +If I is not specified (old method): + - 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 + - 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. + - Customized package list files will override these files and 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: + - osimage definitions will be created in the I and I tables. The newly generated image names will have the following format: - for stateless: --netboot- + for stateless: --netboot- - for statelite: --statelite- + 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 +After your image is generated, 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 paramters, the B command takes default quesses for the parameters not specified or not defined in the I and I tables. It also makes default answers for questions from yum/zypper command when installing rpms into the image. Please use --interactive flag if you want yum/zypper command to prompt you for the answers. +Besides prompting for some paramter values, the B command takes default guesses for the parameters not specified or not defined in the I and I tables. It also assumes default answers for questions from the yum/zypper command when installing rpms into the image. Please use --interactive flag if you want the yum/zypper command to prompt you for the answers. -If B<--onlyinitrd> is specified, only regenerates the initrd for a stateless image to be used for a diskless install. +If B<--onlyinitrd> is specified, genimage only regenerates the initrd for a stateless image to be used for a diskless install. The B command must be run on a system that is the same architecture and same distro with same major release version as the nodes it will be used on. If the management node is not the same architecture or same distro level, copy the contents of @@ -61,10 +61,9 @@ used on. If the management node is not the same architecture or same distro lev the management node to that system. Then change directory to /opt/xcat/share/xcat/netboot/ and run ./genimage. - =head1 Parameters -I specifies the name of a os image definition to be used. The specification for the image is storted in the I table and I table. +I specifies the name of an os image definition to be used. The specification for the image is stored in the I table and I table. =head1 OPTIONS @@ -88,7 +87,7 @@ 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). +This argument is now optional, and allows you to specify the network boot interface to be configured in the image (e.g. eth0). If not specified, the interface will be determined and configured during the network boot process. =item B<-n> I @@ -183,46 +182,53 @@ To prompt the user for inputs: genimage =item 2 +To generate an image using information from an osimage definition: -To generate a fedora8 image for a compute node architecture + genimage myimagename + +=item 3 +To run genimage in test mode without actually generating an image: + + genimage --dryrun myimagename + +=item 4 +To generate an image and have yum/zypper prompt for responses: + + genimage myimagename --interactive + +=item 5 +To generate an image, replacing some values in the osimage definition: + + genimage -i eth0 -n tg3 myimagename + +=item 6 +(old method) 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: genimage -i eth0 -o fedora8 -p compute -=item 3 +=item 7 +(old method) genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute -=item 4 +=item 8 +(old method) genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute --interactive -=item 5 +=item 9 +(old method) 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 - -=item 8 - - genimage myimagename --interactive - -=item 9 - -To regenerate the initrd for a fedora8 image for a compute node architecture x86_64 and place it in the /install/netboot/fedora8/x86_64/compute/rootimg directory: change directory to /opt/xcat/share/xcat/netboot/fedora and run: - - genimage --onlyinitrd -i eth0 -n tg3,bnx2 -o fedora8 -p compute - =item 10 +(old method) +To regenerate the initrd for a fedora8 image for a compute node architecture x86_64 and place it in the /install/netboot/fedora8/x86_64/compute/rootimg directory: - genimage --dryrun myimagename + cd /opt/xcat/share/xcat/netboot/fedora + ./genimage --onlyinitrd -i eth0 -n tg3,bnx2 -o fedora8 -p compute =back