The solaris boot command when used with various optional parameters will change the booting behavior.
The common syntax of boot command is solaris SPARC system is :
ok> boot [device-specifier] [arguments]
The Common Boot [device-specifier]s are :
3. net (network boot image)
4. url (jumpstart)
Example 1 : Normal Boot
The boot command without any arguments will boot the system into multi-user mode by default.
Example 2 :
The -a option will ask for configuration information such as where to find the system file, where to mount root, and even override the name of the kernel itself. This is very useful in case of a corrupt /etc/system file or any other such file that may be used in booting process. Simply enter /dev/null when asked for /etc/system. The default responses are mentioned in square brackets . Press enter to select the default options.
ok> boot -a
Example 3 : Verbose mode
To boot the system in verbose mode :
ok> boot -v
Example 4 : Single user mode
To boot the system into single user mode (init level “s”) use the -s argument. In this mode all local file systems are mounted and only a small set of essential kernel processes are left running. This mode is usually used in case of patching the system. No users can login into the system through network.
ok> boot -s
Example 5 : Non-cluster mode
The -x option is used only in case of sun cluster, to boot into non cluster mode.
ok> boot -x
Example 6 : Reconfiguration boot
When booted in reconfiguration mode, the system will probe all the hardware devices and update the logical as well as physical namespaces in /dev and /devices respectively.
ok> boot -r
Example 7 :
The -f argument causes Autoclient systems to flush and reinitialize the client system’s local cache and read all files over the network from the client’s file server. This flag is ignored for all non-Autoclient systems.
ok> boot -f
Example 8 :
The -D argument specifies the default file. In general without this option the system will choose a dynamic default file.
ok> boot -D [default_file]
Example 9 :
The argument -w forces root file system to be mounted as read-write while booting. But this option is not implemented. The ufs root filesystem is mounted read-only to avoid problems during fsck. After fsck runs, it is remounted as read-write.
ok> boot -w
Example 10 : SMF options
The -m argument can be used to specify the SMF options for booting the system
ok> boot -m [options]
The various options that can be specified with -m are :
verbose - Print a line for each service as it is started quiet - Very quiet boot; suppresses standard per-service output and error messages requiring administrative intervention. debug - Boot in serial mode, with status logging of service success or failure output to the console. The stdout and stderr streams of each method invoked will be connected to the console, as well as the standard logging facilities smf(5) provides. milestone=[milestone-level] - Boot to a subgraph defined by the given milestone.
The various milestone levels are :
none - disable all services. single-user - roughly the equivalent of run level 1 or S multi-user - roughly the equivalent of run level 2 multi-user-server - roughly the equivalent of run level 3 all - all enabled services
Example 11 : Failsafe mode
Starting solaris 10 update 6, a ZFS root FS OS can be booted in failsafe mode for troubleshooting when the OS on the primary boot environment fails to boot.
ok> boot -F failsafe
Example 11 : Boot from bootable ZFS dataset
The -L argument allows booting from specific zfs bootable datasets on the disk. The bootable datasets are mentioned in /rpool/boot/menu.lst file. This is common to all datasets under the rpool. Additional entries to the menu.lst are added via the Live Upgrade process for Boot Environments(BEs). The menu.lst file is updated during the shutdown process(init 0 | init 6) after an luactivate has been performed.
ok> boot -L Rebooting with command: boot -L Boot device: /[email protected],700000/[email protected]/[email protected],0:a File and args: -L 1. zfsroot 2. zfsroot-with-patch Select environment to boot: [ 1 - 2 ]: 1 To boot the selected entry, invoke: boot [ root-device ] -Z rootpool/ROOT/zfsroot
Example 12 :
With the -Z argument, you can directly specify the bootable zfs dataset to boot from.
ok> boot -Z rootpool/ROOT/zfsroot
The SPARC systems can be booted from network either by using RARP/bootparams or DHCP.
Example 13 : using RARP
When using RARP option to boot over network, the PROM makes a reverse ARP request. On a reply to this request, the PROM broadcasts a TFTP request to fetch inetboot over the network from any server that responds and executes it.
ok> boot net:rarp
Example 14 : using DHCP
When using the DHCP option to boot over network, the PROM broadcasts the MAC address and kernel architecture of the system and requests an IP address, boot parameters, and network configuration information. On receiving the information from DHCP server, PROM downloads inetboot, loads that file into memory, and executes it. inetboot invokes the kernel, which loads the files it needs and releases inetboot.
ok> boot net:dhcp
Now various boot arguments discussed above can be used together to troubleshoot a booting issue. The most commonly used combination of arguments are :
Example 15 : interactive, verbose, single-user using local disk
ok> boot -avs
Example 16 : interactive, verbose, single-user using cdrom
ok> boot cdrom -avs
Example 17 : interactive, verbose, single-user using network
ok> boot net -avs