20050316 Wednesday March 16, 2005

Automated Flash Installs in Jumpstart

Creating a flash archive environment for multi-domain SunFire systems.


This discussion presents a method to configure a unattended jumpstart environment for sunfire 12k, 15k and 25k platform. This design would allow a series of know domain configurations to be used to create (or re-create) environments from the jumpstart server located on the system controller. There are only a coupe of caveats: 1) the hostname will be the “internal” hostname, requiring some configuration steps if you want to change this; and 2) the primary network is the 100Mbps internal network and may be reconfigured as eri0, requiring a small change to reconfigure the dman interface


Step One: make some decisions about standards.

Will you have more than one OE configuration?

Will you have more than one disk partition configuration?

Will you have more than one OE environment?

Will you be mirroring the root disks?


Some multi-board domains that we will use have c0, c1 as boot enclosures, and others will use c2, c3. We have 72 and 136GB disks, but the partitions are the same (4GB root, 16GB swap, 20GB on slice 4 as /var, all the free space on slice 5 and 10GB mounted as /home on slice 6 – we are placing 3 metadbs on a 256MB partition on slice 7).


Step Two: Create a custom directory.

Most likely there is a jumpstart server mounted at /export/install on SC0. Just to distinguish from the default installation, let's create a unique subdirectory called 'archives:'

cd /export/install

mkdir archives

Now let's grab some examples for use. In the export/install/[some_oe_environment]/[oe]/Misc/jumpstart-sample are some files to be copied to our custom directory:


cd /export/install/[some_oe]/[oe]/Misc/jumpstart-sample

cp rules /export/install/archives

cp any-machine /export/install/archives


At this point I usually link the check script:

cd /export/install/archives

ln -s /export/install/[some_oe]/[oe]/Misc/jumpstart-sample/check check

Hint: note that you'll need the “check script” for the exact OE you are installing. If you're using more than one OE, create uniquely-named links


Now we'll need to find a sysidcfg file for use. I forget where they are stored, so I search for them:

cd /export/install

find ./* -name sysidcfg -print

cp [path_to_sysidcf]/sysidcfg /export/install/archives/


Creating the sysidcfg file

We have a homogenous environment for a single sysidcfg, so we'll need only one file:

 network_interface=primary {netmask=255.255.255.252 protocol_ipv6=no}
 timezone=US/Central
 system_locale=C
 terminal=vt100
 timeserver=localhost
 name_service=none
 security_policy=none

Hint Hint Hint: The netmask must match the netmask of the I1 network and not the public network since we are booting into the I1 community network.

Creating Profiles

Next we'll create the profile for the “c0” domains:

 # profile keywords   profile values
 # ----------------     -------------------
 install_type               flash_install
 archive_location      nfs://internal_ip_of_sc0/export/install/archives/[name].flar
 partitioning               explicit
 filesys                    c0t1d0s0 4000 /
 filesys                    c0t1d0s1 16000 swap
 filesys                    c0t1d0s4 20000 /var
 filesys                    c0t1d0s5 free
 filesys                    c0t1d0s6 10000 /home
 filesys                    c0t1d0s7 256 
 metadb                     c0t0d0s7 size 8192 count 3
 metadb                     c1t0d0s7 size 8192 count 3

We save this files as “c0_profile” and create a 'c2_profile' just by editing the partitioning information.


The Sunfire platform was named 'jumpstart' so the four domains we are building are named jumpstart-a, jumpstart-b, jumpstart-c and jumpstart-d. Domains “A” and “D” will use the “c0_profile” and Domains “B” and “C” will use the “c2_profile:”

Creating the Rules file

We create a host-based profile by using those keywords in the “rules” file:

 # keywords & values       begin script       profile       finish script
 # --------------------    ------------       --------      -------------
   hostname jumpstart-a        -              c0_profile        -
   hostname jumpstart-b        -              c2_profile        -
   hostname jumpstart-c        -              c2-profile        -
   hostname jumpstart-d        -              c0_profile        -


Validating the Rules file

All of these files are places under /export/install. We can validate and generate the “rules.ok” file by running the “check” script we linked earlier:

cd /export/install

./check

If there any errors, we can fix them and re-run the command until the rules.ok is created.


Creating a flash archive

Now let's create a flash archive of a completely patched and tested domain. Since we have a few unused disks at the moment, let's build a filesystem and use it:

newfs /dev/rdsk/c?t?d?s? (where ? represents the number in c#t#d#s# format)

mkdir /flar

mount /dev/dsk/c?t?d?s? /flar

cd /flar

flarcreate -n (a descriptive name) -x /flar (exclude this directory) [name of file].flar

Hint: Make sure that the name of the flash archive is consistent with the entry in the profile. Once the flar is complete, ftp it to the archives subdirectory and umount the filesystem.


Setting up the Boot parameters

We need to set up the boot parameters for the clients. Here is a step-by-step description of the flash install:

  1. Domain is powered up

  2. from the {ok} prompt we will execute boot [net] – install (where [net] is the devalias of the internal network interface)

  3. The client will send out ARP requests

  4. The server will reply to the ARP (by ethernet from /etc/ethers) and assign an ip (from /etc/hosts)

  5. The server will offer up a “miniroot” (specified as the server in /etc/bootparams) and the client will load the miniroot.

  6. The client will then search for the sysidcfg files (specified by the -c option and added to /etc/bootparams)

  7. The client will then search for a custom jumpstart directory (specified by the -p option and added to /etc/bootparams)

  8. When successful, the client will “step through” the rules files and then match its hostname to a profile

  9. The client will then run a flash install and continue unattended.


For the jumpstart server to be configured correctly, the following must be configured properly

  1. Ethernet address of domains must be in /etc/ethers, or add “-e [ethernet ID] “ to the add_install_client

  2. Internal ip address and internal hostname of domain must be in /etc/hosts, or add “-i [ip address]” to the add_install_client

  3. The netmasks for the intended interfaces should match the values in the profiles

  4. The /export/install directory should be shared as “ro,anon=0”


Add a client to the Jumpstart server

In order to add a client, we'll need to navigate to the proper OE:

cd /export/install/[some_oe]/[oe]/Tools


Let's make sure we don't have a previous jumpstart configuration:

ls /etc/bootparams

If we do, we'll need to unconfigure:

./rm_install_client [hostname] where [hostname] is the “internal” hostname

Typically the host name and the ethernet MAC address of the jumpstart client in a Sunfire environment is already provided. We are ready to configure a client:

./add_install_client \

-c /export/install/archives \ (location of sysidfg)

-p /export/install/archives \ (location of rules.ok)

[hostname] sun4u

We an review the jumpstart configuration:

ls /etc/bootparams


Now all we do is boot the client from the {ok} prompt

{ok} boot [net] – install (where [net] is the devalias to the internal network interface)


Once the flash is completed we can “init 0” and create our aliases, devices and proceed.

( Mar 16 2005, 06:43:05 PM CST ) Permalink Comments [0]
Trackback URL: http://blogs.sun.com/mike_webb/en_US/entry/automated_flash_installs_in_jumpstart
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed