BigAdmin System Administration Portal
Community-Submitted Tech Tip
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/.
 
 

A CD-Free Installer for the Solaris OS

Mohd Akhbar Jamaludin, May, 2005


Overview

The Solaris OS is very interesting and is among the most sophisticated operating systems I've ever known. And with the release of the Solaris 10 OS, many can't wait and have downloaded the pre-release version in order to get a taste of what the final version will offer. But with many pre-releases as over 600 new features get loaded into the OS, this could mean burning CDs before you can install the OS. What will be presented here is an alternative for Solaris installation. It is similar to network-type installation, but it doesn't require burning the boot CD. Here we go.


Requirements

What you need:

1) ISOs for the Solaris 10 OS. Get them from Software Express: Solaris.

2) Two machines running on SPARC platform. One is the machine you will install the OS or Target Client on, and the other will be the Install Server (preferably within the same network segment).


Solution

The solution presented here is using two Ultra 10 workstations with one already loaded with the Solaris OS. The version used here is Solaris 10 release 11/04. I haven't tried this solution on x86, but you could use this official guide (Solaris 10 Installation Guide: Network-Based Installations), which also includes cross-platform setup for the install server, and you could tailor this solution to your needs. Using the Network-Based Installation method, these are the steps for the Install Server.

1. Run this command to check if you have any loopback devices associated with your Solaris system.

# lofiadm
Block Device        File
/dev/lofi/1        /ISO/sol-10-b72-sparc-v1.iso
/dev/lofi/2        /ISO/sol-10-b72-sparc-v1-s1.iso

If it gives any output like that above instead of a blank result, then you should run mount to see if any of the Block Device entries are mounted. If so, then unmount all of them with the umount command. After that remove all the loopback devices.

# lofiadm –d <block device>

For example:

# lofiadm –d /dev/lofi/1

2. Create four directories in /mnt:

# cd /mnt
# mkdir disk1 disk2 disk3 disk4 disk1/s0 disk1/s1

3. Extract all the ISOs to a directory. I place all the compressed ISOs into /ISO and unzip them in the same directory.

# cd /ISO
# unzip sol-10-b72-sparc-v1.zip
# unzip sol-10-b72-sparc-v2.zip
# unzip sol-10-b72-sparc-v3.zip
# unzip sol-10-b72-sparc-v4.zip

4. Now it's time to mount all the ISOs, but for the Boot Disk you can't just lofiadm and mount it because this will only give you the first part of the Boot Disk and miss the boot partition. Instead, run this script against the Boot Disk ISO and you'll get everything. For more information on the commands used here, see SunSolve doc. 50566. (Please note: Access to SunSolve docs has changed; for more information, refer to Fee vs. Free FAQ.)

#!/bin/sh

PATH=/bin:/usr/sbin:/usr/ucb

if [ `whoami` != "root" ]; then
echo ""
echo "Must be root to run...Exiting."
echo ""
exit
fi

if [ $# != 1 ]; then
echo ""
echo "Usage: bootcd.sh [filename]"
echo ""
exit
fi

PWD=`pwd`
FILE=$1

dd if=${PWD}/${FILE} of=${PWD}/vtoc bs=512 count=1 > /dev/null 2>&1
OD=`od -D -j 452 -N 8 < ${PWD}/vtoc`
CYLSTART=`echo ${OD}|awk '{print $2}'`
COUNT=`echo ${OD}|awk '{print $3}'`
SKIP=`echo ${CYLSTART}*640|bc`
NAME=`echo ${FILE}|cut -d'.' -f1`
dd if=${PWD}/${FILE} of=${PWD}/${NAME}-s1.iso bs=512 skip=${SKIP} 
count=${COUNT} > /dev/null 2>&1

#for share in s0 s1
#do
#if [ ! -d /mnt/${share} ];then
#mkdir /mnt/${share}
#fi
#done
lofiadm -a ${PWD}/${FILE} > /dev/null
lofiadm -a ${PWD}/${NAME}-s1.iso > /dev/null
mount -F hsfs -o ro /dev/lofi/1 /mnt/disk1/s0
mount -F ufs -o ro /dev/lofi/2 /mnt/disk1/s1

I've edited part of the code for the purpose of this guide and renamed it to bootcd.sh and put it in the same directory with all the ISOs. In order to mount the Boot Disk ISO execute it with the name of your Boot CD ISO.

# ./bootcd.sh boot.iso

This script will mount the first part of the Boot Disk to /mnt/disk1/s0 and the second part to /mnt/disk1/s1.

5. Next, you can proceed to use lofiadm for the rest of the ISOs.

# lofiadm –a /ISO/sol-10-b72-sparc-v2.iso
# lofiadm –a /ISO/sol-10-b72-sparc-v3.iso
# lofiadm –a /ISO/sol-10-b72-sparc-v4.iso

Then mount them:

# mount –f HSFS /dev/lofi/3 /mnt/disk2
# mount –f HSFS /dev/lofi/4 /mnt/disk3
# mount –f HSFS /dev/lofi/5 /mnt/disk4

6. Continue creating the Install Server by executing these commands.

# mkdir –p /Solaris10

Note: This is where the Solaris Install Image will be placed.

# /ISO/disk1/s0/Solaris_10/Tools/setup_install_server /Solaris10
# /ISO/disk2/Solaris_10/Tools/add_to_install_server /Solaris10
# /ISO/disk3/Solaris_10/Tools/add_to_install_server /Solaris10
# /ISO/disk4/Solaris_10/Tools/add_to_install_server /Solaris10

7. Assuming your Install Server and Target Client are on the same segment, these steps will share the /Solaris10 and the Target Client will be able to boot and install from the Install Server.

Add the following to /etc/dfs/dfstab:

share -F nfs -o ro,anon=0 -d "Install Server" /Solaris10
# ps -ef | grep nfsd

(Note: This will check if the nfs server is running.)

# /etc/init.d/nfs.server start

(Note: This will start the nfs server.)

# shareall

(Note: Share all including our /Solaris10.)

8. The Install Server is set and now you can add the Target Client for network install.

# /Solaris10/Solaris_10/Tools/add_install_client -e ethernet_address \
client_name platform_group

where:

  • ethernet_address: the Ethernet address of the Target Client
  • client_name: host name of the Target Client
  • platform_group: system architecture of the Target Client identified by using uname –m

9. Finally turn on your Target Client, and at the ok prompt, type boot net. Now you're halfway in installing one of the best operating systems on earth. Enjoy exploring the ZFS, DTrace, Solaris Containers (formerly known as N1 Grid Containers) plus more than 600 new features of the Solaris 10 OS. Have fun installing.


About the Author

Mohd Akhbar Jamaludin is an application developer at Kolej Universiti Tun Hussein Onn (KUiTTHO). He has been familiar with the Solaris OS since 1996. Previously, he was a system administrator at Fujitsu Component Malaysia (FCM), before joining KUiTTHO.

 


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.

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


Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.
BigAdmin
  
 
 
 
Would you recommend this Sun site to a friend or colleague?
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright Sun Microsystems, Inc.