Sparc Solaris Support Page

Most Recent Version: 10.x (as of: 11/19/2006)

Official Solaris support information
Sunsolve

Questions:

1) How do I install Solaris?
2) How do I get my programs to start automatically at boot?
3) What do I do if I bone myself really bad and can no longer boot?
4) How do I secure Solaris?
5) Is there a compiler on this thing?
6) I can't resolve DNS.
7) How do I mirror disks with DiskSuite 4.x?
8) How do I backup a box?
9) How do I make an interface promisuous?
10) How do I boot Solaris with a 32-bit kernel?
11) How do I get NIC card settings?
12) How do I jumpstart a Netra with Solaris 9 and a linux jumpstart server?


Answers:

1) How do I install Solaris?

Filesystem

Recommended Size (MB)

/

500

swap

2x physical memory

/home/export

40

/opt

100 optional, this can be part of the / filesystem

/usr

500

/var

3000  (this actually only needs to be large if you plan to log a bunch of stuff like FW-1 logs)

3) What do I do if I bone myself really bad and can no longer boot?

Put in the Solaris software CD and power on the machine.  Interrupt the boot as listed in the 'installing Solaris' question.  At the 'ok' prompt, type 'boot cdrom -s'.  This will boot the machine into single user mode off the cdrom.   At this point, you can mount damaged disks into the /mnt (or any free directory) and make modifications, copy files or fsck.  The 'partition' command will allow you to repartition.  Disks can usually be mounted with 'mount /dev/dsk/c0t0d0s0 /mnt' where cX is the controller ID, tX is the SCSI target ID, dX is the disk number at the target (almost always 0), and sX is the slice number (partition #, generally in the range of 0-7).

4) How do I secure Solaris?

  I will give you a quick and dirty, although you can find other faqs on this at http://www.iss.net or http://www.phoneboy.com/fw1/faqfaq.html.   Anyway:

5) Is there a compiler on this thing?

No, of course not!  Don't be silly!  That will cost you more.  Your best bet is to grab a precompiled gcc from http://sunfreeware.com You will probably want to grab gcc, make, groff, and m4 for sendmail.  Next, make sure you have added the archive libraries, header files, and compiler tools of the Solaris software CD (eg, SUNWarc) or you may get errors when running the compiler.  Run the pkgadd -d command to add the freeware packages.  You should be good to go!

6) I can't resolve DNS.
    Make sure you have a /etc/resolv.conf file with 'nameserver x.x.x.x' in it, and modify the /etc/nsswitch.conf file such that there is a line 'hosts: files dns'.

7) How do I mirror disks with DiskSuite 4.x?

8) How do I backup a box?

you must backup each partition with ufsdump, eg:

ufsdump 0cfu /dev/rmt/0n /dev/dsk/c0t0d0s0
ufsdump 0cfu /dev/rmt/0n /dev/dsk/c0t0d0s1 ...

Make sure you use the 0n tape device so that the tape will not rewind, otherwise you will overwrite the previous partition.
    You can restore a filesystem by booting off cdrom -s and mounting the partition you want to restore.  'cd' to the mounted partition, and do a ufsrestore:

ufsrestore is 2

will do an interactive restore of the 2nd ufsdump put on the tape to the current directory.  If SCSI ID has changed, you may have to modify /etc/vfstab.  Also, if you are restoring the root partition, you have to reinstall the bootblock with:

installboot <boot block> <raw device>

9) How do I make an interface promisuous?

Heh heh heh... oh wait, I am a professional!  'ifconfig <NIC device> -flush -arp'

10) How do I boot Solaris with a 32-bit kernel?

From an ok> prompt, type:

"setenv boot-file /kernel/unix"

and then reboot.  Within the OS, you can set the eeprom directly with:

eeprom boot-file=kernel/unix

To go back to 64 bit, just set the boot-file variable to null, since the default is to boot 64-bit.  Eg:

eeprom boot-file=

 

11) How do I get NIC card settings?

ndd -get /dev/hme instance 0 (0 = hme0, 1 = hme1, n = hmen)
ndd -get /dev/hme link_speed -> 1 = 100M, 0 = 10M
ndd -get /dev/hme link_mode -> 1 = full duplex, 0 = half
ndd -get /dev/hme link_stat -> 1 = carrier, 0 = no carrier

 

12) How do I jumpstart a Netra with Solaris 9 and a linux jumpstart server?

Background:  Jumpstart is a process for remotely booting and installing a Solaris OS across the network.  This is used for central management, ease of reinstall, and in case your SPARC platform does not have a CDROM (as is the case with a headless Netra station).  Generally, you use a SPARC hardware platform to Jumpstart another SPARC station, but in this case, we don't have a second SPARC station, so we will load from an x86-based linux distribution (in this case RedHat Fedora Core 6).

Setting up the Linux Jumpstart Server:

  1. First of all, load up a linux distribution.  I used RedHat FC6, but other distributions should work.  Make sure networking is functional, and the linux box has a fixed IP address.

  2. Next, make sure the following packages are loaded under linux (these are fairly standard packages and should be available on the OS CD as rpms):

  3. These packages are required to allow remote file distribution.  rarpd is used to get an IP address.  TFTP will dump an initial boot image.  This image will query bootparamd for instructions, and then finally use NFS to do major file copy operations.  You can verify if the packages are installed by typing "rpm -q rarpd", for example (if you are using a version of RedHat).  Use "rpm -i <package>" to install.

  4. Alright, now we Solaris software.  You will have 2 CDs - disk 1 and disk 2.  If you do not have the CDs, download them and burn to CDROM.  You will need to have a registered account to download, but if you don't have one, you can create one for free.  You will need to burn AT LEAST disk 1 to CDROM, as it has some funky Solaris UFS filesystem on it that you probably can't mount as a virtual ISO CDROM.  So let's assume you have burned both disks to CDROM.  Also, do NOT use CD-RW disks, as they caused me no end of problems and tons of read errors.  Use standard CD-R disks.

  5. Next, we must copy OS information to the Jumpstart server.  Under linux, create a master Jumpstart directory.  For our purposes, let's say we have created a directory called /jumpstart/sol9/.  I use "sol9" since we might also want to create a "sol8" or "sol7" or some such.

  6. Copy the Install Files: Mount the Solaris Disk 1, say under /mnt/cdrom.  If you read other instructions on the Internet about copying data, they will say use the "setup_install_server" tool on the CD.  You might get this to work, but we want to avoid these tools, since they are designed to run under Solaris, not linux.  The script basically just copies stuff to the hard disk with a modified version of tar called "bar".  We will do this manually: 

cd /mnt/cdrom
tar cf - . | (cd /jumpstart/sol9 && tar xfp - )
cp .volume.inf /jumpstart/sol9

The last line copies the volume catalog.  You will need that file, or else the install will die when you try to NFS mount the install files.

  1. Root File System: This will crunch a while.  Next, we need to copy the initial boot filesystem.  This is a little weird.  The root filesystem is on Disk 1, but on a hidden partition you can't see under linux.  Type "fdisk -l /dev/cdrom" and you will see:

Disk /dev/cdrom (Sun disk label): 1 heads, 640 sectors, 2048 cylinders
Units = cylinders of 640 * 512 bytes

Device 	   Flag Start	End  Blocks Id System
/dev/cdrom1 r 	0 	976  312320 4  SunOS usr
/dev/cdrom2 r 	976 	1917 301120 2  SunOS root
/dev/cdrom3 	1917 	1921 1280   0  Empty
/dev/cdrom4 	1921 	1925 1280   0  Empty
/dev/cdrom5 	1925 	1929 1280   0  Empty
/dev/cdrom6 	1929 	1933 1280   0  Empty

Weird, huh?  /dev/cdrom1 was the partition we copied before.  The root system is on /dev/cdrom2.  Unfortunately, we can't just mount /dev/cdrom2, because it is a boned UFS filesystem.  We mount it using the following syntax:

mount -t ufs -o ufstype=sun,offset=319815680 /dev/cdrom /mnt2

We mount the UFS filesystem under a separate mount point "mnt2" (arbitrary - you can mount wherever).  Notice the oddball offset.  this is the start of the root filesystem (976) times the number of units (640*512).  So 976 * 640 * 512 = 319815680.  If you do the calculation incorrectly, you will get an error mounting the disk.

Next, copy the root filesystem to its proper position within the Install filesystem:

cd /mnt2
tar cf - . | (cd /jumpstart/sol9/Solaris_9/Tools/Boot && tar xfp - )

It is an odd location, and you can possibly move it elsewhere, but I wouldn't, since the original install disk has the "Boot" directory as a sym link to the root filesystem.

  1. Disk 2: Eject Disk 1 and insert disk 2.  Mount normally (mount /dev/cdrom /mnt/cdrom).

cd /mnt/cdrom/Solaris_9
tar cf - Product | (cd /jumpstart/sol9/Solaris_9 && tar xfp - )
cp .volume.inf /jumpstart/sol9/.volume.inf.2

We are just going to copy the "Product" directory, and copy the .volume.inf catalog.

  1. Now, set up the services on the linux server.  Let's start with NFS.  In /etc/exports, add these lines:

    /jumpstart/sol9/Solaris_9/Tools/Boot    *(ro,no_root_squash)
    /jumpstart/sol9          *(ro,no_root_squash)

    Instead of "*", you can also specify an IP or hostname to limit who can access the NFS server, but this is pretty easy.  To get the service to reread the config file, type "exportfs -a".  You can also test the mount by typing "mount -t nfs <linux IP address>:/jumpstart/sol9".  Notice there are two lines, one for the root filesystem, and one for the install filesystem with software packages.  You can restart the service with "service nfs restart".

  2. RARPD: edit /etc/ethers:

    8:0:f:55:66:77 jsclient

    Where 8:0:f:55:66:77 is the MAC of the SPARC station, and "jsclient" is the hostname.  Restart rarpd: "service rarpd restart"

  3. /etc/hosts:

    192.168.1.1    jsserver    jsserver.domain.com
    192.168.1.2    jsclient    jsclient.domain.com

    We use the hosts file to tie everything together.  /etc/ethers, /etc/hosts and /etc/bootparams must all agree on hostnames.  Also, include the domain names.  I ran into incomplete resolution issues without it, and the SPARC wouldn't boot properly.

  4. /etc/bootparams:

    jsclient \
      root=jsserver:/jumpstart/sol9/Solaris_9/Tools/Boot \
      install=jsserver:/jumpstart/sol9 \
      boottype=:in \
      rootopts=:rsize=8192,wsize=8192

    These are instructions for the boot kernel so that it knows where to find the root and install filesystems via NFS.  Notice the hostnames - so resolution via /etc/hosts is important!  Restart the bootparamd service:  "service bootparamd restart".

  5. Finally, the TFTP server should be running from the /tftpboot directory.  Copy the appropriate NFS kernel into the directory:

    cp /jumpstart/sol9/Solaris_9/Tools/Boot/usr/platform/sun4u/lib/fs/nfs/inetboot /tftpboot/inetboot.sol9.sun4u

    There are a number of different kernels for different platforms, but most platforms, including the Netra t1 105, use sun4u.  When the SPARC grabs the kernel out of the TFTP directory, it is looking for a file named after its own IP address.  For example, the jsclient in this case is numbered 192.168.1.2.  In hex, this becomes C0.A8.01.02, so the filename it is looking for is C0A80102.  Let's link the expected name to the actual file:

    ln -s inetboot.sol9.sun4u C0A80102
    ln -s inetboot.sol9.sun4u C0A80102.SUN4U

    You will probably need the 2nd link as well.

  6. Boot the SPARC client.  Make sure it is cabled to the network and open a console to watch the boot.  You will see the machine boot up and check RAM, and then give you an "ok" prompt.  At the prompt, type: "boot net - install".
      It should go an get the TFTP kernel, in which case you will see a counter go up to 2aa00.  Then it should begin to boot.  If you get an error about "ERROR: bpgetfile unable to access network information", ignore and hit CTRL-D to continue.  If you get an error about invalid OS or Flash file system, it wants to get to the root of the install files (/jumpstart/sol9), but it might not be able to see the .volume.inf catalog files.  Make sure you copied them over from the CD.
      You will be prompted for the rest of the configuration information.

 

DISCLAIMER: This support site is provided as a FREE service to our customers. Every effort is made to ensure it is complete and accurate. However, due to changing versions, typos, different environments, etc. information may be inaccurate for your site. Note that we do not assume responsibility for any problems you might encounter using information provided in these pages. Please inform us of any problems you encounter we will make every effort to correct this information. Thank you.


Home | Services | Training | Support | Contact Us | Search

Copyright 2006, Security Evolution, Inc.