|Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
|May the source be with you, but remember the KISS principle ;-)|
|News||Recommended Links||boot command||System Run States||Getting Help in OpenBoot||NVRAM variables||OpenBoot Diagnostics|
|PROM Device Tree||The nvedit Line Editor||Forth||Humor||Etc|
The boot command has the following syntax:
boot <OBP-name> <filename> <options> <flags>
All arguments and options are optional.
Starting up can be initiated either automatically or with a command entered at the user interface. On most SPARC-based systems, the bootstrap process consists of the following basic phases:
The OpenBoot startup process is shown here:
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard OpenBoot 3.15, 128 MB memory installed, Serial #10642306. Ethernet address 8:0:20:a2:63:82, Host ID: 80a26382. Rebooting with command: boot Boot device: disk:a File and args: SunOS Release 5.9 Version Beta_Refresh 64-bit Copyright 1983-2000 Sun Microsystems, Inc. All rights reserved. configuring IPv4 interfaces: hme0. configuring IPv6 interfaces: hme0. Hostname: ultra5 The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t0d0s5: is clean. /dev/rdsk/c0t0d0s7: is clean. /dev/rdsk/c0t0d0s6: is clean. Starting IPv6 neighbor discovery.Setting default IPv6 interface for multicast: add net ff00::/8: gateway fe80::a0 0:20ff:fea2:6382 starting rpc services: rpcbind done. Setting default IPv4 interface for multicast: add net 224.0/4: \ gateway Ultra5 syslog service starting. Print services started. volume management starting. Mar 23 13:19:33 unknown snmpdx: The system is ready. Ultra5 console login:
The startup process is controlled by a number of configuration variables, as described in Table 3.19.
|auto-boot?||Controls whether the system automatically starts up after a system reset or when the power is turned on. The default for this variable is true. When the system is powered on, the system automatically starts up to the default run level.|
|boot-command||Specifies the command to be executed when auto-boot? is true. The default value of boot-command is boot, with no command-line arguments.|
|diag-switch?||Causes the system to run in diagnostic mode if the value is true. This variable is false by default.|
|boot-device||Contains the name of the default startup device used when OpenBoot is not in diagnostic mode.|
|boot-file||Contains the default startup arguments used when OpenBoot is not in diagnostic mode. The default is no arguments. (See Table 3.20 for details on when this variable is used.)|
|diag-device||Contains the name of the default diagnostic mode startup device. The default is net. (See Table 3.20 for details on when this variable is used.)|
|diag-file||Contains the default diagnostic mode startup arguments. The default is no arguments. (See Table 3.20 for details on when this variable is used.)|
Typically, auto-boot? is set to true, boot-command is set to boot, and OpenBoot is not in diagnostic mode. Consequently, the system automatically loads and executes the program and arguments described by boot-file from the device described by boot-device when the system is first turned on or following a system reset.
|<OBP-name>||Specifies the OpenBoot PROM designations. For example, on desktop SPARC-based systems, the designation /sbus/esp@0,800000/sd@3,0:a indicates a SCSI disk (sd) at target 3, lun0 on the SCSI bus, with the esp host adapter plugged in to slot 0. OBP-name can be a device alias such as disk0 (for a floppy 3.5-inch disk drive), net (for Ethernet), or tape (for a SCSI tape). If the OBP name is not specified and diagnostic-mode? returns true, boot uses the device specified by the diag-device configuration variable.|
|<filename>||The name of the standalone program to be started up (for example, kernel/unix). The default is to start up /platform/platform-name/kernel/unix from the root partition. If specified, filename is relative to the root of the selected device and partition. If it is not specified, the boot program uses the value of the boot-file or diag-file based on the diag-switch? parameter.|
|flags||The boot program passes all startup flags to filename. The startup flags are not interpreted by boot. (See the section "The Kernel," later in this chapter, for information on the options that are available with the default standalone program, kernel/unix.)|
The following options control the behavior of the boot command:
|-a||The startup program interprets this flag to mean "Ask me," so it prompts for the name of the standalone program to load.|
|-f||When starting an Autoclient system, this option forces the boot program to bypass the client's local cache and read all files over the network from the client's file server. This option is ignored for all non-Autoclient systems. The -f option is then passed to the standalone program.|
|-r||Triggers device reconfiguration during startup.|
|-s||Boots into a single-user state.|
|-v||Boots in verbose mode. When this option is set, all system messages are displayed.|
A noninteractive boot (boot) automatically boots the system by using default values for the boot path. You can initiate a noninteractive boot by typing the following command from the OpenBoot prompt:
The system boots without requiring more interaction.
An interactive boot (boot -a) stops and asks for input during the boot process. The system provides a dialog box in which it displays the default boot values and gives you the option of changing them. You might want to boot interactively to make a temporary change to the system file or kernel. Booting interactively enables you to test your changes and recover easily if you have problems. To do this, follow the process in Step by Step 3.1.
The Interactive Boot Process For the exam, you should make sure you understand what each step of an interactive boot process is asking for. For example, you should know the name of the default kernel, know what the default modules are and where they are located, understand what the /etc/system file is used for, and what is meant by the default root file system. Each of these are described in the section "The Kernel," later in this chapter.
The following output shows an example of an interactive boot session:
ok ok boot -a Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a File and args: -a Enter filename [kernel/sparcv9/unix]: Enter default directory for modules [/platform/SUNW,Ultra-5_10/kernel /platform/sun4u/kernel /kernel /usr/kernel]: Name of system file [etc/system]: SunOS Release 5.9 Version Generic_112233-02 64-bit Copyright 1983-2002 Sun Microsystems, Inc. All rights reserved. root filesystem type [ufs]: Enter physical name of root device [/pci@1f,0/pci@1,1/ide@3/disk@0,0:a]: configuring IPv4 interfaces: hme0. configuring IPv6 interfaces: hme0. Hostname: ultra5 The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t0d0s5: is clean. /dev/rdsk/c0t0d0s7: is clean. /dev/rdsk/c0t0d0s6: is clean. Starting IPv6 neighbor discovery. Setting default IPv6 interface for multicast: add net ff00::/8: \ gateway ultra5 Starting rpc services: rpcbind done. Setting default IPv4 interface for multicast: add net 224.0/4: Print services started. volume management starting. Mar 13 09:21:48 The system is ready. ultra5 console login:
A Missing /etc/system File If the /etc/system file is missing at bootup, you see this message:
Warning cannot open system file!
The system still boots, however, using all "default" kernel parameters. Because by default the lines in the /etc/system file are all commented by the asterisk (*) character, /etc/system is actually an "empty" file. The kernel doesn't use anything from this file until you edit this file and enter an uncommented line. You can specify /dev/null (an empty file) for the system filename, and the system still boots. In fact, if the /etc/system file gets corrupted and the system won't boot from the /etc/system file, you can specify a file named /dev/null to get the system to boot.
To view more detailed information during the boot process, you use the -v option:
ok boot –v
The system responds with this:
ok boot -v Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz), No Keyboard OpenBoot 3.15, 128 MB memory installed, Serial #10642306. Ethernet address 8:0:20:a2:63:82, Host ID: 80a26382. Initializing Memory Rebooting with command: boot -v Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a File and args: -v SunOS Release 5.9 Version Generic_112233-02 64-bit Copyright 1983-2002 Sun Microsystems, Inc. All rights reserved. Ethernet address = 8:0:20:a2:63:82 mem = 131072K (0x8000000) avail mem = 122306560 root nexus = Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz) pcipsy0 at root: UPA 0x1f 0x0 pcipsy0 is /pci@1f,0 PCI-device: pci@1,1, simba0 simba0 is /pci@1f,0/pci@1,1 PCI-device: pci@1, simba1 simba1 is /pci@1f,0/pci@1 PCI-device: ide@3, uata0 uata0 is /pci@1f,0/pci@1,1/ide@3 dad0 at pci1095,6460 target 0 lun 0 dad0 is /pci@1f,0/pci@1,1/ide@3/dad@0,0 <ST34321A cyl 8892 alt 2 hd 15 sec 63> root on /pci@1f,0/pci@1,1/ide@3/disk@0,0:a fstype ufs PCI-device: ebus@1, ebus0 power0 at ebus0: offset 14,724000 power0 is /pci@1f,0/pci@1,1/ebus@1/power@14,724000 su0 at ebus0: offset 14,3083f8 su0 is /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8 su1 at ebus0: offset 14,3062f8 su1 is /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8 se0 at ebus0: offset 14,400000 se0 is /pci@1f,0/pci@1,1/ebus@1/se@14,400000 cpu0: SUNW,UltraSPARC-IIi (upaid 0 impl 0x12 ver 0x13 clock 270 MHz) configuring IPv4 interfaces:SUNW,hme0 : PCI IO 2.0 (Rev Id = c1) Found PCI-device: network@1,1, hme0 hme0 is /pci@1f,0/pci@1,1/network@1,1 hme0. configuring IPv6 interfaces: hme0. Hostname: ultra5 dump on /dev/dsk/c0t0d0s1 size 420 MB SUNW,hme0 : Internal Transceiver Selected. SUNW,hme0 : Auto-Negotiated 100 Mbps Half-Duplex Link Up The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t0d0s5: is clean. /dev/rdsk/c0t0d0s7: is clean. /dev/rdsk/c0t0d0s6: is clean. Starting IPv6 neighbor discovery. Setting default IPv6 interface for multicast: add net ff00::/8:\ gateway ultra5 starting rpc services: rpcbind done. Setting default IPv4 interface for multicast: add net 224.0/4: syslog service starting. Print services started. Mar 13 11:04:03 unknown pseudo: pseudo-device: tod0 Mar 13 11:04:03 unknown genunix: tod0 is /pseudo/tod@0 Mar 13 11:04:03 unknown pseudo: pseudo-device: pm0 Mar 13 11:04:03 unknown genunix: pm0 is /pseudo/pm@0 Mar 13 11:04:04 unknown simba: PCI-device: SUNW,m64B@2, m640 Mar 13 11:04:04 unknown genunix: m640 is /pci@1f,0/pci@1,1/SUNW,m64B@2 Mar 13 11:04:04 unknown m64: m64#0: 1152x900, 4M mappable, rev 4750.7c volume management starting. Mar 13 11:04:06 unknown pseudo: pseudo-device: vol0 Mar 13 11:04:06 unknown genunix: vol0 is /pseudo/vol@0 Mar 13 11:04:07 unknown scsi: sd0 at uata0: target 2 lun 0 Mar 13 11:04:07 unknown genunix: sd0 is /pci@1f,0/pci@1,1/ide@3/sd@2,0 Mar 13 11:04:09 unknown ebus: fd0 at ebus0: offset 14,3023f0 Mar 13 11:04:09 unknown genunix: fd0 is /pci@1f,0/pci@1,1/ebus@1/ fdthree@14,\ 3023f0 Mar 13 11:04:15 unknown snmpdx: The system is ready. ultra5 console login:
If you are not at the system console to watch the boot information, you can use the Unix dmesg command to redisplay information that was displayed during the boot process, or you can view the information in the /var/adm/messages file. The dmesg command displays the contents of a fixed-size buffer. Therefore, if the system has been up for a long time, the initial boot messages may have been overwritten with other kernel log entries.
To view messages displayed during the boot process, you can use one of the following methods:
When you specify an explicit device alias, such as disk3, with the boot command, the machine starts up from the specified startup device, using no startup arguments. Here's an example:
In this case, the system boots from the disk drive defined by the device alias named disk3. It then loads kernel/unix as the default standalone startup program.
Various options affect the behavior of the boot command. You use the following syntax to specify any of the options listed in Table 3.20 with the boot command: :
When you specify options with the boot command, the machine starts up from the default startup device. Here's an example:
Viewing dmesg Output Several pages of information are displayed when you use this method, so I recommend that you pipe the dmesg command to more, as shown here: /usr/sbin/dmesg|more.
The –a option instructs the boot command to ask for the name of the standalone program to load. If you specify kernel/unix, which is the default, you are prompted to enter the directory that contains the kernel modules. (See the section "The Kernel," later in this chapter, for details on kernel modules.)
You can mix options and arguments with the boot command by using the following syntax:
boot <OBP-name> <options>
When you specify the boot command with an explicit startup device and option, the machine starts up from the specified device using the specified option. Here's an example:
boot disk3 –a
This gives the same prompts as the previous example, except that you are specifying the boot device and not using the default boot device. The system starts up the bootblock from the disk drive defined by the device alias named disk3.
During the startup process, OpenBoot performs the following tasks:
The program that is loaded and executed by the startup process is a secondary boot program, the purpose of which is to load the standalone program. The second-level program is either ufsboot, when you're starting up from a disk, or inetboot, when you're starting up from the network.
If you're starting up from disk, the bootstrap process consists of two conceptually distinct phases: primary startup and secondary startup. The PROM assumes that the program for the primary startup (bootblk) is in the primary bootblock, which resides in sectors 1 through 15 of the startup device. The bootblock is created by using the installboot command. The software installation process typically installs the bootblock for you, so you don't need to issue this command unless you're recovering a corrupted bootblock.
To install a bootblock on disk c0t3d0s0, for example, you type the following:
installboot /usr/platform/'uname -i'/lib/fs/ufs/bootblk \ /dev/rdsk/c0t3d0s0
You can never see the bootblock. It resides in a protected area of the disk that cannot be viewed. The program in the bootblock area loads the secondary startup program, ufsboot.
When you're executing the boot command, if you specify a filename, that filename is the name of the standalone startup program to be loaded. If the pathname is relative (that is, it does not begin with a slash), ufsboot looks for the program in a platform-dependent search path. In other words, the relative path to the standalone program is prefixed with /platform/<platform-name>, where <platform-name> is specific to your hardware.
On the other hand, if the path to the filename is absolute, boot uses the specified path. The startup program then loads the standalone program and transfers control to it.
The following example shows how to specify the standalone startup program from the OpenBoot ok prompt:
ok boot disk5 kernel/unix –s
In this example, the PROM looks for the primary boot program (bootblk) on disk5 (/pci@1f,0/pci@1,1/ide@3/disk@5,0). The primary startup program then loads ufsboot. ufsboot loads the standalone startup program named /platform/SUNW,Ultra-5_10/kernel/ unix, using the -s flag. Typical secondary startup programs, such as kernel/unix, accept arguments of the form <filename> -<flags>, where filename is the path to the standalone program and -<flags> is a list of options to be passed to the standalone program. The example starts up the operating system kernel, which is described in the next section. The -s flag instructs the kernel to start up in single-user mode.
Determining Your System's Platform Name You can use the uname -i command to determine your system's platform name. For example, on a Sun Ultra 5, the path is /platform/SUNW,Ultra-5_10. You use the command uname -m to find the hardware classname of a system; for an Ultra 5, the hardware classname is sun4u.Don't Do This on a Production System! Because some of the steps involved in the following exercises could render a system unbootable if they're not performed properly, you should not perform these exercises on a production system.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.
ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least
Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.
Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info|
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: September 12, 2017