Generic Kickstart

Want to perform a network install of a node that won't be a ROCKS client but using the ROCKS frontend as the kickstart server.

Have tried and failed to get this to work using the ROCKS rpm distribution. It works fine using a generic SL rpm distribution. It seems that ROCKS modifications to the installer are not compatible with using a non-ROCKS kickstart file?

The frontend will provide these services for the install:

  • DHCP
  • TFTP of kernel and initrd (PXE boot)
  • http access to distro below install/rolls
  • http serving of kickstart file
  • reset of PXE boot to default "os"

Get Distro

Will download a generic SL distro and place it below /home/install/rolls/SL, this is a convenient place as the ROCKS apache config allows access to it. Also made a directory /home/install/rolls/SL/ks for kickstart files.

Copy the install kernel and initrd images from this distro to /tftpboot/pxelinux, giving them unique names.

Setup host for DHCP and DNS

Add a new appliance type to the ROCKS db that doesn't have the "compute" property.

# rocks add appliance kickstart compute=0 membership=kickstart

# rocks list appliance
APPLIANCE       SHORTNAME  GRAPH   NODE                  
kickstart:      NULL       default ----------------------

 # rocks list membership
MEMBERSHIP                      APPLIANCE     
kickstart:                      kickstart     

Now add a host (should be able to use insert-ethers here if desired):

# rocks add host test-0 cpus=2 membership=kickstart rack=100 rank=2

# rocks list host test-0
kickstart  2    100  2    -------

Add some network config for the node:

# rocks add host interface test-0 eth0
# rocks set host interface ip test-0 eth0 
# rocks set host interface mac test-0 eth0 00:0c:29:51:5d:47  
# rocks set host interface name test-0 eth0 test-0
# rocks set host interface subnet test-0 eth0 private

Do "rocks sync config", the node should now be in DNS. The node won't be included in list of nodes for "cluster-fork" since the appliance does not have the compute property set.

Add PXE stuff. A new "kickslx4" action is added, since we don't specify a hostname, this action will be "global" and available to any host. Then the node is setup to use it. (Note that the node had no PXE action configured, ROCKS didn't do it after the above actions were done.)

 # rocks list host pxeboot test-0

# rocks add host pxeaction action="kicksl4x" command="kernel vmlinuz.sl4x" args="append initrd=initrd.img.sl4x"

# rocks set host pxeboot test-0 action=kicksl4x

# rocks list host pxeboot test-0

# cat /tftpboot/pxelinux/pxelinux.cfg/0A0A022A
default rocks
prompt 0
label rocks
        kernel vmlinuz.sl4x
        append initrd=initrd.img.sl4x

Error Trying ROCKS Dist

Hum... Get installer going, enter info for partitioning etc. When installer tries to get RPM info, get error "Unable to read header list. This may be due to a missing file or bad media. Press to try again." Oddly, don't see any http access at this point. Maybe this is something that has been altered in the ROCKS version of the installer?

Doing a Kickstart SL Install

Have a kickstart file in /home/install/rolls/SL/ks, will setup a PXE boot that supplies the kickstart file to client node for an automated install.

# rocks add host pxeaction test-0 action="kicksl4x-test-0" command="kernel vmlinuz.sl4x" args="append initrd=initrd.img.sl4x ks= ksdevice=eth0"

# rocks list host pxeaction test-0
ACTION           COMMAND             ARGS                                                                                                     
kicksl4x-test-0  kernel vmlinuz.sl4x append initrd=initrd.img.sl4x ks= ksdevice=eth0           

Use ROCKS to Change PXE Action in Kickstart

At the end of a normal ROCKS client install, the client makes a request to a cgi app causing the frontend to change the PXE action of the client. The PXE action is set to "os" so that the client will boot the local os instead of just re-running the installer on next boot. We can use this manually.

# ask frontend to set us to boot OS (default behavior of this cgi script)
wget --no-check-certificate

Not sure if wget is installed by default, might need to have the @ text-internet group in packages. Also in the main kickstart commands, you can add reboot, so the machine automatically comes up when rebooted.

YUM for local repo

Want the machine to refer to the local mirror of SL for yum updates.

On sl4x have these repos:

[root@test-0 ~]# grep enab /etc/yum.repos.d/*

Want to disable sl-errata.repo and sl.repo and add replacements pointing to local source.

[root@test-0 ~]# perl -pi -e 's/enabled=1/enabled=0/' /etc/yum.repos.d/sl-errata.repo 
[root@test-0 ~]# perl -pi -e 's/enabled=1/enabled=0/' /etc/yum.repos.d/sl.repo 

[root@test-0 ~]# wget -O /etc/yum.repos.d/local-sl-errata.repo
[root@test-0 ~]# wget -O /etc/yum.repos.d/local-sl.repo

name=Local SL 4 base
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-csieh file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson file:///etc/pki/rpm-gpg/RPM-GPG-KEY-jpolok file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern

[root@test-0 ~]# cat /etc/yum.repos.d/local-sl-errata.repo
name=Local SL 4 errata
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-csieh file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson file:///etc/pki/rpm-gpg/RPM-GPG-KEY-jpolok file:///etc/pki/rpm-gpg/RPM-GPG-KEY-cern

-- TomRockwell - 24 Mar 2009
Topic revision: r3 - 25 Mar 2009, TomRockwell
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback