on
Less Known Solaris features: Jumpstart Enterprise Toolkit - Part 14: Using flash archives
As i stated before, the installation mechanism of Jumpstart Flash is quite different from a normal installation. So i will start with a new template on a new server to demonstrate Jumpstart Flash.
Creating a flash archive
The first step to do a flash based install is the creation of a a flash archive. Obviously you need an already installed system to create such an archive. To do so, i create a a directory for the flar image at first:
bash-3.00# mkdir /flardir<br />
bash-3.00# flarcreate -S -n "togusa" -x /flardir -R / /flardir/togusa.flar<br />
Full Flash<br />
Checking integrity...<br />
Integrity OK.<br />
Running precreation scripts...<br />
Precreation scripts done.<br />
Creating the archive...<br />
5144848 blocks<br />
Archive creation complete.<br />
Running postcreation scripts...<br />
Postcreation scripts done.
Running pre-exit scripts...<br />
Pre-exit scripts done.<br />
bash-3.00#
The second command generates the flar image itself. With this command, i generate the flash archive togusa.flar
in the directory /flar
. The -x
option excludes the directory /flardir from the flasharchive. The \verb
-R= specifies that the flash archive should contain all filesystems descending to /
. The -S
flag omits the size checks.
# scp togusa.flar jmoekamp@192.168.10.1:/export/flar/togusa/togusa.flar
After the creation of the flash archive, you have to transmit it to a server. It doesn´t have to be the jumpstart server. it doesn´t even have to be an NFS server. It just have to be reachable with HTTP or NFS by the server you plan to install. In this example we will use the Jumpstart Server for this task, thus we will use a share on this system.
Don´t forget to share this directory via NFS:
# echo "share -F nfs -o anon=0,sec=sys,ro -d \"Installation Images\" /export/install" >> /etc/dfs/dfstab<br />
# shareall
Preparing the template
Okay, we want to install our node ishikawa
with the flash image of togusa
. At first like with all jet installation we add a hostname to our /etc/hosts
# echo "192.168.10.11 ishikawa" >> /etc/hosts<code></blockquote>
Now we generate the template. We need only a small template for the basic installation.<br />
<blockquote><code># make_template ishikawa flash<br />
Adding product configuration information for<br />
+ base_config<br />
+ flash<br />
Updating base_config template specifics<br />
Client template created in /opt/SUNWjet/Templates
Okay, we have to fill the templates with standard settings.
base_config_ClientArch=i86pc<br />
base_config_ClientEther=08:00:27:DE:91:AB<br />
base_config_ClientOS=sol10u5
The use operating system here isn´t important. You will not install this operating system. You will install the operating system contained in the flash archive.
Fill out the sysidsection
of the system like with a normal system, you just need to fill the data to prevent the system from going interactive.
Now we get to the configuration of the flash install. You just define one or more locations of flash archives. When the installatiion in your flash archive contains all recommended patches you can save some time at the installation and skip the installation by usig yes
for the flash_skip_recommended_patches
parameter.
<br />
flash_archive_locations="nfs://192.168.10.1/export/flar/togusa/togusa.flar"<br />
flash_skip_recommended_patches="yes"<br />
Now we have to create the Jumpstart environment for this client.
# /opt/SUNWjet/bin/make_client -f ishikawa<br />
Gathering network information..<br />
Client: 192.168.10.11 (192.168.10.0/255.255.255.0)<br />
Server: 192.168.10.1 (192.168.10.0/255.255.255.0, SunOS)<br />
Solaris: client_prevalidate<br />
Creating Client directory for ishikawa<br />
Solaris: client_build<br />
Creating sysidcfg<br />
Creating profile<br />
Adding base_config specifics to client configuration<br />
Adding flash specifics to client configuration<br />
FLASH: Modifying client profile for flash install<br />
FLASH: Removing package/cluster/usedisk entries from profile<br />
Solaris: Configuring JumpStart boot for ishikawa<br />
Starting SMF services for JumpStart<br />
Solaris: Configure PXE/grub build<br />
Adding install client<br />
Doing a TEXT based install<br />
Leaving the graphical device as the primary console<br />
Configuring ishikawa macro<br />
Using local dhcp server<br />
PXE/grub configuration complete<br />
Running '/opt/SUNWjet/bin/check_client ishikawa'<br />
Client: 192.168.10.11 (192.168.10.0/255.255.255.0)<br />
Server: 192.168.10.1 (192.168.10.0/255.255.255.0, SunOS)<br />
Checking product base_config/solaris<br />
Checking product flash<br />
FLASH: Checking nfs://192.168.10.1/export/flar/togusa/togusa.flar<br />
--------------------------------------------------------------<br />
Check of client ishikawa<br />
-> Passed....
Please note the single line with FLASH:
at the beginning. The JET framework checks for the availability of the flash archive. This prevents one of the most occurring problems with flash… a unaccessible flash archive at the installation.
When we look into the profile
for ishikawa
you will recognize, that all statements regarding cluster to install or similar stuff is removed. But there is a new statement. archive_location
specifies the location of the flar image and install_type
tells the system to do a flash install.
# cat profile<br />
#<br />
# This is an automatically generated profile. Please modify the template.<br />
#<br />
# Created: Sat May 24 12:50:20 CEST 2008<br />
#<br />
install_type flash_install<br />
archive_location nfs://192.168.10.1/export/flar/togusa/togusa.flar<br />
partitioning explicit<br />
#<br />
# Disk layouts<br />
#<br />
filesys rootdisk.s0 free /<br />
filesys rootdisk.s1 256 swap<br />
# pwd<br />
/opt/SUNWjet/Clients/ishikawa<br />
#
While Jumpstarting
When you look into the logfiles of your system, you will notice a big change. You won´t see a large amout of messages from the package installation. Instead of this you will just see the progress notifications of the extraction of the flar archive.
You will find this information in the middle of: /var/sadm/system/logs/install_log
[...]<br />
Beginning Flash archive processing
Extracting archive: togusa<br />
Extracted 0.00 MB ( 0% of 2512.13 MB archive)<br />
[...]<br />
Extracted 2512.13 MB (100% of 2512.13 MB archive)<br />
Extraction complete<br />
[...]
The JET framework auguments this with some housekeeping tasks like deleting the Solaris Volume Manager configuration. As ususal you can look into the /var/opt/sun/jet/finish.log
logfile to find the related messages:
FLASH: Installing flash....<br />
FLASH: Disabling /a/etc/lvm/mddb.cf -> /a/etc/lvm/mddb.cf.disabled<br />
FLASH: Purging entries from /a/etc/lvm/md.tab<br />
FLASH: Disabling mirrored_root_flag in /etc/system<br />
FLASH: Cleanout crash dump area<br />
FLASH: Clear out devfsadm files
After this you have a clone of your old system, but without the instance-specific configuration like ip addresses, hostnames and the volume manager configuration.