Nasser Heidari

2009-06-09

Linux as a Solaris JumpStart Server

Filed under: Linux — Nasser Heidari @ 18:34

Copying the install media to the server
Pick a location to put the cd images, /home/jumpstart in my case. Then create it and an install and config subdirectory. The config dir is only necessary if you intend to want to do non-interactive jumpstarts.

mkdir -p /home/jumpstart/install
mkdir /home/jumpstart/config

In order to run the setup_install_server script you’ll need to create a “/bin/bar” symlink to “/bin/tar” as the scripts calls a tar-a-like to do the copying.

ln -s /bin/tar /bin/bar

For Solaris 10 you also need to create a /bin symlink for sed, adb to gdb, and a copy of the Solaris “mach” script.

ln -s /bin/sed /usr/bin/sed
ln -s /usr/bin/gdb /usr/bin/adb

echo "#!/bin/bash" > /bin/mach
echo "uname -p" >> /bin/mach
chmod +x /bin/mach

Mount Solaris CD 1 / the Solaris DVD, and use the setup_install_server script. Then run the setup_install_server script.

mount /mnt/cdrom

cd /mnt/cdrom/Solaris_10/Tools
./setup_install_server /home/jumpstart/install
cd /
umount /mnt/cdrom 

Set up the NFS server

If you’ve not already done so, install rarpd, bootparamd and tftpd. I’m assuming you’re using the kernel nfsd here.

Set up the NFS export. Put the follwing in /etc/exports, but use appropriate values for your site. The config export is optional, depending on wether you want to use non-interactive jumpstart or not.

/home/jumpstart/install		192.168.1.0/24(ro,no_root_squash,async,no_subtree_check)

/home/jumpstart/config		192.168.1.0/24(ro,no_root_squash,async,no_subtree_check)

For newer versions of the linux nfsd, nfsv4 may well be enabled by default. It’s probably easier to disable it – add ” –no-nfs-version 4″ to the nfsdparameters, however your Linux distribution chooses to do that.

Set up the server for the client

This is where it gets a little fiddly, for each install client you need an entry in /etc/hosts, /etc/ethers and /etc/bootparams and a symlink to the appropriate kernel in /tftpboot

/etc/hosts

This one is easy, you need the hostname and its IP address. Put it in /etc/hosts in the following format:

192.168.1.4 jumpstartclient

Also, ensure that your server’s hostname is *not* listed against 127.0.0.1. If it is, remove it from that line and give it its own line, so your hosts file looks like this (where jumpstartserver is your server).

127.0.0.1 localhost.localdomain localhost
192.168.1.1 jumpstartserver
192.168.1.4 jumpstartclient

/etc/ethers

This is so that rarpd can respond to the client’s request for an IP address. It does this by resolving it’s MAC address to a hostname, and uses /etc/hosts to turn that in to an IP. In /etc/ethers:

8:0:20:7a:a3:f2 jumpstartclient

/etc/bootparams

This is the config so the client knows where to access the install image and configurations. In /etc/bootparams, where jumpstartserver is my jumpstart server:

jumpstartclient root=jumpstartserver:/home/jumpstart/install/Solaris_10/Tools/Boot \
install=jumpstartserver:/home/jumpstart/install \
boottype=jumpstartserver:in \

sysid_config=jumpstartserver:/home/jumpstart/install/Solaris_10/Tools/Boot/etc \
install_config=jumpstartserver:/home/jumpstart/config \
rootopts=jumpstartserver:rsize=8192,wsize=8192

/tftpboot

This is the really fiddly bit. Either you calculate the client’s IP address in hex format, or you use tcpdump to determine what it’s requesting.

This is becase the client will request an inetboot file from the tftp server. It will be named in the format HEXIPADDR.ARCH or just HEXIPADDR (some machines do not request the .ARCH part of the filename). In my case, it is C0A80104.SUN4U. So if, like me you don’t fancy calculating this name, start the bootparamd and the rarpd (you may need to start the rarpd with -e as some versions will not respond to rarp queries if there is not a corresponding image in /tftpboot to serve.

 perl -e 'printf "%02x"x4 ."\n",192,168,1,4;'|tr a-z A-Z 

will give you the hex address (where the IP is 192.168.1.4).

Similarly, you can do it in shell like this:

printf %02x 192 168 1 4|tr [:lower:] [:upper:] 

Once your services are started, get tcpdump on the go (this is best done on a quiet or switched network, and boot net – install your client. tcpdump should produce a line like this:

08:59:24.640821 jumpstartclient.40337 > jumpstartserver.beau.net.tftp: 23 RRQ “C0A80104.SUN4U”

Alternativley, running bootparamd with -d and -s flags should write the filename being requested to the syslog

Once you have this filename, you can copy the appropriate inetboot image from your /home/jumpstart/install hierachy. The example below is appropriate for a sun4m architecture machine, modify it for other systems

cp /home/jumpstart/install/Solaris_10/Tools/Boot/usr/platform/sun4m/lib/fs/nfs/inetboot /tftpboot/inetboot.sun4u

cd /tftpboot
ln -s inetboot.sun4u C0A80104.SUN4U
ln -s inetboot.sun4u C0A80104  

Jumpstart the client

Stop-A the client and get it to the openboot prompt. From there type either:

boot net - install 

Thanks to :

http://alex.charrett.com/technical/linux-jumpstart.html
http://www.docbert.org/Solaris/Jumpstart/linux.html
http://www.mernin.com/blog/?p=57

Advertisements

7 Comments »

  1. I’m using CentOS 5.3 as a jumpstart server for a Solaris 10 Sparc system. The tftpboot file sems to be read, but them it seems to be having trouble with the nfs mount. Do you think this is an NFSv4 issue?

    Comment by alice — 2009-06-29 @ 22:57

  2. Thanks very much. I have been looking for something like this for a very long time. However I have an error as soon as I start the ./setup_install_server command. I see: “-bash: ./setup_install_server: /bin/sh: bad interpreter: Permission denied” I am using CentOS release 5.4 (Final).

    Thank you

    Comment by Phil Savoie — 2009-12-12 @ 15:03

  3. I’ve got jumpstart working on Solaris:

    Click on my website.

    Comment by Greg — 2010-02-26 @ 09:46

  4. If you get this error (on T2000):

    Boot device: /pci@780/pci@0/pci@1/network@0 File and args: – text
    1000 Mbps full duplex Link up
    Requesting Internet Address for 0:21:28:4f:47:70
    Requesting Internet Address for 0:21:28:4f:47:70
    1000 Mbps full duplex Link up
    boot failed
    Enter filename [boot_archive]:

    Add vers=3 to the last line in /etc/bootparams, ie:

    rootopts=jumpstartserver:rsize=8192,wsize=8192,vers=3

    Comment by Ben Menking — 2010-04-26 @ 21:17

  5. Thanks .

    Comment by Nasser Heidari — 2010-04-26 @ 21:31

  6. I also need to note that I was required to disable NFSv4 on nfs.

    Check /etc/sysconfig/nfs and uncomment

    RPCNFSDARGS=”-N 4″

    —————-

    Other interesting things:

    It looks like the IP address you give to the client via RARP uses the default netmask for that IP, ie, 192.168.1.1 defaults to 255.255.255.0 (/24), 172.26.x.x to 255.255.0.0 (/16) and 10.x.x.x to 255.0.0.0 (/8).

    I was getting a “/sbin/install-discovery: information: not found” error and could manually run the script, but it wasn’t automatic until I set my rarpd/nfs/tftpd server to the same netmask (we cut our networks into smaller subnets since it’s a lab environment)

    Comment by Ben Menking — 2010-04-26 @ 23:08


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: