My FAQs > Operating Systems > Solaris
Last updated on May 09, 2002
One of the main hardware differences between SPARC systems that run Solaris and PC systems that run Linux or Microsoft Windows is that SPARC systems have an OpenBoot PROM monitor program, which can be used to modify firmware settings prior to booting. It is based on the Forth programming language and can be used to run Forth programs that perform the following functions:
Internal Loopback test - succeeded External Loopback test - succeeded Looking for Ethernet packets. '.' is a good packet. 'X' is a bad packet. Type any key to stop ......X.........XXXX.........XX............When you run a command in the OpenBoot monitor, you can pass a number of options to each command to modify its behavior. For example, the boot command takes a number of different options, including which device should be booted. To boot from the default boot device (usually the primary hard drive), you would type
ok bootHowever, it is also possible to boot using the CD-ROM by using the command
ok boot cdromThe system may be booted from a host on the network by using the command
ok boot netAlternatively, if you have a boot floppy, the following command may be used:
ok boot floppyAs many early Solaris distributions were made on magnetic tape, it’s also possible to boot using a tape drive with the following command:
ok boot tapeIn addition to the watch-net command, the OpenBoot monitor can perform a number of other diagnostic tests. The probe-scsi command displays all of the SCSI devices attached to the system. The following is a sample output:
ok probe-scsi Target 1 Unit 0 Disk SUN0104 Copyright (C) 1995 Sun Microsystems All rights reserved Target 1 Unit 0 Disk SUN0207 Copyright (C) 1995 Sun Microsystems All rights reservedThe test command is used to test specific hardware devices, such as the loopback network device. This device could be tested by using the command
ok test net Internal Loopback test - (OK) External Loopback test - (OK)The watch-clock command is used to test the clock device.
ok watch-clock Watching the 'seconds' register of the real time clock chip. It should be ticking once a second. Type any key to stop. 1 2 3To view the OpenBoot release information for your firmware, use the command
ok banner SPARCstation 20, Type 5 Keyboard ROM Rev. 2.4, 256 MB memory installed, Serial #456543 Ethernet address 5:2:12:c:ee:5a HostID 456543If you have modified your hardware configuration, and you want the new devices to be recognized, you should always reboot by using the command
boot –r
Some of the most challenging aspects of understanding Solaris hardware are the device names and references used by Solaris to manage devices. Solaris uses a very specific set of naming conventions to associate physical devices with instance names on the operating system. For Linux and Microsoft Windows administrators, this can be incredibly confusing. In addition, devices can also be referred to by their device name, which is associated with a device file created in the /dev directory after configuration.
For example, a hard disk may have the physical device name /pci@1f,0/pci@1,1/ ide@3/dad@0,0, which is associated with the device file /dev/dsk/c0t0d0. In Microsoft Windows, disks are simply labeled by their drive letter (C:, D:, E: and so on); while in Linux, device files are much simplified (for example, /dev/had for an integrated development environment [IDE] hard disk).
The benefit of the more complex Solaris device names and physical device references is that it is easy to interpret the characteristics of each device by looking at its name. Using the same disk example just given, /pci@1f,0/pci@1,1/ide@3/dad@0,0, we can see that the IDE hard drive is located on a PCI bus at target 0. When we view the amount of free disk space on the system, it is easy to identify slices on the same disk by looking at the device name:
bash-2.03# df -k Filesystem kbytes used avail capacity Mounted on /proc 0 0 0 0% /proc /dev/dsk/c0t0d0s0 1982988 615991 1307508 33% / fd 0 0 0 0% /dev/fd /dev/dsk/c0t0d0s3 1487119 357511 1070124 26% /usr swap 182040 416 181624 1% /tmp
In the preceding code, we can see that /dev/dsk/c0t0d0s0 and /dev/dsk/c0t0d0s3 are slice 0 and slice 3 of the disk /dev/dsk/c0t0d0.
If you’re ever unsure of which physical disk is associated with a specific disk device name, the format command will tell you:
bash-2.03# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t3d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> /pci@1f,0/pci@1/scsi@1/sd@3,0
In the preceding code, we can see that physical device /pci@1f,0/pci@1/scsi@1/sd@3,0 is matched with the disk device /dev/dsk/c1t3d0.
In addition, a list of mappings between physical devices to instance names is always kept in the /etc/path_to_inst file:
"/sbus@1f,0" 0 "sbus" "/sbus@1f,0/sbusmem@2,0" 2 "sbusmem" "/sbus@1f,0/sbusmem@3,0" 3 "sbusmem" "/sbus@1f,0/sbusmem@0,0" 0 "sbusmem" "/sbus@1f,0/sbusmem@1,0" 1 "sbusmem" "/sbus@1f,0/SUNW,fas@2,8800000" 1 "fas" "/sbus@1f,0/SUNW,fas@2,8800000/ses@f,0" 1 "ses" "/sbus@1f,0/SUNW,fas@2,8800000/sd@1,0" 16 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@0,0" 15 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@3,0" 18 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@2,0" 17 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@5,0" 20 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@4,0" 19 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@6,0" 21 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@9,0" 23 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@8,0" 22 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/sd@a,0" 24 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@1,0" 8 "st" "/sbus@1f,0/SUNW,fas@2,8800000/st@0,0" 7 "st" "/sbus@1f,0/SUNW,fas@2,8800000/sd@c,0" 26 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@3,0" 10 "st" "/sbus@1f,0/SUNW,fas@2,8800000/sd@b,0" 25 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@2,0" 9 "st" "/sbus@1f,0/SUNW,fas@2,8800000/sd@e,0" 28 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@5,0" 12 "st" "/sbus@1f,0/SUNW,fas@2,8800000/sd@d,0" 27 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@4,0" 11 "st" "/sbus@1f,0/SUNW,fas@2,8800000/sd@f,0" 29 "sd" "/sbus@1f,0/SUNW,fas@2,8800000/st@6,0" 13 "st" "/sbus@1f,0/SUNW,CS4231@d,c000000" 0 "audiocs" "/sbus@1f,0/dma@0,81000" 0 "dma" "/sbus@1f,0/dma@0,81000/esp@0,80000" 0 "esp" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@0,0" 30 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@1,0" 31 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@2,0" 32 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@3,0" 33 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@4,0" 34 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@5,0" 35 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/sd@6,0" 36 "sd" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@0,0" 14 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@1,0" 15 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@2,0" 16 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@3,0" 17 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@4,0" 18 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@5,0" 19 "st" "/sbus@1f,0/dma@0,81000/esp@0,80000/st@6,0" 20 "st" "/sbus@1f,0/sbusmem@f,0" 15 "sbusmem" "/sbus@1f,0/sbusmem@d,0" 13 "sbusmem" "/sbus@1f,0/sbusmem@e,0" 14 "sbusmem" "/sbus@1f,0/cgthree@1,0" 0 "cgthree" "/sbus@1f,0/SUNW,hme@e,8c00000" 0 "hme" "/sbus@1f,0/zs@f,1000000" 1 "zs" "/sbus@1f,0/zs@f,1100000" 0 "zs" "/sbus@1f,0/SUNW,bpp@e,c800000" 0 "bpp" "/sbus@1f,0/lebuffer@0,40000" 0 "lebuffer" "/sbus@1f,0/lebuffer@0,40000/le@0,60000" 0 "le" "/sbus@1f,0/SUNW,hme@2,8c00000" 1 "hme" "/sbus@1f,0/SUNW,fdtwo@f,1400000" 0 "fd" "/options" 0 "options" "/pseudo" 0 "pseudo"
In the preceding code, we can see entries for the network interface, /sbus@1f,0/ SUNW,hme@2,8c00000, as well as the floppy disk /sbus@1f,0/SUNW,fdtwo@f,1400000 and the SBUS sbus@1f,0.