kickstart install using NFS

Robert G. Brown rgb at phy.duke.edu
Wed Oct 9 19:18:34 EDT 2002


On Wed, 9 Oct 2002, Henderson, TL Todd wrote:

> I'm preparing to install a large number of new nodes using redhat and have
> planned on using the kickstart option.  I have gotten a kickstart file setup
> just the way I want it with one exception and I can not get it to work.  I
> ultimately want to boot from a floppy and in the kickstart file tell it to
> get the rpm's from a nfs mount.

We do this with something like:

  a) Set up dhcp with a dhcpd.conf that contains for e.g. your trial
node with global options for e.g. nameservice and so forth:

###########################################################
# Global Parameters
###########################################################

option domain-name-servers 192.168.1.250 (or whatever)

host b00 {
        hardware ethernet 00:01:03:BD:7C:9F;
        fixed-address 192.168.1.100;
        next-server my.install.host.edu;
        filename "/export/install/linux/rh-7.2/ks/beowulf";
}

where my.install.host.edu might resolve to 192.168.1.1 or whatever, and
where it exports a file/path mountable by the host to be installed to
your kickstart file (does not have to be as long as this one:-).

  b) Boot from the bootnet.img floppy and enter "ks" when it asks what
you want to boot.

That should be all there is to it.  The bootnet floppy will boot, load
the NIC driver, try to initialize it via dhcp, and get back a path to
the kickstart file.  It will mount the directory and proceed to run the
kickstart file pointed to by the path.  Ours looks something like:

install
text
lang en_US
langsupport en_US 
keyboard us
mouse none
network --bootproto dhcp 
rootpw --iscrypted $1$s7KGc54$gUiQVqQte6i35St0v.5XI/
url --url http://install.dulug.duke.edu/pub/linux/dulug-7.2/i386
timezone US/Eastern
skipx
auth --useshadow --enablemd5
bootloader --location=mbr
zerombr yes
clearpart --all
firewall --disabled
part / --size 3000 --fstype ext3
part swap --recommended
part /disk1 --size 2000 --fstype ext3
part /xtmp --size 1000 --grow --fstype ext3
reboot

%packages
@ Dulug Beowulf
amanda
amanda-client
aspell
htmlview
ImageMagick
joe
jove
mgetty
openssh-server
...

which uses a url instead of an NFS mount for the rpm path to do the
actual install.  This ends up being better for a variety of reasons.
http gets (or ftp) tend to be faster than NFS which is really quite
slow.  They require no special permissions.  A single site can (as here)
facilitate installation for an entire organization across domains that
would never permit port 2048 through their router/firewalls.

At Duke install.dulug.duke.edu is Duke access only and thus can contain
the relatively few site licensed packages we support and any local
custom stuff.  We also are a primary RH mirror that "anyone" can install
from if they don't mind sharing broadband and server bandwidth.
Obviously it is best to set up a mirror of your own, update it fairly
regularly to get the latest updates, and use it to both install and
update FROM for your own clients.

It is also pretty easy to make a floppy that boots straight into ks
instead of the interactive session when it times out.  It is also pretty
easy (although we're getting to not so easy:-) to set up a pxe server so
that booting a system with a PXE enabled NIC will just install, floppy
or not.  Well, that's really not so easy, I guess, but still worth
figuring out once you get the dhcp/ks sequence running.

Hopefully I didn't leave anything key out, although I'm leaving lots of
stuff out that is our dhcpd.conf as you'll need to set all this up
differently anyway.  dhcp facilitates LOTS of boot time information and
services and is an excellent way to enforce an identity map between MAC
address and IP number.  It also makes reinstalling a host a trivial
matter -- we can run a script that directs grub to basically boot to
kickstart on the next reboot, reboot, have the system reinstall itself
and reboot into normal operation, even from far far away.  A lot of
times, it even works, although there are always a few odd systems with
bios set so you have to go hit a @!$% key or the like to continue the
boot or some other silly problem that interrupts it;-).

This is nice since after the FIRST install (which might as well use a
floppy, why not) you never again have to use a floppy to do a reinstall
for an upgrade or just to clean up some file corruption.  I used to do
reinstalls of nodes just to show how easy it was for visitors, and
completely upgraded an entire small cluster to 7.3 from my desk 100
meters away two days ago without getting up from my chair, in less than
an hour total elapsed time (I ran a bunch in parallel, so they had to
share server bandwidth and took 10-20 minutes to complete in batches).

HTH

   rgb

> 
> So far I have:
> 
> 1.)  Booted from a cd and issued the command:
> linux ks=floppy
> This is how I built and debugged my ks file.  This gives me what I want,
> except I get to swap CD's during the install.  No nfs option at this point.
> 
> 2.)  I added the line
> nfs --server=my.local.server.com --dir=/redhat
> and tried the 'linux ks=floppy' again booting from the CD.  It continues to
> get the rpms from the CD.
> 
> 3.)  I built a floppy from mkbootdisk, with the ks.cfg file and at the boot:
> prompt typed linux ks=floppy.  This time it went directly to the resuce boot
> from the HD.
> 
> 4.)  I then got a recommendation from someone to modify the syslinux.cfg
> file on the floppy.  I tried that and got errors like the following:
> 
> mount: error 22 mounting ext2
> pviotroot: .{stuff deleted} failed: 2
> ...
> Kernel panic: No init found.  Try passing init= ...
> 
> 5.)  I've built the system with the CD and my kickstart and made sure I
> could mount my nfs box and directory once everything was up and I could.
> I've given just about everyone premission to the directory and the export.
> 
> I've looked through all the kickstart how-to's, the redhat references and
> can't find anything wrong.
> 
> Here is the relevant part of the ks file:
> 
> install
> lang en_US
> langsupport --default en_US.iso885915 en_US.iso885915
> keyboard us
> mouse generic3ps/2 --device psaux
> skipx
> rootpw --iscrypted blahblahblah
> firewall --disabled
> authconfig --enableshadow --enablemd5
> timezone America/Chicago
> network --bootproto dhcp
> nfs --server=myserver.name.com --dir=/redhat/RedHat
> bootloader --location=mbr
> clearpart --all
> zerombr yes
> part / --fstype ext3 --size 5120
> part /home --fstype ext3 --size 1024
> part swap --size 1024
> part /scratch --fstype ext3 --size 1024 --grow
> 
> The directory tree on the remote machine is:
> 
> /redhat
> '-- RedHat
>     |-- RPMS
>     '-- base
> 
> Are the ks commands echo'd to a file so I can see what is happening, or if
> there are any errors?  I've looked at the anaconda-ks.cfg file and it is a
> very close replica of my ks.cfg file, with the glaring exception of the nfs
> command, and some post install stuff.
> 
> Thanks in advance for any and all help or suggestions.
> Todd
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> 

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu



_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list