SunSolve Internal

Infodoc ID   Synopsis   Date
14074   SOLARIS 2.X BOOT PSD/FAQ   2 Feb 1999

Description Top

Document under construction!

Tip Sheet for Solaris Boot Issues

Revision 1.0
Date Top
August 2, 1996

1.0: About Solaris Boot Issues 
  1.1: Boot  Definitions
2.0: Solaris Boot Debugging
3.0: Common How To's
  3.1: How to Install Boot Block Under SunOS
4.0: Frequently Asked Questions
  Q. Why does boot fail with "The file just loaded does not appear to be
executable."?
  Q. Why does boot fail with "bootblk: can't find the boot program"?
  Q. Why does boot fail with "boot: cannot open kernel/unix"?
  Q. Why does boot fail with "Error reading ELF header."?
  Q. Why does boot fail with "Cannot open '/etc/path_to_inst'"?
  Q. Why does boot fail with "Can't stat /dev/rdsk/c0t3d0s0" but / (root and
/usr
     partitions on the boot-device fsck cleanly when booted from CDROM?
  Q. Why does boot fail with "kernel needs workaround for SuperSPARC bug 12"
after
     adding 85MHz SuperSPARC modules?
  Q. How to change boot device?
  Q. How to determine boot device on a SPARCstorage Array?
  Q. How to set define device alias using show-disks?
  Q. How to boot from disk in single user mode?
  Q. How to boot from cdrom in single user mode?
  Q. How to boot over the network in single user mode?

5.0: boot Patches
6.0: Known Bugs & RFEs
7.0: References
8.0: Supportability
9.0: Additional Support


1.0: About Solaris Booting
==========================

Boot problems 

This PSD tries to explain what happends when you boot a systema
and how to go about fixing common boot problems.


1.1: Boot Definitions
---------------------------------

A lot of varied ground is covered in this PSD; the following terms are
important to some parts of it:

bootblock: 

ufsboot:

PROM: 

/kernel/unix:


2.0: System Boot Debugging
===============================

The best way to "debug" System Boot problems is to read this Tip Sheet.

When the system is boot, the Open Boot PROM reads the bootblock from
the disk defined as the boot device. The bootblock program resides in sectors
1-15 of the disk label and loads the the boot program which resides in the
boot area of a disk partition.  The boot program does platform specific
initialization and starts the init process.  Init looks in /etc/inittab
and runs rc scripts at different run levels.  

Bootstrapping is the process of loading and executing a standalone program.
For the purpose of this discussion, bootstrapping means the process of 
loading and executing the bootable operating system. Typically, the 
standalone program is the operating system kernel but any standalone
program can be booted instead.  As an example, on a SPARC system, the 
diagnostic monitor for a machine is a good example of a standalone 
program other than the operating system that can be booted.

On SPARC systems, the bootstrap procedure on most machines consists of
the following basic phases.

After the machine is turned on the system firmware (in PROM) executes
power-on  self test (POST).  The form and scope of these tests depends
on the version of the firmware in your system.

After the tests have been completed successfully, the firmware attempts
to autoboot if the appropriate flag has been set in the non-volatile 
storage area  used  by  the firmware.   The name of the file to load,
and the device to load it from can also be manipulated.

These flags and names can be set using the eeprom command from the shell,
or by using PROM commands from the 'ok' prompt after the system has been
halted.

The second level program is either ufsboot, (when booting from a disk)
or inetboot (when booting across the network).  When booting from a disk,
the PROM assumes that the primary bootblock resides in blocks 1 to 15 of
the local disk.  When booting over the network,  the PROM  makes a reverse ARP
request and when it receives a reply, the PROM makes a TFTP request to the
server that responded and fetches inetboot across  the network and executes
it.  Inetboot also makes another reverse ARP request, then uses the bootparams
protocol to locate its root filesystem.  It then fetches the kernel across
the network using the NFS  protocol and then executes it.

If the pathname to the standalone is relative (does not begin with a slash),
the second level boot will look for the standalone program.  In Solaris 2.4
and earlier it looks for this program in /kernel/unix.  In Solaris 2.5 and
above the second level boot will look for the standalone in its
platform-dependent location, that is, it prepends /platform/platform-name
to the name of the standalone program called "unix", e.g.:
/platform/sun4m/kernel/unix.

Typically, the standalone program is the kernel. Once the program is loaded,
it starts the UNIX system, mounts the necessary filesystems and runs 
/sbin/init to  bring the system to the "initdefault" state specified in
/etc/inittab.

Init looks in /etc/inittab and runs rc scripts at different run levels.  
At run level 2, the /etc/rc2 script is run.


Boot problems are due to several causes.  A failure initializing

3.0: Common How To's
===================

3.1: How to Install Boot block under Solaris 2.4 or earlier
-----------------------------------------------------------

  ok boot cdrom -s
  # installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 
  
3.2: How to Install Boot block under Solaris 2.5 or above
---------------------------------------------------------

  ok boot cdrom -s
  # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk  /dev/rdsk/c0t3d0s0


4.0: Frequently Asked Questions
===============================

Q: Why does boot fail with "The file just loaded does not appear to be
executable."?

   ok boot
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   The file just loaded does not appear to be executable.


A: The boot block is corrupted.  Run installboot to install a fresh boot block
on the
   raw-disk-device. For example:

   installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0


Q: Why does boot fail with "bootblk: can't find the boot program"?

   ok boot
   Rebooting with command:                                               
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   bootblk: can't find the boot program
   Program terminated
   Type  help  for more information


A: The boot program is loaded from disk by the bootblock program which resides
   in the boot area of a disk partition.  The boot program is missing from the
   boot disk.  The name of the boot program is called "ufsboot".

   Under Solaris 2.4 and earlier, ufsboot is found in the / ( root ) directory.
   In Solaris 2.5 and above, ufsboot file is found in "/platform/`uname -i`".


   If the boot block is missing, you can restore it by booting from the 
   installation cdrom and copying the ufsboot file to your boot drive.

   ok boot cdrom -s
   Rebooting with command: cdrom -s                                      
   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   Configuring the /devices directory
   Configuring the /dev directory
   |
   INIT: SINGLE USER MODE
   # fsck /dev/rdsk/c0t3d0s0
   # mount /dev/dsk/c0t3d0s0 /a
   # cp /platform/`uname -i`/ufsboot /a/platform/`uname -i`
   # umount /a
   # reboot

   or restore the entire root file system from backup tape.


Q: Why does boot fail with "boot: cannot open kernel/unix"?

   Rebooting with command:                                               
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   boot: cannot open kernel/unix
 

A. Either the /platform/kernel directory is missing or the
/platform/kernel/unix
   file is missing. "unix" can get deleted when fsck salvages your unix file
system.

   ok boot cdrom -s
   Rebooting with command: cdrom -s                                      
   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   Configuring the /devices directory
   Configuring the /dev directory
   |
   INIT: SINGLE USER MODE
   # fsck /dev/rdsk/c0t3d0s0
   # mount /dev/dsk/c0t3d0s0 /a
   # ls -l /platform/`uname -i`/kernel

   and make sure the "unix" file exists.  If it does not exist, then 
   copy it from the installation CDROM, for example:

   # cp /platform/`uname -i`/kernel/unix /a/platform/`uname -i`/kernel
   # umount /a
   # reboot

   or restore the entire root file system from backup tape.


Q: Why does boot fail with "Error reading ELF header."?

   ok boot
   booting with command:                                               
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   Error reading ELF header.
   boot failed
   Enter filename [/platform/SUNW,SPARCstation-20/kernel/unix]: 

A. The unix file is corrupted.  To restore:

   ok boot cdrom -s
   Rebooting with command: cdrom -s                                      
   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   Configuring the /devices directory
   Configuring the /dev directory
   |
   INIT: SINGLE USER MODE
   # fsck /dev/rdsk/c0t3d0s0
   # mount /dev/dsk/c0t3d0s0 /a
   # cp /platform/`uname -i`/kernel/unix /a/platform/`uname -i`/kernel
   # umount /a
   # reboot

   or restore the entire root file system from backup tape.


Q: Why does boot fail with "Cannot open '/etc/path_to_inst'"?

   Rebooting with command:                                               
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   Cannot open '/etc/path_to_inst'
   Program terminated
   Type  help  for more information


A. To recreate the /etc/path_to_inst file, boot with the "-ar" options and
   reply "y" when asked "Do you want to rebuild this file [n]?"

   Example:

		(IF needed to re-create /etc/path_to_inst on a system where root
was encapsulated by VxVM.  The name of the root device" to be the same as
"rootdev" 
in /etc/system /pseudo/vxio@0:0)
		(If needed to re-create /etc/path_to_inst on a system where root
was under Disksuite controle.  The name of the root device" to be the same as
"rootdev" 
in /etc/system /pseudo/md@0:0,3,blk)

   ok boot -ar
   Resetting ... 

   SPARCstation 20 (1 X RT626), No Keyboard
   ROM Rev. 2.25, 32 MB memory installed, Serial #3639467.
   Ethernet address 8:0:20:23:1a:ac, Host ID: 723788ab.

   Rebooting with command: -ar                                           
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:
-ar
   Enter filename [kernel/unix]: 
   Enter default directory for modules [/platform/SUNW,SPARCstation-20/kernel
/kernel /usr/kernel]: 
   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   Name of system file [etc/system]:  
   -
   The /etc/path_to_inst on your system does not exist or is empty.
   Do you want to rebuild this file [n]? y
   root filesystem type [ufs]: 
   Enter physical name of root device
   [/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0:a]: 
   configuring network interfaces: le0.
   Hostname: olympus
   Configuring the /devices directory
   Configuring the /dev directory
   Configuring the /dev directory (compatibility devices)
   The system is coming up.  Please wait.
   starting rpc services: rpcbind keyserv ypbind kerbd done.


Q: Why does boot fail with "Can't stat /dev/rdsk/c0t3d0s0" but the / ( root )
   and /usr partitions fsck cleanly when booted from CDROM?

   Example:

   Rebooting with command:                                               
   Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@3,0  File and args:

   SunOS Release 5.5.1 Version Generic [UNIX(R) System V Release 4.0]
   Copyright (c) 1983-1996, Sun Microsystems, Inc.
   configuring network interfaces: le0.
   Hostname: ss20
   The / file system (/dev/rdsk/c0t3d0s0) is being checked.
   Can't stat /dev/rdsk/c0t3d0s0
   /dev/rdsk/c0t3d0s0: CAN'T CHECK FILE SYSTEM.
   /dev/rdsk/c0t3d0s0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

   WARNING - Unable to repair the / filesystem. Run fsck
   manually (fsck -F ufs /dev/rdsk/c0t3d0s0). Exit the shell when
   done to continue the boot process.

   Type Ctrl-d to proceed with normal startup,
   (or give root password for system maintenance): 


A: On the boot device the device name for / is missing from the /dev/dsk
   directory.  To fix, restore /devices and /dev directory and subdirectories
   from backup tape.


Q. Why does boot fail with "kernel needs workaround for SuperSPARC bug 12"
after
   adding 85MHz SuperSPARC modules?

A. Jumbo Kernel patch ID# 101945-45 or higher is required under Solaris 2.4 if
   you are running the 85MHz CPU modules. 


Q. How do you change the default boot-device?

A. Use the Open Boot PROM "setenv boot-device" to change your default boot
device,
   for example:

   ok setenv boot-device disk0
   ok reset

Q. Why does boot fail with "Timeout waiting for ARP/RARP packet"?

   Example:

   Boot device: /iommu/sbus/ledma@f,400010/le@f,c00000  File and args: 
   Timeout waiting for ARP/RARP packet

A. The SPARCstation is failing to boot over the network.  The boot-device
   le@f,c00000 is the "lance ethernet" interface.   If you want to boot
   from your internal disk, then STOP-A and issue printenv:

   Example:

   ok printenv
   selftest-#megs        1                              1
   scsi-initiator-id     7                              7
   sbus-probe-list       fe0123                         fe0123
   auto-boot?            true                           true
   watchdog-reboot?      false                          false
   diag-file                                            
   diag-device           net                            net
   boot-file                                            
   boot-device           disk                           disk net
   silent-mode?          false                          false
   use-nvramrc?          false                          false
   nvramrc                                              
   security-mode         none                           none
   security-password                                    
   security-#badlogins   0                              <no default>
   mfg-switch?           false                          false
   diag-switch?          false                          false


   Check that the following NVRAM configuration parameters are set:

  	boot-device           disk
  	mfg-switch?           false
  	diag-switch?          false

   If "boot-device" is "net", then change "boot-device" to your boot disk, e.g:

        ok setenv boot-device disk
        ok reset

   If "diag-switch?" is true, then change "diag-switch?" to false, e.g:

	ok setenv diag-switch? false
        ok reset

   If "mfg-switch?" is true, then change "mfg-switch?" to false, e.g:

	ok setenv mfg-switch? false
        ok reset
  

 Q. How to change boot device?

	ok setenv boot-device disk
	ok reset
	(may need to do nvstore)

 Q. How to determine boot device on a SPARCstorage Array?

	( see SRDB ID: 11855 Booting from a disk on SPARCStorage Array )


 Q. How to set define device alias using show-disks?

	ok show-disks
	a) /obio/SUNW,fdtwo@0,700000
	b) /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd
	c) /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd
	q) NO SELECTION 
	Enter Selection, q to quit: b
	/iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd has been
selected.
	Type ^Y ( Control-Y ) to insert it in the command line. 
	e.g. ok nvalias mydev ^Y 
         	for creating devalias mydev for 
	/iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd
	ok

    after typing show-disks, choose the letter that refers to the correct
    controller (b in this example)
    then perform the nvalias command as shown by show-disks:

ok nvalias disk12 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,
80000/sd@2,0
            ^     ^ 							      ^
            |   (the control key and the y key pressed at the    you will need
to    
            |   same time will stuff this line up to /sd)        add: "@target,
0"
            |
       this is the alias that will be referenced for the boot-device

this example is shown for the drive being set to target 2 -otherwise change as
needed.

then:

	ok setenv boot-device disk12
	ok reset

    the machine will reset and should automatically boot from the new
    aliased device (disk12)


 Q. How to boot from disk in single user mode?

	ok boot -s

 Q. How to boot from cdrom in single user mode?

	ok boot cdrom -s

 Q. How to boot over the network in single user mode?

	ok boot net -s
  

5.0: Boot Patches
=============================

The followings patches specifically fix some manner of boot 
problem in Solaris . In no way is this a complete list of boot
patches, but simply a list of those which may have impact upon
boot issues.

5.1: Miscellaneous Boot Patches
-------------------------------------

 5.1: Miscellaneous Patches

     Patch-ID# 103093-03 SunOS 5.5: kernel patch

     Patch-ID# 101945-41 SunOS 5.4: kernel patch
	fixes 1185694

     Patch-ID# 101318-80 SunOS 5.3: Patch for kernel
	fixes 1185694

     Patch-ID# 100999-72 SunOS 5.2: kernel jumbo patch

6.0: Known Bugs & RFEs
======================

6.1: Bugs
---------

     1185694 systems with 7 32MB DSIMMS fail to boot

7.0: References
===============

7.1: Important Man Pages
------------------------

     boot - start the system kernel or a standalone program
     installboot - install bootblocks in a disk partition
     init - process control initialization

7.2: Sunsolve Documents
-----------------------

The following sunsolve documents provide some information not included
here.

7.2.1: Infodocs
---------------

xx      to be added

7.2.2: SRDBs
------------

xx      to be added

7.3: Sun Educational Services
-----------------------------

Sun offers several classes which review some common boot problems in
the SPARC Desktop Maintenance and SPARC Datacenter/Server Hardware
Maintenance courses/

7.4: Solaris Documentation
--------------------------

There is not much Solaris documentation specifically on boot problems 
but SunSOlve offers many symptoms and resolutions articles.

7.5: Third Party Documentation
------------------------------

8.0: Supportability
===================

We can help resolve problems where a Sun program has boot
problem with it, but in such cases the contact must be a system
administrator with a good understanding of the security issues.

9.0: Additional Support
=======================

For additional help determining system administration policies at your site,
please contact your local Sun office for possible consulting
offerings. Sun's Customer Relations organization can put you in touch
with your local SunIntegration or Sales office. You can reach Customer
Relations at 800-821-4643.
Product Area System Administration
Product Boot
OS Solaris 2.x
Hardware any

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team