[CentOS] %include command in Kickstart

Fri Feb 16 00:29:58 UTC 2007
Bill-Schoolcraft <bill at wiliweld.com>

At Fri, 16 Feb 2007 it looks like John Summerfield composed:

> Pierre Bourgin wrote:
> > Al Sparks a écrit :
> > > > Al Sparks  :
> > > > > I have a kickstart file that basically runs the following:
> > > > >
> > > > > install nfs --server=nfserver.blah.local
> > > > > --dir=/vol/updts/staging/CentOS_4.3 #include %some_file.cfg
> > > > >
> > > > > I want to be able to access or "include" a file on the nfs share not
> > > > > the local CDROM I've got this on.  How do I do that?
> > 
> > <snip #include syntax typo>
> > 
> > > Also, my network configuration includes a local DNS, so I've been able to
> > > reach the NFS server by name.
> > 
> > ? strange: I've already test it (mainly under centos3) and an IP address was
> > required for the NFS server; but I was booting via network (PXE), not from
> > cdrom.
> > 
> > > But it occurs to me that I need to place
> > > that information on the ks.cfg file on the cdrom portion, not the
> > > "some_file.cfg" located on the nfs share.
> > 
> > your configuration is unusual: you use the cdrom to boot, right ?
> > then you use an NFS server for the media location instead of the cdrom,
> > right ?
> > So why in this case use the cdrom as storage for your include ks file ? it
> > will be really easier to use an NFS resource to store this additional file.
> > 
> > Anyway, in this configuration, I guess the cdrom won't be mounted
> > automatically, you have to do it in the main .ks file like this:
> > 
> > -----------------
> > install nfs --server=1.2.3.4 --dir=/vol/updts/staging/CentOS_4.3
> > %include /media/cdrom/anotherfile.ks
> > 
> > # the "pre"/"post" directives must be at the end of the .ks file
> > %pre
> >   mount /media/cdrom
> > ------------------
> > 
> > I'm not shure this will work: does the install system has an entry in its
> > /etc/fstab for "/media/cdrom" ?
> > 
> > It it's not the case, you will have to mount the cdrom "by hand", that means
> > its device is subject to change depending on the hardware configuration of
> > your machine: is it "hda", "hdb", "hdc" ... ?
> > You should try within the shell of console #2.
> > The "pre" section should then look like:
> > 
> > -----
> > %pre
> >   mount /dev/hda2 /media/cdrom
> > -----
> > 
> > > > install nfs --server=1.2.3.4 --dir=/vol/updts/staging/CentOS_4.3
> > > > %include /path/to/file
> > > >
> > > > Once the installation system is running, the mount point for the used
> > > > NFS share by directive "install" is /mnt/source .
> > >
> > > The really great info you gave me is the mount point the nfs command uses.
> > 
> > in fact, /mnt/source is the mount point of the source media (NFS, cdrom,
> > whatever).
> > Once booted, goto onto console #2 with Ctl-Alt-F2 and use "mount" to see it.
> 
> One of the images (in Nahant) is to boot off the CD and install from the
> network.
> 

Yes, I use that single image and did raw "dd" to a USB pendrive and use
that to get me the installation screen and enough to type:

	linux text askmethod

On these 1-u servers though, I have to toggle "USB-ZIP" for it does not
see the USB-Pendrive as a USB-CDROM... Sometimes even that does not work
and I have to resort back to a USB-CDROM and drag that over.

Then I take off and do NFS test installs (5-min) prior to the more
lengthy kickstart with all the post-install packages.

An admin at my work flipped the console redirective to /dev/ttyS0 and I
can't see much anymore during kickstarts from the monitor I have hooked
up.

I thought there would be a way to redirect (tee) the output to both
physical monitor and /dev/ttyS0 but have not opted to start playing with
the kickstart system seeing we use it too much daily to afford me time
to experiment.

-- 
Bill Schoolcraft <*> http://wiliweld.com
                  ~
"Unix is very simple, but it takes a
genius to understand the simplicity."
         (Dennis Ritchie)