If a system is turned off, turning it on starts the multiuser boot sequence. The following procedures show how to boot to different run levels from the
ok PROM prompt. These procedures assume that the system has been cleanly shut down, unless stated otherwise.
Use the who -r command to verify that the system is brought to the specified run level. For a description of run levels, see Chapter 14, Managing Services (Overview).
How to Boot a System to Run Level 3 (Multiuser Level)
Use this procedure to boot a system that is currently at run level 0 to run level 3.
- Boot the system to run level 3.
ok boot
The automatic boot procedure displays a series of startup messages, and brings the system to run level 3. For more information, see the boot ( 1M ) man page. - Verify that the system has booted to run level 3.
The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 10.3. Booting a System to Run Level 3 (Multiuser Level)
The following example displays the messages from booting a system to run level 3.ok boot Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz) OpenBoot 3.15, 128 MB memory installed, Serial #number. Ethernet address number, Host ID: number. Rebooting with command: boot Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a File and args: kernel/sparcv9/unix SunOS Release 5.10 Version s10_60 64-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. configuring IPv4 interfaces: hme0. add net default: gateway 172.20.27.248 Hostname: starlite The system is coming up. Please wait. NIS domain name is example.com starting rpc services: rpcbind keyserv ypbind done. Setting netmask of hme0 to 255.255.255.0 Setting default IPv4 interface for multicast: add net 224.0/4: gateway starlite syslog service starting.The system is ready. Starting Sun(TM) Web Console Version 2.1-dev.. volume management starting. The system is ready. starlite console login:In the preceding example, sparcv9 was used as an example only. This string matches the output of the isainfo
k command.
How to Boot a System to Run Level S (Single-User Level)
Use this procedure to boot a system that is currently at run level 0 to run level S. This run level is used for system maintenance tasks, such as backing up a file system.
- Boot the system to run level S.
ok boot -s
- Type the superuser password when the following message is displayed:
SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx
- Verify that the system is at run level S.
# who -r . run-level S Jun 10 15:27 3 0
- Perform the maintenance task that required the run level change to S.
- After you complete the system maintenance task, type Control-D to bring the system to the multiuser state.
Example 10.4. Booting a System to Run Level S (Single-User Level)
The following example displays the messages from booting a system to run level S.ok boot -s . . . Sun Microsystems Inc. SunOS 5.10 Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. configuring IPv4 interfaces: hme0. Hostname: starlite SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx single-user privilege assigned to /dev/console. Entering System Maintenance Mode Oct 14 15:01:28 su: 'su root' succeeded for root on /dev/console Sun Microsystems Inc. SunOS 5.10 # who -r . run-level S Sep 19 08:49 S 0 ? (Perform some maintenance task) # ^D
How to Boot a System Interactively
Use this boot option when you need to specify an alternate kernel or
/etc/system file.- Boot the system interactively.
ok boot -a
- Answer the following system prompts:
- When prompted, enter the name of the kernel to use for booting.
Press enter to use the default kernel file name. Otherwise, provide the name of an alternate kernel, press Enter. - When prompted, provide an alternate path for the
modulesdirectories.
Press enter to use the default module directories. Otherwise, provide the alternate paths to module directories, press Enter. - When prompted, provide the name of an alternate system file.
Type/dev/nullif your/etc/systemfile has been damaged. - When prompted, enter the
rootfilesystem type.
Press enter to select UFS for local disk booting, which is the default, or enterNFSfor network booting. - When prompted, enter the physical name of
rootdevice.
Provide an alternate device name or press return to use the default.
- When prompted, enter the name of the kernel to use for booting.
- If you are not prompted to answer these questions, verify that you typed the boot
acommand correctly.
Example 10.5. Booting a System Interactively
In the following example, the default choices (shown in square brackets []) are accepted.ok boot -a
.
.
.
Rebooting with command: 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]: Press Return
Enter default directory for modules [/platform/SUNW,Ultra-5_10/kernel
/platform/sun4u/kernel /kernel /usr/kernel]: Press Return
Name of system file [etc/system]: Press Return
SunOS Release 5.10 Version S10_60 64-bit
Copyright (c) 1983-2004 by Sun Microsystems, Inc. All rights reserved
Use is subject to license terms.
root filesystem type [ufs]: Press Return
Enter physical name of root device
[/pci@1f,0/pci@1,1/ide@3/disk@0,0:a]: Press Return
configuring IPv4 interfaces: hme0.
Hostname: starlite
The system is coming up. Please wait.
checking ufs filesystems
.
.
.
The system is ready.
starlite console login:
How to Boot a System From the Network
Any system can boot from the network if a boot server is available. You might want to boot a stand-alone system from the network if the system cannot boot from the local disk. For information on changing or resetting the default boot device, see How to Change the Default Boot Device.
Two network configuration boot strategies are available on sun–4u systems:
The default network boot strategy is set to RARP. You can use either protocol, depending on whether a RARP boot server or a DHCP boot server is available on your network.
If both protocols are available, you can temporarily specify which protocol to use in the boot command. Or, you can save the network boot strategy across system reboots at the PROM level by setting up an NVRAM alias. The following example uses the nvalias command to set up a network device alias for booting DHCP by default on a Sun Ultra 10 system.
Two network configuration boot strategies are available on sun–4u systems:
- RARP – Reverse Address Resolution Protocol and ONC+ RPC Bootparams Protocol
- DHCP – Dynamic Host Configuration Protocol
Note
Sun Ultra systems must have PROM version 3.25.nn or later to use the DHCP network boot strategy. For information on determining your PROM version, see How to Find the PROM Revision Number for a System.ok nvalias net /pci@1f,4000/network@1,1:dhcpAs a result, when you type boot net, the system boots by using the DHCP network book strategy.
Note
You should not use the nvalias command to modify theNVRAMRC file, unless you are very familiar with the syntax of this command and the nvunalias command. For information on using these commands, see the OpenBoot 3.x Command Reference Manual.
You must have already set up a RARP or DHCP boot server in your network to use either protocol to boot successfully.
- If necessary, shut down the system.
- Determine the method for booting from the network, and select one of the following:
- Boot the system from the network by using the DHCP strategy.
ok boot net[:dhcp]
If you have changed the PROM setting to boot DHCP by default, as in the preceding nvalias example, you only have to specify boot net. - Boot the system from the network by using the RARP strategy.
ok boot net[:rarp]
Because RARP is the default network boot strategy, you only have to specify boot net:rarp if you have changed the PROM value to boot DHCP.
- Boot the system from the network by using the DHCP strategy.
How to Stop the System for Recovery Purposes
- Type the Stop key sequence for your system.
The monitor displays theokPROM prompt.
ok
The specific Stop key sequence depends on your keyboard type. For example, you can press Stop-A or L1-A. On terminals, press the Break key. - Synchronize the file systems.
ok sync
- When you see the
syncing file systems...message, press the Stop key sequence again. - Type the appropriate boot command to start the boot process.
For more information, see the boot ( 1M ) man page. - Verify that the system was booted to the specified run level.
# who -r . run-level 3 May 2 07:39 3 0 S
How to Boot a System for Recovery Purposes
Use this procedure when an important file, such as
Use the stop sequence described in this procedure if you do not know the
Substitute the device name of the file system to be repaired for the
/etc/passwd, has an invalid entry and causes the boot process to fail.Use the stop sequence described in this procedure if you do not know the
root password or if you can't log in to the system. For more information, see How to Stop the System for Recovery Purposes.Substitute the device name of the file system to be repaired for the
device-name variable in the following procedure. If you need help identifying a system's device names, refer to Displaying Device Configuration Information in System Administration Guide: Devices and File Systems .- Stop the system by using the system's Stop key sequence.
- Boot the system in single-user mode.
- Boot the system from the Solaris Software 1 CD or DVD,
- Insert the Solaris installation media into the drive.
- Boot from the installation media in single-user mode.
ok boot cdrom -s
- Boot the system from the network if an installation server or remote CD or DVD drive is not available.
ok boot net -s
- Boot the system from the Solaris Software 1 CD or DVD,
- Mount the file system that contains the file with an invalid entry.
# mount /dev/dsk/ device-name /a
- Change to the newly mounted file system.
# cd /a/ file-system
- Set the terminal type.
# TERM= sun # export TERM
- Remove the invalid entry from the file by using an editor.
# vi filename
- Change to the root (
/) directory.
# cd /
- Unmount the
/adirectory.
# umount /a
- Reboot the system.
# init 6
- Verify that the system booted to run level 3.
The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 10.7. Booting a System for Recovery Purposes (Damaged Password File)
The following example shows how to repair an important system file (in this case, /etc/passwd) after booting from a local CD-ROM.ok boot cdrom -s # mount /dev/dsk/c0t3d0s0 /a # cd /a/etc # TERM=vt100 # export TERM # vi passwd (Remove invalid entry) # cd / # umount /a # init 6
Example 10.8. Booting a System if You Forgot the
The following example shows how to boot the system from the network when you have forgotten the root Passwordroot password. This example assumes that the network boot server is already available. Be sure to apply a new root password after the system has rebooted.ok boot net -s # mount /dev/dsk/c0t3d0s0 /a # cd /a/etc # TERM=vt100 # export TERM # vi shadow (Remove root's encrypted password string) # cd / # umount /a # init 6
Forcing a crash dump and rebooting the system is sometimes necessary for troubleshooting purposes. The savecore feature is enabled by default.
For more information on system crash dumps, see Chapter 24, Managing System Crash Information (Tasks), in System Administration Guide: Advanced Administration .
For more information on system crash dumps, see Chapter 24, Managing System Crash Information (Tasks), in System Administration Guide: Advanced Administration .
How to Force a Crash Dump and Reboot of the System
Use this procedure to force a crash dump of the system. The example that follows this procedure shows how to use the halt
d command to force a crash dump of the system. You will need to manually reboot the system after running this command.- Type the stop key sequence for your system.
The specific stop key sequence depends on your keyboard type. For example, you can press Stop-A or L1-A. On terminals, press the Break key.
The PROM displays theokprompt. - Synchronize the file systems and write the crash dump.
> n ok sync
After the crash dump is written to disk, the system will continue to reboot. - Verify the system boots to run level 3.
The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 10.9. Forcing a Crash Dump and Reboot of the System by Using the halt
This example shows how to force a crash dump and reboot of the system d Commandjupiter by using the halt d and boot command. Use this method to force a crash dump and reboot of the system.# halt -d Jul 21 14:13:37 jupiter halt: halted by root panic[cpu0]/thread=30001193b20: forced crash dump initiated at user request 000002a1008f7860 genunix:kadmin+438 (b4, 0, 0, 0, 5, 0) %l0-3: 0000000000000000 0000000000000000 0000000000000004 0000000000000004 %l4-7: 00000000000003cc 0000000000000010 0000000000000004 0000000000000004 000002a1008f7920 genunix:uadmin+110 (5, 0, 0, 6d7000, ff00, 4) %l0-3: 0000030002216938 0000000000000000 0000000000000001 0000004237922872 %l4-7: 000000423791e770 0000000000004102 0000030000449308 0000000000000005 syncing file systems... 1 1 done dumping to /dev/dsk/c0t0d0s1, offset 107413504, content: kernel 100% done: 5339 pages dumped, compression ratio 2.68, dump succeeded Program terminated ok boot Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard OpenBoot 3.15, 128 MB memory installed, Serial #10933339. Ethernet address 8:0:20:a6:d4:5b, Host ID: 80a6d45b. Rebooting with command: boot Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a File and args: kernel/sparcv9/unix SunOS Release 5.10 Version s10_60 64-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. configuring IPv4 interfaces: hme0. add net default: gateway 172.20.27.248 Hostname: jupiter The system is coming up. Please wait. NIS domain name is example.com . . . System dump time: Wed Jul 21 14:13:41 2004 Jul 21 14:15:23 jupiter savecore: saving system crash dump in /var/crash/jupiter/*.0 Constructing namelist /var/crash/jupiter/unix.0 Constructing corefile /var/crash/jupiter/vmcore.0 100% done: 5339 of 5339 pages saved Starting Sun(TM) Web Console Version 2.1-dev... . . .
How to Boot the System With the Kernel Debugger (kmdb)
This procedure shows you the basics for loading the kernel debugger (kmdb). For more detailed information, see the Solaris Modular Debugger Guide.
- Halt the system, causing it to display the
okprompt.
To halt the system gracefully, use the /usr/sbin/halt command. - Type either boot kmdb or boot
kto request the loading of the kernel debugger. Press return. - Enter the kernel debugger.
The method used to enter the debugger is dependent upon the type of console that is used to access the system:
A welcome message is displayed when you enter the kernel debugger for the first time.- If a locally attached keyboard is being used, press Stop-A or L1–A, depending upon the type of keyboard.
- If a serial console is being used, send a break by using the method that is appropriate for the type of serial console that is being used.
Rebooting with command: kadb Boot device: /iommu/sbus/espdma@4,800000/esp@4,8800000/sd@3,0 . . .
Example 10.10. Booting the System With the Kernel Debugger (kmdb)
ok boot kmdb Resetting... Executing last command: boot kmdb -d Boot device: /pci@1f,0/ide@d/disk@0,0:a File and args: kmdb -d Loading kmdb...
https://docs.huihoo.com/opensolaris/system-administration-guide-basic-administration/html/index.html
Comments
Post a Comment