Initial Fedora 8 support. Postscripts did not run, and ppc support has not been verified.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-01-13 18:18:28 +00:00
parent 76a2fa561c
commit 32cc0568a1
5 changed files with 1039 additions and 0 deletions

View File

@ -0,0 +1,344 @@
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
package xCAT_plugin::fedora;
use Storable qw(dclone);
use Sys::Syslog;
use xCAT::Table;
use xCAT::Template;
use xCAT::Postage;
use Data::Dumper;
use Getopt::Long;
Getopt::Long::Configure("bundling");
Getopt::Long::Configure("pass_through");
use File::Path;
use File::Copy;
my %discids = (
"1194015916.783841" => "fedora8",
);
sub handled_commands {
return {
copycd => "fedora",
mkinstall => "nodetype:os=fedora.*",
mknetboot => "nodetype:os=fedora.*"
}
}
sub process_request {
my $request = shift;
my $callback = shift;
my $doreq = shift;
my $distname = undef;
my $arch = undef;
my $path = undef;
if ($request->{command}->[0] eq 'copycd') {
return copycd($request,$callback,$doreq);
} elsif ($request->{command}->[0] eq 'mkinstall') {
return mkinstall($request,$callback,$doreq);
} elsif ($request->{command}->[0] eq 'mknetboot') {
return mknetboot($request,$callback,$doreq);
}
}
sub mknetboot {
my $req = shift;
my $callback = shift;
my $doreq = shift;
my $tftpdir = "/tftpboot";
my $nodes = @{$request->{node}};
my @args=@{$req->{arg}};
my @nodes = @{$req->{node}};
my $ostab = xCAT::Table->new('nodetype');
my $sitetab = xCAT::Table->new('site');
my $installroot;
if ($sitetab) {
(my $ref) = $sitetab->getAttribs({key=>installdir},value);
print Dumper($ref);
if ($ref and $ref->{value}) {
$installroot = $ref->{value};
}
}
foreach $node (@nodes) {
my $ent = $ostab->getNodeAttribs($node,['os','arch','profile']);
unless ($ent->{os} and $ent->{arch} and $ent->{profile}) {
$callback->({error=>["Insufficient nodetype entry for $node"],errorcode=>[1]});
next;
}
my $osver = $ent->{os};
my $arch = $ent->{arch};
my $profile = $ent->{profile};
unless (-r "/$installroot/netboot/$osver/$arch/$profile/kernel" and -r "$installroot/netboot/$osver/$arch/$profile/rootimg.gz") {
makenetboot($osver,$arch,$profile,$installroot,$callback);
mkpath("/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
copy("/$installroot/netboot/$osver/$arch/$profile/kernel","/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
copy("/$installroot/netboot/$osver/$arch/$profile/rootimg.gz","/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
}
unless (-r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/kernel" and -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/rootimg.gz") {
mkpath("/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
copy("/$installroot/netboot/$osver/$arch/$profile/kernel","/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
copy("/$installroot/netboot/$osver/$arch/$profile/rootimg.gz","/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
}
unless (-r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/kernel" and -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/rootimg.gz") {
$callback->({error=>["Netboot image creation failed for $node"],errorcode=>[1]});
next;
}
my $restab = xCAT::Table->new('noderes');
my $hmtab = xCAT::Table->new('nodehm');
my $ent = $restab->getNodeAttribs($node,['serialport','primarynic']);
my $kcmdline;
if (defined $ent->{serialport}) {
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($sent->{serialspeed}) {
$callback->({error=>["serialport defined, but no serialspeed for $node in nodehm table"],errorcode=>[1]});
next;
}
$kcmdline .= "console=ttyS".$ent->{serialport}.",".$sent->{serialspeed};
if ($sent->{serialflow} =~ /(hard|tcs|ctsrts)/) {
$kcmdline .= "n8r";
}
}
$restab->setNodeAttribs($node,{
kernel=>"xcat/netboot/$osver/$arch/$profile/kernel",
initrd=>"xcat/netboot/$osver/$arch/$profile/rootimg.gz",
kcmdline=>$kcmdline
});
}
}
sub makenetboot {
my $osver = shift;
my $arch = shift;
my $profile = shift;
my $installroot = shift;
my $callback = shift;
unless ($installroot) {
$callback->({error=>["No installdir defined in site table"],errorcode=>[1]});
return;
}
my $srcdir = "/$installroot/$osver/$arch/Server";
unless ( -d $srcdir."/repodata" ) {
$callback->({error=>["copycds has not been run for $osver/$arch (/$installroot/$osver/$arch/Server/repodata not found"],errorcode=>[1]});
return;
}
my $yumconf;
open($yumconf,">","/tmp/mknetboot.$$.yum.conf");
print $yumconf "[$osver-$arch]\nname=$osver-$arch\nbaseurl=file:///$srcdir\ngpgcheck=0\n";
close($yumconf);
system("yum -y -c /tmp/mknetboot.$$.yum.conf --installroot=$installroot/netboot/$osver/$arch/$profile/rootimg/ --disablerepo=* --enablerepo=$osver-$arch install bash dhclient kernel openssh-server openssh-clients dhcpv6_client vim-minimal");
my $cfgfile;
open($cfgfile,">","$installroot/netboot/$osver/$arch/$profile/rootimg/etc/fstab");
print $cfgfile "devpts /dev/pts devpts gid=5,mode=620 0 0\n";
print $cfgfile "tmpfs /dev/shm tmpfs defaults 0 0\n";
print $cfgfile "proc /proc proc defaults 0 0\n";
print $cfgfile "sysfs /sys sysfs defaults 0 0\n";
close($cfgfile);
open ($cfgfile,">","$installroot/netboot/$osver/$arch/$profile/rootimg/etc/sysconfig/network");
print $cfgfile "NETWORKING=yes\n";
close($cfgfile);
open ($cfgfile,">","$installroot/netboot/$osver/$arch/$profile/rootimg/etc/sysconfig/network-scripts/ifcfg-eth0");
print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=eth0\n";
close($cfgfile);
open ($cfgfile,">","$installroot/netboot/$osver/$arch/$profile/rootimg/etc/sysconfig/network-scripts/ifcfg-eth1");
print $cfgfile "ONBOOT=yes\nBOOTPROTO=dhcp\nDEVICE=eth1\n";
close($cfgfile);
link("$installroot/netboot/$osver/$arch/$profile/rootimg/sbin/init","$installroot/netboot/$osver/$arch/$profile/rootimg/init");
rename(<$installroot/netboot/$osver/$arch/$profile/rootimg/boot/vmlinuz*>,"$installroot/netboot/$osver/$arch/$profile/kernel");
if (-d "$installroot/postscripts/hostkeys") {
for my $key (<$installroot/postscripts/hostkeys/*key>) {
copy ($key,"$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/");
}
chmod 0600,</$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/*key>;
}
if (-d "/$installroot/postscripts/.ssh") {
mkpath("/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh");
chmod(0700,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/");
for my $file (</$installroot/postscripts/.ssh/*>) {
copy ($file,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/");
}
chmod(0600,</$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/*>);
}
my $oldpath=cwd;
chdir("$installroot/netboot/$osver/$arch/$profile/rootimg");
system("find . '!' -wholename './usr/share/man*' -a '!' -wholename './usr/share/locale*' -a '!' -wholename './usr/share/i18n*' -a '!' -wholename './var/cache/yum*' -a '!' -wholename './usr/share/doc*' -a '!' -wholename './usr/lib/locale*' -a '!' -wholename './boot*' |cpio -H newc -o | gzip -c - > ../rootimg.gz");
chdir($oldpath);
}
sub mkinstall {
my $request = shift;
my $callback = shift;
my $doreq = shift;
my @nodes = @{$request->{node}};
my $node;
my $ostab = xCAT::Table->new('nodetype');
my %doneimgs;
foreach $node (@nodes) {
my $osinst;
my $ent = $ostab->getNodeAttribs($node,['profile','os','arch']);
unless ($ent->{os} and $ent->{arch} and $ent->{profile}) {
$callback->({error=>["No profile defined in nodetype for $node"],errorcode=>[1]});
next; #No profile
}
my $os = $ent->{os};
my $arch = $ent->{arch};
my $profile = $ent->{profile};
unless (-r $::XCATROOT."/share/xcat/install/fedora/".$ent->{profile}.".tmpl" or
-r $::XCATROOT."/share/xcat/install/fedora/$profile.$arch.tmpl" or
-r $::XCATROOT."/share/xcat/install/fedora/$profile.$os.tmpl" or
-r $::XCATROOT."/share/xcat/install/fedora/$profile.$os.$arch.tmpl") {
$callback->({error=>["No kickstart template exists for ".$ent->{profile}],errorcode=>[1]});
next;
}
#Call the Template class to do substitution to produce a kickstart file in the autoinst dir
if ( -r $::XCATROOT."/share/xcat/install/fedora/$profile.$os.$arch.tmpl" ) {
xCAT::Template->subvars($::XCATROOT."/share/xcat/install/fedora/$profile.$os.$arch.tmpl","/install/autoinst/".$node,$node);
} elsif ( -r $::XCATROOT."/share/xcat/install/fedora/$profile.$arch.tmpl" ) {
xCAT::Template->subvars($::XCATROOT."/share/xcat/install/fedora/$profile.$arch.tmpl","/install/autoinst/".$node,$node);
} elsif ( -r $::XCATROOT."/share/xcat/install/fedora/$profile.$os.tmpl" ) {
xCAT::Template->subvars($::XCATROOT."/share/xcat/install/fedora/$profile.$os.tmpl","/install/autoinst/".$node,$node);
} else {
xCAT::Template->subvars($::XCATROOT."/share/xcat/install/fedora/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node);
}
mkpath "/install/postscripts/";
xCAT::Postage->writescript($node,"/install/postscripts/".$node);
if (($arch =~ /x86/ and
(-r "/install/$os/$arch/images/pxeboot/vmlinuz" and -r "/install/$os/$arch/images/pxeboot/initrd.img"))
or $arch =~ /ppc/ and
(-r "/install/$os/$arch/ppc/ppc64/vmlinuz" and -r "/install/$os/$arch/ppc/ppc64/ramdisk.image.gz")) {
unless ($doneimgs{"$os|$arch"}) {
#TODO: driver slipstream, targetted for network.
mkpath("/tftpboot/xcat/$os/$arch");
if ($arch =~ /x86/) {
copy("/install/$os/$arch/images/pxeboot/vmlinuz","/tftpboot/xcat/$os/$arch/");
copy("/install/$os/$arch/images/pxeboot/initrd.img","/tftpboot/xcat/$os/$arch/");
} elsif ($arch =~ /ppc/) {
copy("/install/$os/$arch/ppc/ppc64/vmlinuz","/tftpboot/xcat/$os/$arch/");
copy("/install/$os/$arch/ppc/ppc64/ramdisk.image.gz","/tftpboot/xcat/$os/$arch/initrd.img");
} else {
$callback->({error=>["Plugin doesn't know how to handle architecture $arch"],errorcode=>[1]});
next;
}
$doneimgs{"$os|$arch"}=1;
}
#We have a shot...
my $restab = xCAT::Table->new('noderes');
my $ent = $restab->getNodeAttribs($node,['nfsserver','serialport','primarynic','installnic']);
my $hmtab = xCAT::Table->new('nodehm');
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($ent and $ent->{nfsserver}) {
$callback->({error=>["No noderes.nfsserver defined for ".$ent->{profile}],errorcode=>[1]});
next;
}
my $kcmdline="nofb utf8 ks=http://".$ent->{nfsserver}."/install/autoinst/".$node;
if ($ent->{installnic}) {
$kcmdline.=" ksdevice=".$ent->{installnic};
} elsif ($ent->{primarynic}) {
$kcmdline.=" ksdevice=".$ent->{primarynic};
} else {
$kcmdline .= " ksdevice=eth0";
}
#TODO: dd=<url> for driver disks
if (defined $ent->{serialport}) {
unless ($sent->{serialspeed}) {
$callback->({error=>["serialport defined, but no serialspeed for $node in nodehm table"],errorcode=>[1]});
next;
}
$kcmdline.=" console=ttyS".$ent->{serialport}.",".$sent->{serialspeed};
if ($sent->{serialflow} =~ /(ctsrts|cts|hard)/) {
$kcmdline .= "n8r";
}
}
$kcmdline .= " noipv6";
$restab->setNodeAttribs($node,{
kernel=>"xcat/$os/$arch/vmlinuz",
initrd=>"xcat/$os/$arch/initrd.img",
kcmdline=>$kcmdline
});
} else {
$callback->({error=>["Install image not found in /install/$os/$arch"],errorcode=>[1]});
}
}
}
sub copycd {
my $request = shift;
my $callback = shift;
my $doreq = shift;
my $installroot;
my $sitetab = xCAT::Table->new('site');
if ($sitetab) {
(my $ref) = $sitetab->getAttribs({key=>installdir},value);
print Dumper($ref);
if ($ref and $ref->{value}) {
$installroot = $ref->{value};
}
}
@ARGV= @{$request->{arg}};
GetOptions(
'n=s' => \$distname,
'a=s' => \$arch,
'p=s' => \$path
);
unless ($path) {
#this plugin needs $path...
return;
}
if ($distname and $distname !~ /^fedora/) {
#If they say to call it something other than Fedora, give up?
return;
}
unless (-r $path."/.discinfo") {
return;
}
my $dinfo;
open($dinfo,$path."/.discinfo");
my $did = <$dinfo>;
chomp($did);
my $desc = <$dinfo>;
chomp($desc);
my $darch = <$dinfo>;
chomp($darch);
if ($darch and $darch =~ /i.86/) {
$darch = "x86";
}
close($dinfo);
if ($discids{$did}) {
unless ($distname) {
$distname = $discids{$did};
}
}
if ($desc =~ /^Fedora 8$/) {
unless ($distname) {
$distname = "fedora8";
}
}
unless ($distname) {
return; #Do nothing, not ours..
}
if ($darch) {
unless ($arch) {
$arch = $darch;
}
if ($arch and $arch ne $darch) {
$callback->({error=>"Requested Fedora architecture $arch, but media is $darch"});
return;
}
if ($arch =~ /ppc/) { $arch = "ppc64" };
}
%{$request} = (); #clear request we've got it.
$callback->({data=>"Copying media to $installroot/$distname/$arch/"});
my $omask=umask 0022;
mkpath("$installroot/$distname/$arch");
umask $omask;
my $rc = system("cd $path; find . | cpio -dump $installroot/$distname/$arch");
chmod 0755,"$installroot/$distname/$arch";
if ($rc != 0) {
$callback->({error=>"Media copy operation failed, status $rc"});
} else {
$callback->({data=>"Media copy operation successful"});
}
}
1;

View File

@ -0,0 +1,172 @@
#Tested with Fedora 8
#
lang en_US
#langsupport en_US
network --bootproto dhcp
#
# Where's the source?
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
#
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
#device ethernet e100
keyboard "us"
#
# Clear the MBR
#
zerombr yes
#
# Wipe out the disk
#
clearpart --all --initlabel
#clearpart --linux
#key --skip
#
# Customize to fit your needs
#
#No RAID
#/boot really significant for this sort of setup nowadays?
part None --fstype "PPC PReP Boot" --size 8
part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
#RAID 0 /scr for performance
#part / --size 1024 --ondisk sda
#part swap --size 512 --ondisk sda
#part /var --size 1024 --ondisk sdb
#part swap --size 512 --ondisk sdb
#part raid.01 --size 1 --grow --ondisk sda
#part raid.02 --size 1 --grow --ondisk sdb
#raid /scr --level 0 --device md0 raid.01 raid.02
#Full RAID 1 Sample
#part raid.01 --size 50 --ondisk sda
#part raid.02 --size 50 --ondisk sdb
#raid /boot --level 1 --device md0 raid.01 raid.02
#
#part raid.11 --size 1024 --ondisk sda
#part raid.12 --size 1024 --ondisk sdb
#raid / --level 1 --device md1 raid.11 raid.12
#
#part raid.21 --size 1024 --ondisk sda
#part raid.22 --size 1024 --ondisk sdb
#raid /var --level 1 --device md2 raid.21 raid.22
#
#part raid.31 --size 1024 --ondisk sda
#part raid.32 --size 1024 --ondisk sdb
#raid swap --level 1 --device md3 raid.31 raid.32
#
#part raid.41 --size 1 --grow --ondisk sda
#part raid.42 --size 1 --grow --ondisk sdb
#raid /scr --level 1 --device md4 raid.41 raid.42
#
# bootloader config
# --append <args>
# --useLilo
# --md5pass <crypted MD5 password for GRUB>
#
bootloader
#
# install or upgrade
#
install
#
# text mode install (default is graphical)
#
text
#
# firewall
#
firewall --disabled
#
# mouse selection
#
#mouse genericps/2 --emulthree
#mouse none
#
# Select a zone
# Add the --utc switch if your hardware clock is set to GMT
#
#timezone US/Hawaii
#timezone US/Pacific
#timezone US/Mountain
#timezone US/Central
#timezone US/Eastern
timezone --utc #TABLE:site:key=timezone:value#
#
# Don't do X
#
skipx
#
# To generate an encrypted root password use:
#
# perl -e 'print crypt("blah","Xa") . "\n";'p
# openssl passwd -apr1 -salt xxxxxxxx password
#
# where "blah" is your root password.
#
#rootpw --iscrypted XaLGAVe1C41x2
#rootpw XaLGAVe1C41x2 --iscrypted
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p#
#
# NIS setup: auth --enablenis --nisdomain sensenet
# --nisserver neptune --useshadow --enablemd5
#
# OR
auth --useshadow --enablemd5
#
# SE Linux
#
selinux --disabled
#
# Reboot after installation
#
reboot
#
#end of section
#
%packages --resolvedeps
@ Network Servers
@ System Tools
@ X Window System
@ Legacy Software Development
autofs
ntp
rsh
psacct
nfs-utils
net-snmp
rsync
yp-tools
ypbind
m4
sendmail-cf
gdb
binutils
openssh-server
%pre
#INCLUDE:../scripts/pre.rh#
%post
#INCLUDE:../scripts/post.rh#

View File

@ -0,0 +1,172 @@
#RedHat Enterprise Linux 4 AS Only
#egan@us.ibm.com
#
lang en_US
#langsupport en_US
network --bootproto dhcp
#
# Where's the source?
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
#
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
#device ethernet e100
keyboard "us"
#
# Clear the MBR
#
zerombr yes
#
# Wipe out the disk
#
clearpart --all --initlabel
#clearpart --linux
#key --skip
#
# Customize to fit your needs
#
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
#RAID 0 /scr for performance
#part / --size 1024 --ondisk sda
#part swap --size 512 --ondisk sda
#part /var --size 1024 --ondisk sdb
#part swap --size 512 --ondisk sdb
#part raid.01 --size 1 --grow --ondisk sda
#part raid.02 --size 1 --grow --ondisk sdb
#raid /scr --level 0 --device md0 raid.01 raid.02
#Full RAID 1 Sample
#part raid.01 --size 50 --ondisk sda
#part raid.02 --size 50 --ondisk sdb
#raid /boot --level 1 --device md0 raid.01 raid.02
#
#part raid.11 --size 1024 --ondisk sda
#part raid.12 --size 1024 --ondisk sdb
#raid / --level 1 --device md1 raid.11 raid.12
#
#part raid.21 --size 1024 --ondisk sda
#part raid.22 --size 1024 --ondisk sdb
#raid /var --level 1 --device md2 raid.21 raid.22
#
#part raid.31 --size 1024 --ondisk sda
#part raid.32 --size 1024 --ondisk sdb
#raid swap --level 1 --device md3 raid.31 raid.32
#
#part raid.41 --size 1 --grow --ondisk sda
#part raid.42 --size 1 --grow --ondisk sdb
#raid /scr --level 1 --device md4 raid.41 raid.42
#
# bootloader config
# --append <args>
# --useLilo
# --md5pass <crypted MD5 password for GRUB>
#
bootloader
#
# install or upgrade
#
install
#
# text mode install (default is graphical)
#
text
#
# firewall
#
firewall --disabled
#
# mouse selection
#
#mouse genericps/2 --emulthree
#mouse none
#
# Select a zone
# Add the --utc switch if your hardware clock is set to GMT
#
#timezone US/Hawaii
#timezone US/Pacific
#timezone US/Mountain
#timezone US/Central
#timezone US/Eastern
timezone --utc #TABLE:site:key=timezone:value#
#
# Don't do X
#
skipx
#
# To generate an encrypted root password use:
#
# perl -e 'print crypt("blah","Xa") . "\n";'p
# openssl passwd -apr1 -salt xxxxxxxx password
#
# where "blah" is your root password.
#
#rootpw --iscrypted XaLGAVe1C41x2
#rootpw XaLGAVe1C41x2 --iscrypted
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p#
#
# NIS setup: auth --enablenis --nisdomain sensenet
# --nisserver neptune --useshadow --enablemd5
#
# OR
auth --useshadow --enablemd5
#
# SE Linux
#
selinux --disabled
#
# Reboot after installation
#
reboot
#
#end of section
#
%packages --resolvedeps
@ Network Servers
@ System Tools
@ X Window System
@ Legacy Software Development
autofs
ntp
rsh
psacct
nfs-utils
net-snmp
rsync
yp-tools
ypbind
m4
sendmail-cf
gdb
binutils
openssh-server
%pre
#INCLUDE:../scripts/pre.rh#
%post
#INCLUDE:../scripts/post.rh#

View File

@ -0,0 +1,176 @@
#RedHat Enterprise Linux 4 AS Only
#egan@us.ibm.com
#
lang en_US
#langsupport en_US
network --bootproto dhcp
#
# Where's the source?
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
#
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
#device ethernet e100
keyboard "us"
#
# Clear the MBR
#
zerombr yes
#
# Wipe out the disk
#
clearpart --all --initlabel
#clearpart --linux
#key --skip
#
# Customize to fit your needs
#
iscsiname #TABLE:nodelist:$NODE:node#
iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#"
#No RAID
#/boot really significant for this sort of setup nowadays?
part None --fstype "PPC PReP Boot" --size 8
part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
#RAID 0 /scr for performance
#part / --size 1024 --ondisk sda
#part swap --size 512 --ondisk sda
#part /var --size 1024 --ondisk sdb
#part swap --size 512 --ondisk sdb
#part raid.01 --size 1 --grow --ondisk sda
#part raid.02 --size 1 --grow --ondisk sdb
#raid /scr --level 0 --device md0 raid.01 raid.02
#Full RAID 1 Sample
#part raid.01 --size 50 --ondisk sda
#part raid.02 --size 50 --ondisk sdb
#raid /boot --level 1 --device md0 raid.01 raid.02
#
#part raid.11 --size 1024 --ondisk sda
#part raid.12 --size 1024 --ondisk sdb
#raid / --level 1 --device md1 raid.11 raid.12
#
#part raid.21 --size 1024 --ondisk sda
#part raid.22 --size 1024 --ondisk sdb
#raid /var --level 1 --device md2 raid.21 raid.22
#
#part raid.31 --size 1024 --ondisk sda
#part raid.32 --size 1024 --ondisk sdb
#raid swap --level 1 --device md3 raid.31 raid.32
#
#part raid.41 --size 1 --grow --ondisk sda
#part raid.42 --size 1 --grow --ondisk sdb
#raid /scr --level 1 --device md4 raid.41 raid.42
#
# bootloader config
# --append <args>
# --useLilo
# --md5pass <crypted MD5 password for GRUB>
#
bootloader
#
# install or upgrade
#
install
#
# text mode install (default is graphical)
#
text
#
# firewall
#
firewall --disabled
#
# mouse selection
#
#mouse genericps/2 --emulthree
#mouse none
#
# Select a zone
# Add the --utc switch if your hardware clock is set to GMT
#
#timezone US/Hawaii
#timezone US/Pacific
#timezone US/Mountain
#timezone US/Central
#timezone US/Eastern
timezone --utc #TABLE:site:key=timezone:value#
#
# Don't do X
#
skipx
#
# To generate an encrypted root password use:
#
# perl -e 'print crypt("blah","Xa") . "\n";'p
# openssl passwd -apr1 -salt xxxxxxxx password
#
# where "blah" is your root password.
#
#rootpw --iscrypted XaLGAVe1C41x2
#rootpw XaLGAVe1C41x2 --iscrypted
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p#
#
# NIS setup: auth --enablenis --nisdomain sensenet
# --nisserver neptune --useshadow --enablemd5
#
# OR
auth --useshadow --enablemd5
#
# SE Linux
#
selinux --disabled
#
# Reboot after installation
#
reboot
#
#end of section
#
%packages --resolvedeps
@ Network Servers
@ System Tools
@ X Window System
@ Legacy Software Development
autofs
ntp
rsh
psacct
nfs-utils
net-snmp
rsync
yp-tools
ypbind
m4
sendmail-cf
gdb
binutils
openssh-server
%pre
#INCLUDE:../scripts/pre.rh#
%post
#INCLUDE:../scripts/post.rh#

View File

@ -0,0 +1,175 @@
#RedHat Enterprise Linux 4 AS Only
#egan@us.ibm.com
#
lang en_US
#langsupport en_US
network --bootproto dhcp
#
# Where's the source?
# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image
#
#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR#
url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
#device ethernet e100
keyboard "us"
#
# Clear the MBR
#
zerombr yes
#
# Wipe out the disk
#
clearpart --all --initlabel
#clearpart --linux
#key --skip
#
# Customize to fit your needs
#
iscsiname #TABLE:nodelist:$NODE:node#
iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#"
#No RAID
#/boot really significant for this sort of setup nowadays?
#part /boot --size 50 --fstype ext3
part swap --size 1024
part / --size 1 --grow --fstype ext3
#RAID 0 /scr for performance
#part / --size 1024 --ondisk sda
#part swap --size 512 --ondisk sda
#part /var --size 1024 --ondisk sdb
#part swap --size 512 --ondisk sdb
#part raid.01 --size 1 --grow --ondisk sda
#part raid.02 --size 1 --grow --ondisk sdb
#raid /scr --level 0 --device md0 raid.01 raid.02
#Full RAID 1 Sample
#part raid.01 --size 50 --ondisk sda
#part raid.02 --size 50 --ondisk sdb
#raid /boot --level 1 --device md0 raid.01 raid.02
#
#part raid.11 --size 1024 --ondisk sda
#part raid.12 --size 1024 --ondisk sdb
#raid / --level 1 --device md1 raid.11 raid.12
#
#part raid.21 --size 1024 --ondisk sda
#part raid.22 --size 1024 --ondisk sdb
#raid /var --level 1 --device md2 raid.21 raid.22
#
#part raid.31 --size 1024 --ondisk sda
#part raid.32 --size 1024 --ondisk sdb
#raid swap --level 1 --device md3 raid.31 raid.32
#
#part raid.41 --size 1 --grow --ondisk sda
#part raid.42 --size 1 --grow --ondisk sdb
#raid /scr --level 1 --device md4 raid.41 raid.42
#
# bootloader config
# --append <args>
# --useLilo
# --md5pass <crypted MD5 password for GRUB>
#
bootloader
#
# install or upgrade
#
install
#
# text mode install (default is graphical)
#
text
#
# firewall
#
firewall --disabled
#
# mouse selection
#
#mouse genericps/2 --emulthree
#mouse none
#
# Select a zone
# Add the --utc switch if your hardware clock is set to GMT
#
#timezone US/Hawaii
#timezone US/Pacific
#timezone US/Mountain
#timezone US/Central
#timezone US/Eastern
timezone --utc #TABLE:site:key=timezone:value#
#
# Don't do X
#
skipx
#
# To generate an encrypted root password use:
#
# perl -e 'print crypt("blah","Xa") . "\n";'p
# openssl passwd -apr1 -salt xxxxxxxx password
#
# where "blah" is your root password.
#
#rootpw --iscrypted XaLGAVe1C41x2
#rootpw XaLGAVe1C41x2 --iscrypted
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p#
#
# NIS setup: auth --enablenis --nisdomain sensenet
# --nisserver neptune --useshadow --enablemd5
#
# OR
auth --useshadow --enablemd5
#
# SE Linux
#
selinux --disabled
#
# Reboot after installation
#
reboot
#
#end of section
#
%packages --resolvedeps
@ Network Servers
@ System Tools
@ X Window System
@ Legacy Software Development
autofs
ntp
rsh
psacct
nfs-utils
net-snmp
rsync
yp-tools
ypbind
m4
sendmail-cf
gdb
binutils
openssh-server
%pre
#INCLUDE:../scripts/pre.rh#
%post
#INCLUDE:../scripts/post.rh#