Solaris 10 JET

From Anouk.dynalias.com

Jump to: navigation, search
Part 1. Install and configure jumpstart using Jumpstart Enterprise Toolkit (JET)
In this install blog we are going to setup a jumpstart server using jumpstart enterprise toolkit (jet). This package can be 
downloaded for free from http://www.sun.com/download/products.xml?id=472a460f

Install all packages:

heineken:/tmp # pkgadd -d jet.pkg

The following packages are available:
1 JetEXPLO jet explo product (sparc) 3.1.11
2 JetFLASH JET flash product (sparc) 3.1.8
3 JetJASS JASS product (sparc) 3.0.14
4 JetRBAC JET RBAC product (sparc) 1.1.5
5 JetSAN JET san product (sparc) 3.1.7
6 JetSBD Secure By Default product (sparc) 1.0.2
7 JetSDS JET sds product (sparc,i386) 3.4.4
8 JetVTS JET VTS product (sparc) 3.0.11
9 JetWanBoot JET WanBoot support (sparc) 1.1.1
10 JetZONES JET Zones module (sparc) 1.1.12

… more menu choices to follow;
<RETURN> for more choices, <CTRL-D> to stop display:

11 SUNWjet Sun JumpStart Enterprise Toolkit (sparc,i386) 4.4
12 SUNWjetd JET Documentation (sparc) 3.3.1

Select package(s) you wish to process (or ‘all’ to process all packages). (default: all) [?,??,q]:


Add /opt/SUNWjet/bin to the path of the root user
heineken:/tmp # PATH=$PATH:/opt/SUNWjet/bin

Create the jet folder structure and export via nfs

 heineken:/ # mkdir -p /work/jumpstart/install/pkgs
 heineken:/ # mkdir -p /work/jumpstart/install/patches
 heineken:/ # mkdir -p /work/jumpstart/install/media

Add to /etc/dfs/dfshares:

share -F nfs -o ro,anon=0 /work/jumpstart/install/patches
share -F nfs -o ro,anon=0 /work/jumpstart/install/pkgs
share -F nfs -o ro,anon=0 /work/jumpstart/install/media

heineken:/ # shareall
heineken:/ # dfshares
RESOURCE SERVER ACCESS TRANSPORT
heineken:/opt/SUNWjet heineken - -
heineken:/work/jumpstart/install/patches heineken - -
heineken:/work/jumpstart/install/pkgs heineken - -
heineken:/work/jumpstart/install/media heineken - -

As i did not use default directories (export/install/…) i have to edit the 
/opt/SUNWjet/etc/jumpstart.conf file and ensure it reflects my jet folder structure.

JS_PKG_DIR=/export/install/pkgs
JS_PATCH_DIR=/export/install/patches
JS_SOLARIS_DIR=/export/install/media

to…

JS_PKG_DIR=/work/jumpstart/install/pkgs
JS_PATCH_DIR=/work/jumpstart/install/patches
JS_SOLARIS_DIR=/work/jumpstart/install/media

Copy the Solaris media to the jumpstart install directory:

heineken:/ # copy_solaris_media -d /work/jumpstart/install/media -n sol10_0807 
/cdrom/sol_10_807_sparc/s0
Copying Solaris image….
Verifying target directory…
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk…
Copying Install Boot Image hierarchy…
Install Server setup complete

Added Solaris image sol10_0807 at the following location:
Media: /work/jumpstart/install/media

removing directory /work/jumpstart/install/7724

Verify the media copied to hard drive:

heineken:/work # list_solaris_locations
Version Location
——- ——–
sol10_0807 /work/jumpstart/install/media

If you already have the Solaris 10 media on hard drive you can use the add_solaris_location command:

heineken:/opt/SUNWjet/bin # ./add_solaris_location 10u4 /work/jumpstart/install/media

Added Solaris image 10u4 at the following location:
Media: /work/jumpstart/install/media

heineken:/opt/SUNWjet/bin # ./list_solaris_locations
Version Location
——- ——–
sol10_0807 /work/jumpstart/install/media
10u4 /work/jumpstart/install/media

The make_template script assists us to create an empty template which will be used to
generate a simple jumpstart configuration.

heineken:/work # make_template -f test1
Adding product configuration information for
+ base_config
+ custom
+ sds
+ vts
+ explo
+ flash
+ san
+ jass
+ zones
+ sbd
Updating base_config template specifics
Client template created in /opt/SUNWjet/Templates

Without parameters all jet-modules will be integrated into the template, so for our first run
simple install lets reduce the amount of module:

heineken:/opt/SUNWjet/Templates # make_template -f grolsch custom
Adding product configuration information for
+ base_config
+ custom
Updating base_config template specifics
Client template created in /opt/SUNWjet/Templates

Now for the configuration. Use your favorite editor to edit the template file you just created.

base_config_ClientArch=
base_config_ClientEther=
base_config_ClientOS=

This is the first parameters you have to enter. My first simple test machine is a sunblade
100 under the desk. I want to install Solaris 10 onto it.

base_config_ClientArch=sun4u
base_config_ClientEther=0:3:ba:9:56:50
base_config_ClientOS=sol10_0807

Now we need to identify the system configuration, so find the block with the variable name
starting with base_config_sysidcfg:

base_config_sysidcfg_nameservice=NONE
base_config_sysidcfg_network_interface=PRIMARY
base_config_sysidcfg_ip_address=
base_config_sysidcfg_netmask=
base_config_sysidcfg_root_password=”boajrOmU7GFmY”
base_config_sysidcfg_system_locale=”C”
base_config_sysidcfg_timeserver=
base_config_sysidcfg_timezone=”Australia/Victoria”
base_config_sysidcfg_terminal=vt100
base_config_sysidcfg_security_policy=NONE
base_config_sysidcfg_protocol_ipv6=no
base_config_sysidcfg_default_route=

As you can see, the template has filled in what it could. Now let’s finish it off.

base_config_sysidcfg_nameservice=NONE
base_config_sysidcfg_network_interface=PRIMARY
base_config_sysidcfg_ip_address=10.0.0.12
base_config_sysidcfg_netmask=255.255.255.0
base_config_sysidcfg_root_password=”hHUaO5ysq3G4o”
base_config_sysidcfg_system_locale=”C”
base_config_sysidcfg_timeserver=
base_config_sysidcfg_timezone=”Australia/Victoria”
base_config_sysidcfg_terminal=vt100
base_config_sysidcfg_security_policy=NONE
base_config_sysidcfg_protocol_ipv6=no
base_config_sysidcfg_default_route=10.0.0.138

It’s important these values are correct, for if they are not the installation will drop out of
automatic and into interactive mode to prompt you for the answers it does not have.

Don’t forget to add an entry to the /etc/hosts on the jet server.

#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
10.0.0.10 heineken loghost
10.0.0.12 grolsch

Right, almost done. We just need to add the details of the client to the server:

heineken:/opt/SUNWjet/bin # ./make_client -f grolsch
…<Snip>
Check of client grolsch
-> Passed….

Unless that last line says anything but ‘passed’ do not continue. It will provide information
as to where it failed so you can fix it.

If you did get ‘Passed’ we can move onto the client and start the jumpstart:

ok boot net - install

This is a very simple install. Next we will look at how to setup your preferred disk layouts,
your packages and scripts, patches and mirror, all out of the box.

The begin script log ‘begin.log’
is located in /var/sadm/system/logs after reboot.

The finish script log ‘finish.log’
is located in /var/sadm/system/logs after reboot.

References:

http://www.sun.com/bigadmin/content/jet/index.jsp
http://wikis.sun.com/display/JET/Home;jsessionid=5B7F4DAA7C47E18AFD0ACAD779C432B0
http://wiki.c0t0d0s0.org/index.php?title=Jumpstart-Tutorial_%28english%29
http://jet.maui.co.uk/wiki/index.php/Documents


Part 2. Add custom packages and patches to Jumpstart Enterprise Toolkit (JET)

In the last post on JET we created a very basic template but other than the bare minimum
there was absolutely no added functionality that makes JET so powerful and easy to use. So
in this post i want to show how to add explorer and custom patches and packages. This still
is touching on the basics, but it’s a start to showing the extra features over regular
jumpstart.

I will keep using the custom template i build in the last post but add sds and explo
modules to the template. In a later post i will show how to use sds for mirroring but i
will add it now.

heineken:/opt/SUNWjet/bin # ./make_template -f -T grolsch grolsch sds explo
Adding product configuration information for
+ sds
+ explo
Updating base_config template specifics
Client template created in /opt/SUNWjet/Templates

Download and unpack the explorer package. In this instance it resides in /work:

heineken:/work # pkginfo -d /work/ -l | egrep ‘(PKGINST|VERSION)’
PKGINST: SUNWexplo
VERSION: 5.10,REV=2007.09.20.19.12
PKGINST: SUNWexplu
VERSION: 5.10,REV=2007.09.20.19.12

Now, this is very important. We have to check and possibly edit the /opt/SUNWjet/Product
/explo/package.matrix file. We have to ensure there is an entry for the latest version of
explorer, in this case 5.10. I added the line below to the file and then added the package
to the toolkit.

heineken:/opt/SUNWjet/Products/explo # vi package.matrix
5.10:5.10:SUNWexplo SUNWexplu

heineken:/opt/SUNWjet/bin # ./copy_product_media explo 5.10 /work sparc
Transferring <SUNWexplo> package instance
Transferring <SUNWexplu> package instance

Packges copied.

So, let’s confirm it’s all there.

heineken:/work/jumpstart/install/pkgs # ls -la
total 6
drwxr-xr-x 3 root root 512 Mar 3 11:35 .
drwxr-xr-x 5 root root 512 Feb 14 13:16 ..
drwxr-xr-x 3 root root 512 Mar 3 11:35 explo

heineken:/opt/SUNWjet/bin # ./list_product_versions
Product Versions
——- ——–
explo 5.10

You’ll need to modify the explorer module inside the template file, especially where it
asks the version of the explorer. You can also fill in the explorer defaults straight away.

Ok, that’s that. But that was how to add the explorer package which comes with its very own
module. What about packages from say sunfreeware.com.

Let’s install sudo. Download SMCsudo, SMCgcc and SMCliconv from www.sunfreeware.com. In my
case i will download them to /tmp. To add them to the jumpstart is a two command process
for every package.

heineken:/opt/SUNWjet/bin # pkgtrans /tmp/gcc-3.4.6-sol10-sparc-local /work SMCgcc
Transferring <SMCgcc> package instance
heineken:/opt/SUNWjet/bin # ./copy_custom_packages /work sparc SMCgcc
Transferring <SMCgcc> package instance
Packages copied

heineken:/opt/SUNWjet/bin # ./list_product_versions
Product Versions
——- ——–
custom sparc
explo 5.10

heineken:/work/jumpstart/install/pkgs/custom/sparc # ls -la
total 8
drwxr-xr-x 4 root root 512 Mar 4 11:45 .
drwxr-xr-x 3 root root 512 Mar 4 11:40 ..
drwxr-xr-x 3 root root 512 Mar 4 11:59 SMCgcc
drwxr-xr-x 3 root root 512 Mar 4 11:45 SMCliconv
drwxr-xr-x 3 root root 512 Mar 4 11:40 SMCsudo

Now we have to update the custom_packages line in the template:

custom_packages=”SMCgcc SMCliconv SMCsudo”

And add a patch. Let’s add the daylight savings patch to the /work/jumpstart/patches/custom
directory and update the template.

custom_patches=”125378-05″

Update the client and do another boot net - install:

heineken:/opt/SUNWjet/Templates # ../bin/make_client -f grolsch



Part 3. Configure Solaris Volume Manager in JET

In part 2 of the series of posts on JET we added the sds module to our jet template but did
not yet implement a mirror. That is what we will do now. The rootdisk will be set to c0t0d0
(as defined in OBP’s rootdisk alias). Most of the variable settings are very straight
forward.

To the template. The first section asks us which cluster to install, which disk to use and
to layout that disk. The below details will set the cluster to install all+OEM on rootdisk
(c0t0d0), set root slice to 0 and use 8gb, swap to s1 with 1gb and var to s3 with 2gb.  I
also want to remove a few packages from the complete install using the
base_config_profile_del_packages setting.

base_config_profile_cluster=SUNWCXall
base_config_profile_usedisk=rootdisk.
base_config_profile_dontuse=”"
base_config_profile_root=8192
base_config_profile_swap=1024
base_config_profile_s3_mtpt=”/var”
base_config_profile_s3_size=”2048″
base_config_profile_s4_mtpt=”"
base_config_profile_s4_size=”"
base_config_profile_s5_mtpt=”/var”
base_config_profile_s5_size=”"
base_config_profile_s6_mtpt=”/usr”
base_config_profile_s6_size=”"

base_config_profile_del_packages=”SUNWaclg SUNWapch2d SUNWapch2r SUNWapch2u SUNWapchd
SUNWapchr SUNWapchu SUNWtcatr SUNWtcatu SUNWmysqlr SUNWmysqlt SUNWmysqlu SUNWserweb
SUNWipplr SUNWseru”

Now to configure the sds module in the template. As i am using Solaris 10 i have fmthard
set to yes, which takes care of some automation for us. In this section i can set the
metadevices to use and set some aliases for disks. Below are the settings i use:

sds_root_mirror=”c0t2d0″
sds_use_fmthard=”yes”
sds_database_locations=”rootdisk.s7:3″
sds_root_alias=”rootdisk”
sds_root_mirror_devalias_name=”rootmirror”
sds_device_numbers=”/:d0:d10:d20 /var:d3:d13:d23 swap:d1:d11:d21″

And that’s it, run another boot net - install and your system will come up with the custom
disk layouts and fully mirrrored. There are many more options to create other metadevices
but i use scripts for that as i wish to preserve current disk structures. For example i run
the following script which sets up slice 5 and then i put a metadevice on it. This way
whatever information was on slice 5 (or d40) is preserved.

format -f /mnt/files/fmt-disk c0t0d0s0
format -f /mnt/files/fmt-disk c0t2d0s0
metainit d40 2 1 c0t0d0s5 1 c0t2d0s5

The contents of fmt-disk (print -> print -> slice 5 -> enter -> enter -> starting point
28115 -> size 10674c -> label -> quit -> quit):

p
p
5

28115
10674c
l
q
q
Next post will look at creating a flar to speed the whole process up even more.



Part 4. Create flash archive (flar) and jump under jet

Now that the JET install creates the server exactly how we like it let’s look at turning it
into a flash archive (flar) image to use with jet. This will speed up even more the install
process.

grolsch:/work # flarcreate -n “sb100 flar” -S -R / -x /work -x /export/home /work/sb100-snapshot.080318.flar
Full Flash
Checking integrity…
Integrity OK.
Running precreation scripts…
Precreation scripts done.
Creating the archive…
6080747 blocks
Archive creation complete.
Running postcreation scripts…
Postcreation scripts done.

Running pre-exit scripts…
Pre-exit scripts done.

grolsch:/work # ls -la
total 6083780
drwxr-xr-x 3 root root 512 Mar 18 09:51 .
drwxr-xr-x 23 root root 512 Mar 17 17:34 ..
-rw-r–r– 1 root root 3113352215 Mar 18 10:10 sb100-snapshot.080318.flar

We have to add the flash module to our template:

heineken:/opt/SUNWjet/bin # ./make_template -f -T grolsch grolsch flash
./make_template[119]: hostname
Adding product configuration information for
+ flash
./make_template[427]: hostname
Updating base_config template specifics
Client template created in /opt/SUNWjet/Templates

And we have to edit the template to include information on the flar:

flash_archive_locations=”nfs://10.0.0.10/work/jumpstart/flash/sb100-snapshot.080318.flar”

There, that template can now be used to quickly jump any sun4u system very quickly. It will
be fully patched, include all extra packages we like and even be fully configured thanks to
JET. Bear in mind the flar is used as a guide only and on its own does not contain all
configuration settings. For example, if the flar was put into a blank template the hosts
file, /etc/vfstab, defaultrouter, etc would not be set.
Personal tools