Mounting NFS during Kickstart as RW

Jeff Yana jeff.yana at rttusa.com
Mon Jan 22 20:18:52 UTC 2007


Thanks everyone for the responses thus far....but please, can we get back to the original topic: "Mounting NFS during Kickstart as RW" under Fedora Core 6? Note that I DO NOT alone want to send standard out/error to /root on the local system (FWIW, I would like to do both). If that were the case, I would not have made the post in the first place. 

Has anyone on this list ever gotten this to work?

-----Original Message-----
From: Caetano, Greg [mailto:Greg.Caetano at hp.com] 
Sent: Monday, January 22, 2007 11:17 AM
To: Discussion list about Kickstart
Subject: RE: Mounting NFS during Kickstart as RW

The process I used is based on the information from the RHN kickstart.
In the post section all stdout and stderr are redirected to a log file
that can be found in the /root directory after the system reboots

Fyi...

------------------------------------------
%post
( # Capturing post installation messages

echo >> /etc/motd
echo "RHN kickstart on $(date +'%Y-%m-%d') " >> /etc/motd
echo >> /etc/motd

#

rpm --import /usr/share/rhn/RPM-GPG-KEY


) > /root/ks-post.log 2>&1 
-------------------------------------------------

Regards
Greg

Greg Caetano
HP TSG Linux Solutions Alliances Engineering
Chicago, IL
greg.caetano at hp.com 

-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of John Summerfield
Sent: Monday, January 22, 2007 7:03 AM
To: Discussion list about Kickstart
Subject: Re: Mounting NFS during Kickstart as RW

gurudatta wrote:
> Hi all,
> 
> I am  new to the kickstart and configured the kickstart server and
> kickstart is working. i wanted to updated the new rpms in post
> instlation. but the rpms are not getting updated . iam attaching the
my
>  ks.cfg file pls help me ..
> 
> # ks.cfg - kickstart configuration file for Fedora Core 3

If you really want to run software this old, might I suggest CentOS4? 
RHEL4 is based on FC3, and CentOS4 is basically rebuilt RHEL4, and gets 
updated from time to time.

OTOH, if you can use something more recent, then your problem becomes 
different and is more-easily solved.


> #
> # When you boot a machine from this floppy it will automaticall
> # install AND CONFIGURE Fedora Core 3 from ftp://santiam.vassar.edu
> # (as named by IP below in two places).   Edit as you require.
> #
> # Eric Myers <myers at vassar.edu> - Vassar College 
> # $Id: ks.cfg,v 3.4 2004/05/06 20:44:09 myers Exp myers $
> ######################################################################
> # @(#) Last changed: -EAM 03Apr2005
> 
> 
> # Install or Upgrade?  
> install
> text
> # Interactive will ask to verify; good for debugging, but omit
otherwise
> #interactive
> 
> 
> ### Language/Localization Specifications:
> 
> lang en_US
> langsupport en_US
> keyboard us
> mouse generic3ps/2 --device psaux
> timezone Asia/Calcutta  

I thought that got renamed a while back; I'm sure we don't play cricket 
in Calcutta any more?

> 
> 
> ### Network Configuration using DHCP
> network --bootproto dhcp --nodns --hostname kick-me  
> 
> ### Installation Method: this can be either nfs, cdrom, url, or
> harddrive
> 
> nfs --server=test.svind.sonoasystems.com --dir=/images/FC364

I used to use nfs, but for various reasons these days I prefer http.

> ### Authorization/Authentication
> 
> authconfig --enableshadow --enablemd5 
> # (since this is publicly known you must CHANGE THE ROOT PASSWORD
soon!)
> rootpw redhat
> firewall --disabled
> selinux --disabled
> ### Simplest X configuration
> xconfig --depth=32 --resolution=1182x864 --defaultdesktop=GNOME 
> 
> 
> ## Partitioning Information
> ## Which partitions to format/clear  (--linux/--all).  Default is only
> Linux!
> ## (Use wipe.cfg to get --all )
> 
> clearpart  --linux
> 
> ## Which partitions to set up on new system, as well as sizes 
> ## (This partitioning should fit in a 10GB hardrive with a little
extra)
> 
> part / --fstype ext3 --size 15000 
> part /boot --fstype ext3 --size 100 
> part swap --size 2048 
> part /localdisk --fstype ext3 --size 25000 
> part /usr --fstype ext3 --size 25000 
> 
> 
> ### Whether to clear out the Master Boot Record (yes/no)
> 
> zerombr yes
> 
> ### LILO or GRUB boot loader?  GRUB seems to be the default
> 
> bootloader --location=mbr
> 
> 
> ######################################################################
> # Packages:
> #
> ## The package names, as well as the groups they are a part of can be
> ## found in the /Fedora/base/comps file; individual packages can be
> ## specified by entering their names one per line; groups can be
> ## specified by appending a "@"  in front of the group name;
> ## e.g. '@ X Window System'
> 
> %packages
> @ everything
> %post
> # Mount nfs directory to copy configuration files
> #/etc/init.d/portmap start
> #/bin/mount 10.10.2.8:/images/FC364/sonoa/ksdir /mnt
> 
> # Copy the nis config files
> 
> #cp /sonoa/ksdir/inittab /etc/inittab
> #cp /sonoa/ksdir/nsswitch.conf /etc/nsswitch.conf
> #cp /sonoa/ksdir/yp.conf /etc/yp.conf
> 
> 
> # Unmount the mounterd nfs filesystem
> 
> #umount /mnt
> 
> 
>
#-----------------------------------------------------------------------
---
> # Mount the kickstart NFS directory
>
#-----------------------------------------------------------------------
---
> 
> # Start the portmapper; otherwise, the NFS mount will take ~5 minutes
> /etc/init.d/portmap start
> /bin/mount  10.10.2.8:/images/FC364/rpms /mnt
At this point, insert the line:
/bin/bash --login

It will halt the process and let you look around pretty much as if you 
were in single-user mode.

> 
>
#-----------------------------------------------------------------------
---
> # Install additional rpms (not part of the standard distro)
>
#-----------------------------------------------------------------------
---
> 
> echo "INSTALLING ADDITIONAL BASE OS RPMS..."

This is where it gets much easier in Fedora Core 5 & 6.

In 5, you just need to configure your updates repo, then
yum update
In 6, Anaconda's using yum to install stuff. so you just meed to 
configure the updates repo in your install tree and anand's your uncle.



> /bin/rpm -Uvh \
> /mnt/binutils-2.15.92.0.2-5.1.x86_64.rpm    

Each of these lines needs to be backslashed too.

I'd do something like this:
(cat <<Z

> /mnt/libf2c-3.4.4-2.fc3.x86_64.rpm
> /mnt/cpp-3.4.4-2.fc3.x86_64.rpm
> /mnt/krb5-libs-1.3.6-7.x86_64.rpm               
> /mnt/libgcc-3.4.4-2.fc3.x86_64.rpm
> /mnt/e2fsprogs-1.38-0.FC3.1.x86_64.rpm
> /mnt/libgcj-3.4.4-2.fc3.x86_64.rpm
> /mnt/e2fsprogs-devel-1.38-0.FC3.1.x86_64.rpm  
> /mnt/libgcj-devel-3.4.4-2.fc3.x86_64.rpm
> /mnt/gcc-3.4.4-2.fc3.x86_64.rpm               
> /mnt/libobjc-3.4.4-2.fc3.x86_64.rpm
> /mnt/gcc-c++-3.4.4-2.fc3.x86_64.rpm
> /mnt/libpng-1.2.8-1.fc3.x86_64.rpm
> /mnt/gcc-g77-3.4.4-2.fc3.x86_64.rpm
> /mnt/libstdc++-3.4.4-2.fc3.x86_64.rpm
> /mnt/gcc-java-3.4.4-2.fc3.x86_64.rpm 
> /mnt/libstdc++-devel-3.4.4-2.fc3.x86_64.rpm
> /mnt/gcc-objc-3.4.4-2.fc3.x86_64.rpm
> /mnt/nptl-devel-2.3.6-0.fc3.1.x86_64.rpm
> /mnt/glibc-2.3.6-0.fc3.1.i386.rpm
> /mnt/openssl-0.9.7a-42.2.x86_64.rpm
> /mnt/glibc-2.3.6-0.fc3.1.x86_64.rpm           
> /mnt/openssl-devel-0.9.7a-42.2.x86_64.rpm
> /mnt/glibc-common-2.3.6-0.fc3.1.x86_64.rpm    
> /mnt/pam-0.77-66.2.13.x86_64.rpm
> /mnt/glibc-devel-2.3.6-0.fc3.1.i386.rpm       
> /mnt/pam-devel-0.77-66.2.13.x86_64.rpm
> /mnt/glibc-devel-2.3.6-0.fc3.1.x86_64.rpm     
> /mnt/pcre-4.5-3.1.1.fc3.x86_64.rpm
> /mnt/glibc-headers-2.3.6-0.fc3.1.x86_64.rpm   
> /mnt/pcre-devel-4.5-3.1.1.fc3.x86_64.rpm
> /mnt/glibc-utils-2.3.6-0.fc3.1.x86_64.rpm     
> /mnt/zlib-1.2.1.2-3.fc3.x86_64.rpm
> /mnt/krb5-devel-1.3.6-7.x86_64.rpm            
> /mnt/zlib-devel-1.2.1.2-3.fc3.x86_64.rpm
Z
) | xargs rpm -Uvh


May you meet us in the final at the World Cup.

-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu

Please do not reply off-list

_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list









More information about the Kickstart-list mailing list