BigAdmin System Administration Portal
Community-Submitted Article
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

Setting Up JumpStart With Solaris 10 OS for SPARC Platforms and ZFS

Lucas Williams, January 2008

Introduction

The setup I had was one Sun Enterprise 3500 server running the Solaris 10 Operating System for SPARC platforms with ZFS and one client machine (a Sun Netra X1 server). I needed to get the Solaris 10 OS installed on the client for a project my company was getting ready to start.

I hope this walk-through of my process will help whoever needs to do something similar.

Note: I used the Solaris 10 08/07 release, but this will also work with earlier versions back to 03/05.

Contents

This article covers the following topics:

Prerequisites

Make sure you are logged in as root or another system administrator.

You should also have your boot server be your DHCP server. However, because my machines get DHCP from another server, and I am set up with static IPs on my servers, I didn't do this.

Also, you need to have tftp and nfs services running. When I installed the Solaris 10 OS on my server, I enabled NFS from the start, but I had to create a service for tftp. Fortunately, this is extremely easy, since it is mostly already set up. All you have to do is a couple of quick changes, as follows:

1. Edit the inetd.conf file. If you are pretty handy with vi, use that. Otherwise, use another text editor. I did the following from an SSH terminal, since neither of my machines had a monitor or keyboard plugged into them.

# cd /etc
# vi inetd.conf

2. Scroll down to the bottom of the file to the lines that look like this:

# TFTPD - tftp server (primarily used for booting)
# tftp dgram  udp6  wait root  /usr/sbin/in.tftpd  in.tftpd -s
/tftpboot

3. Uncomment the last line and save the document so it looks like this:

tftp  dgram  udp6  wait root /usr/sbin/in.tftpd  in.tftpd -s
/tftpboot

4. Type :wq to save the file and quit vi.

5. Run inetconv to get the service added to Service Management Facility (SMF):

# inetconv

6. Then run svcadm to get the service enabled, and you are ready to go:

# svcadm enable tftpd

Now it's time to set up the ZFS storage pools, copy the files, and set up the configuration files...the fun stuff.

Setting Up ZFS Storage Pools

I created a new pool on the Solaris JumpStart server:

# zpool create install c1t7d0

I had a spare disk that wasn't being used in the server, so I made this my Solaris JumpStart server pool. After that, I created the shares.

# zfs create install/config
# zfs create install/boot
# zfs set sharenfs=ro,anon=0 install
# zfs set sharenfs=ro,anon=0 install/config
# zfs set sharenfs=ro,anon=0 install/boot

I then checked to make sure all my directories were there and everything was being shared properly:

# cd /install
# ls -l
drwxr-xr-x   4 root     sys       5 Jan  8 10:25 boot
drwxr-xr-x   2 root     sys       9 Jan  8 10:16 config
#
# share
-               /install   ro,anon=0   ""
-               /install/config   ro,anon=0   ""
-               /install/boot   ro,anon=0   ""

Copying Files

I then put the first CD of Solaris 10 HW807 SPARC in the CD-ROM drive on my Sun Enterprise 3500 server. Then I changed to the cdrom directory on the CD and ran the setup_install_server script:

# cd /cdrom/cdrom0/s0/Solaris_10/Tools
# ./setup_install_server /install

The script ran and copied the necessary files to my /install directory. After it was complete, I changed to the root directory and ejected the CD:

# cd /
# eject cdrom

Then I put the second CD in the CD-ROM drive, changed to the Tools directory, and ran the add_to_install_server script:

# cd /cdrom/cdrom0/Solaris_10/Tools
# ./add_to_install_server /install

I did similar steps until all the files for the five OS CDs and the Language CD were copied to the /install directory.

I put Disc 1 back in my CD-ROM drive on the Sun Enterprise 3500 server and changed to the Misc directory. Then I copied the check script so that I could use it to verify the profile and rules files that I planned to create in the next few steps:

# cd /cdrom/cdrom0/s0/Solaris_10/Misc/jumpstart_sample
# cp check /install/config
# cd /install/config

Setting Up Configuration Files

Now comes the fun part, which is actually writing the files to get the Solaris JumpStart server off and running.

You can copy the samples from the disc and modify them as you see fit. Since I knew what I wanted my system to be used for, I wrote my own files and then ran the check script to verify that the files would work and to create the rules.ok file.

The first file I created was sysidcfg. This file tells the client what its settings are going to be after initial boot. If you don't add information to this file, the system will make you supply all the requested information. I used vi to create my file in /install/config:

# vi sysidcfg
system_locale=en_US.ISO8859-1
timezone=US/Pacific
timeserver=localhost
terminal=vt100
name_service=NONE
security_policy=NONE
root_password=<encrypted password from /etc/shadow>
network_interface=dmfe0 {hostname=<hostname of client>
                         netmask=<your network's netmask>
                         protocol_ipv6=no
                         default_route=<your gateway>}

:wq

Next is the rules file. This file is extremely easy for my setup, since I have only one server that I want to set up. There are a lot of things you can do with the rules file. If you look at the sample rules file included on the Solaris CD, you can get an idea of what you can do with it. The following is what I used.

# vi rules
hostname <hostname of client> - profile -

:wq

The two "-" symbols must be in the code above unless you are using a begin script and a finish script. In that case, you put the name of your scripts in place of the "-" symbols.

Make sure you change permissions on your scripts using chmod 755 before booting your client. More information on this can be found in the sample rules script on the Solaris CD under /Solaris_10/Misc/jumpstart_samples.

Next you have to create your profile file using the file name you specified in your rules file. Funny how things reference each other. You have to use whatever you specified in the rules file for the name of the profile file. Since I specified profile as the file name in my rules file, my file is named profile. My profile file specifies how my client will be set up as far as partition sizes, the installation type, and the client type.

Once again, I used vi to create my file, but there are a bunch of samples on the Solaris CD you can edit to suit your needs. The important thing is knowing the correct installation type.

The cluster option specifies the type of installation according to software group. The following table describes the available values.

Table 1: Values of Software Groups and Group Names

Reduced Network Support Software Group
SUNWCrnet
Core System Support Software Group
SUNWCreq
End User Solaris Software Group
SUNWCuser
Developer Solaris Software Group
SUNWCprog
Entire Solaris Software Group
SUNWCall
Entire Solaris Software Group Plus OEM Support
SUNWCXall

Here's what I used:

# vi profile
install_type      initial_install
cluster           SUNWCXall
partitioning      explicit
filesys           c0t0d0s0 14000 /
filesys           c0t0d0s1 2048 /var
filesys           c0t0d0s3 1024 swap
filesys           c0t0d0s7 19500 /export/home
system_type       standalone

:wq

The next step was to check to make sure I didn't make any mistakes in my files. To do that, I just ran check.

# ./check

If everything comes out fine, you will have a file called rules.ok in your /install/config directory.

# ls -l
-rwxr-xr-x   1 root     root   59701 Jan  8 10:16 check
-rw-r--r--   1 root     root     232 Jan  8 10:14 profile
-rw-r--r--   1 root     root      32 Jan  8 10:15 rules
-rw-r--r--   1 root     root      57 Jan  8 10:16 rules.ok
-rw-r--r--   1 root     root     278 Jan  8 09:33 sysidcfg

Setting Up the Server to Boot Correctly

Now comes the fun of actually setting up the server to boot. You have to get the MAC address of the client. You can get this two ways: either run ifconfig -a on the client or get it off the openboot prompt.

After you get the MAC address, add it to your /etc/ethers file. If you don't have this file, as I didn't, go ahead and create it:

# cd /etc
# vi ethers
0a:3b:ba:f5:d1:e6 <client hostname>

:wq

Next, add your client to your /etc/hosts file:

# vi hosts
<ip.address.for.client> <client hostname>

:wq

Now you have to make the boot server. Make sure you have Disc 1 for Solaris 10 OS in the CD-ROM, and then run setup_install_server again, this time specifying the -b option and the /install/boot directory:

# cd /cdrom/cdrom0/s0/Solaris_10/Tools
# ./setup_install_server -b /install/boot

After this is complete, you can eject the CD:

# cd /
# eject cdrom

Setting Up the Client

Now it's time to set up the client. I ran the following commands. I ran them straight from the files I copied off the CD in the /install directory.

Note: It is very important that you run the following commands from your installation image, not from the CD, since where you run the commands determines where the client will look for the boot image. If you install from the CD, the client will look on the CD for the boot image, and unless you are using NFS to share the CD-ROM drive on your server, the commands will fail.

# cd /install/Solaris_10/Tools
# ./add_install_client -e 0a:3b:ba:f5:d1:e6 -s
<server hostname>:/install -c
<server hostname>:/install/config -p
<server hostname>:/install/config <client hostname>
sun4u

The previous commands create all the needed files so the client can boot and find everything it needs to start installing the Solaris OS. The following describes what the flags mean:

  • -e specifies the MAC address of the client.
  • -s specifies the location of the server's installation files.
  • -c specifies the Solaris JumpStart configuration location.
  • -p specifies the sysidcfg file's location.
  • sun4u specifies the architecture of the client.

Booting the Client

Now you are ready to boot up the client and have it find the server.

Note: On my Sun Netra X1 server, I could get to the lights on management (LOM) console by pressing #. and typing break at the LOM> prompt. Do whatever you need to do to get to the OpenBoot prompt.

On the client, be at the OpenBoot OK prompt and run the following command:

ok> boot net - install

When I ran this command, the client connected to my server, downloaded the OS, and commenced installing it. All I had to do was tell it to use the default IPv4 setting detected, and it did the rest, including rebooting and coming up in console mode.

About the Author

Lucas Williams has been a UNIX and Microsoft Windows system administrator for over 15 years. He has experience with various forms of Linux, the Solaris OS (releases 2.6 through 10), Novell Networking, and Microsoft Windows NT 3.51 through Microsoft Windows Server 2008. He writes scripts to make managing various systems easier and does beta testing of new technologies prior to deploying the technologies into a production environment. Currently, he is working on different ways that virtualization can be used for deploying servers in a production environment.

The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.
 
 

Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin
  
 
Download Opensolaris