Implementing UberJS


Home
UberJS Standard
UberJS Server
Links


This document simply tells what changes to make in order to change a Solaris9 install image into an UberJS disk. Might also want to see the ClueStart Documentation after reading this.


After using the process detailed in Solaris9BootableCD to extract and mount the slices of a Sun Solaris 9 boot CD, modify the following scripts and create the directories/files specified below. If you used mkuber, this is not necessary.

Some differences may occur with versions other than Solaris 9 - 08/03. The Solaris 8 02/04 scripts look very much like the Solaris 9 08/03 ones and the Solaris 9 12/03 scripts are only slightly different. Lines may occur at slightly different positions. YMMV. I highly recommend using mkuber to do this automagicly.

 

SCRIPT LOCATION DESCRIPTION
rcS {/mnt}/sbin configures network, etc. init script
sysidfind {/mnt}/sbin looks for the sysidcfg file
 

 

rcS

 

Change the following section around line 667:

if [ $USING_DHCP -eq 1 ] ; then
        echo "Using DHCP for network configuration information."
        dhcp_find_and_mount_cdrom
else
        echo "Using RPC Bootparams for network configuration information."
        bootparams_find_and_mount_cdrom
fi

 

to be

 

if [ -f /tmp/uberjs/uberjs-exec ]; then
        echo "Executing UberJS script: /tmp/uberjs/uberjs-exec"
        /sbin/sh /tmp/uberjs/uberjs-exec
else
        if [ $USING_DHCP -eq 1 ] ; then
                echo "Using DHCP for network configuration information."
                dhcp_find_and_mount_cdrom
        else
                echo "Using RPC Bootparams for network configuration information."
                bootparams_find_and_mount_cdrom
        fi
fi

 

Optionally change the following section:

#
# Start the twirling dial
#
if [ -x /sbin/dial ]; then
        dial &
        dial_pid=$!
fi

 

to be:

 

#
# Start the twirling dial
#
if [ -x /sbin/dial ]; then
        # note uses /.tmp_proto instead of /tmp since /tmp isnt created until a few lines from here
        if [ -f /.tmp_proto/uberjs/disable_dial ]; then
                echo "Dial disabled"
        else
                dial &
                dial_pid=$!
        fi
fi

 

 

sysidfind

Sysidfind is responsible for extracting the sysidcfg file off network/etc if needed and put it in /etc. There already is a symlink in /etc to ../tmp/root/etc/sysidcfg, so just put your sysidcfg file there.

At line 342, change the following:

 

            floppy_sysid_config
            if [ $? -ne 0 ]; then
                    # Look for sysidcfg via DHCP only if the network is using DHCP
                    if [ "X${_INIT_NET_STRATEGY}" = "Xdhcp" ]; then
                            dhcp_sysid_config
                    else
                            bootparams_sysid_config
                    fi
            fi

 

to be

 

            if [ -f /etc/sysidcfg ]; then
                echo "Using sysidcfg already in /etc (or possibly a link from /tmp/uberjs)"
                return 0
            else
                floppy_sysid_config
                if [ $? -ne 0 ]; then
                            # Look for sysidcfg via DHCP only if the network is using DHCP
                            if [ "X${_INIT_NET_STRATEGY}" = "Xdhcp" ]; then
                                    dhcp_sysid_config
                            else
                                    bootparams_sysid_config
                            fi
                    fi
            fi

 

NOTE: (see below) - Make sure your sysidcfg file has its nfs location specified in bootparams

P.S. Don't know why sun doesnt check /etc/sysidcfg in sysidfind, even though they have that symlink already there? This script is run with the assumption by JumpStart/SUN that you must find and download a sysidcfg file, so returning with 0 we pretend we got it from somewhere and put it where expected even though it was really there all along.

 


 

uberjs-exec

Place the file /.tmp_proto/uberjs/uberjs-exec, doesnt need to be executable. This is also done by mkuber.

Please read through the comments in the file before creating the configuration files. It will help you gain a fuller understanding of what is occuring

 


 

Files/Directories to create

The above modifications extend the support of the standard Jumpstart mechanisms. I've created a directory (/.tmp_proto/uberjs) that the above scripts look for files in. The directory does not have to exist, if it doesn't the cd behaves like an ordinary Solaris_9 bootdisk. If you create it, and create the uberjs-exec file in that directory, the above code becomes active. With no other files in place, the scripts will prompt you for the required information.

Optionally, you may create the following files:

/.tmp_proto/uberjs:
        uberjs-exec     - the script that checks for and uses everything below here.

        netmask         - contains a netmask in the dotted format that will be used for all interfaces

        nfs_servers     - contains a (tab separated field, cr separated record) list of servers to select from if none used from bootparams
                          no commented lines, no blank lines.  (Installfs [tab] Profilefs)

                          example:
                          foobar.my.domain:/export/solaris9/jumpstart foobar.my.domain:/export/jumpstart foobar.my.domain:/export/jumpstart/sysidcfg
                          foobaz.your.domain:/export/solaris/solaris9              foobaz.your.domain:/export/solaris/jumpstart foobaz.your.domain:/export/solaris/jumpstart/sysidcfg

        wget_servers    - contains a list of servers from which files will be attempted to wget some additional configuration (usually nfs_servers and server_subnets)
                          example:
                          ftp://foobar.your.domain/uberjs
                          ftp://foobat.my.domain/uberjs

        disable_dial    - turns off that darned twirly thing. requires an additional tweak to rcS

        bootparams      - standard format bootparams file, needs hostname/ip, install=, install_config= and sysid_config= arguments at a minimum

        ipethers        - contains a whitespace separated, one entry per line, list of mac addresses and associated ip addresses.
                          ex. 
                          8:0:20:c0:ff:ee       192.168.0.123
                          8:0:20:ab:cd:00       192.168.0.012
                          8:0:20:cd:ef:ab       DHCP

NOTE: The mac addresses are in the same format reported by ifconfig, with no leading 0's. This is for an easy comparison against the ifconfig the script runs.

	nodhcp		- forces skipping of dhcp for interfaces not specified as DHCP in ipethers, saves waiting 60 seconds when no dhcp server is available.
			  Essentially skips the installer right to a manual entry prompt if the machine is not in ipethers.
 
	noautoroute	- forces skipping of automatic route detection after manually configuring the interface. The installer will be prompted for a default
			  gateway every time.
 
	useonly-{interface}	- allows you to specify primary interface only, or a specific interface name such as hme0. Acceptable options are any valid
				  interface name or 'primary'. Examples: /tmp/uberjs/useonly-primary, /tmp/uberjs/useonly-fcip0, /tmp/uberjs/useonly-le0, 
				  or /tmp/uberjs/useonly-hme0. You may create more than one useonly to essentially supply a list of valid interfaces that may 
				  be used. It is also ok to have a useonly-primary as well as useonly-hme0 for example.
 
	ignore-{interface}	- allows you to specify one or several interfaces to never use, such as /tmp/uberjs/ignore-fcip0 to always ignore the fibre
				  interface. Note: ignores take precedence over useonly's, ie useonly-primary when the primary interface is fcip0 used with
				  ignore-fcip0 will result in that interface being skipped.
If all of those files exist and the IP/Mac are in ipethers, you can have a totally unattended install.

 

 


 

Other files to keep in mind

/.tmp_proto/root/etc:
        nsswitch.conf   - might want to make sure the hosts: line has files dns so that nslookup works. mkuber will prompt you if you want to copy this over.

        resolv.conf     - might want to have your standard resolv.conf so that nslookup works. mkuber will prompt you if you want to copy this over.

        defaultrouter   - created automatically by uberjs-exec. I felt it was a good idea to mention this.


On your JumpStart server:
        Make sure to have all of your standard jumpstart configuration files, profiles, rules/rules.ok, sysidcfg, etc.

        IMPORTANT NOTE REGARDING SYSIDCFG FILES: 
        If you wish to avoid creating multiple sysidcfg files for multiple subnets, 
        simply leave out the network_interface line and UberJS will add the line for you 
        (presuming not to use ipv6 on the build machine)

        Also, to have completely unattended install, only the following types of lines are required in sysidcfg:
           system_locale=en_US
           timezone=US/Central
           timeserver=123.123.123.123
           terminal=sun-cmd
           security_policy=NONE
           root_password="cryptedpass"

	name_service= and network_interface= lines are NOT required with UberJS. (proper resolv.conf required for name_service line to be filled in automatically)

Note: .tmp_proto is copied to the /tmp ramdisk on bootup of the cdrom. symlinks in /etc are made to ../tmp/root/etc/whatever

Home UberJS Standard UberJS Server Links

 For problems or questions regarding this Web site contact uberjs@iastate.edu.
Last updated: 11/01/03.