跳过导航链接 | |
退出打印视图 | |
在 SPARC 平台上引导和关闭 Oracle Solaris Oracle Solaris 11 Information Library (简体中文) |
以下过程介绍如何从 ok PROM 提示符下将基于 SPARC 的系统引导至指定状态,也称为运行级别引导。除非另行说明,否则这些过程假设系统已正常关闭。
要确定正在运行的系统的当前运行级别,请使用 who -r 命令。
示例 2-1 确定系统的运行级别
who -r 命令的输出显示有关系统当前运行级别以及之前运行级别的信息。
$ who -r . run-level 3 Dec 13 10:10 3 0 S $
|
如果系统已关闭,则将其打开即可启动多用户引导序列。
使用 who -r 命令验证系统是否已进入指定的运行级别。请参见确定系统的当前运行级别。
使用此过程将当前处于运行级别 0 的基于 SPARC 的系统引导至运行级别 3。
ok boot
自动引导过程会显示一系列启动消息,并使系统进入运行级别 3。有关更多信息,请参见 boot(1M) 手册页。
引导过程成功完成后,将显示登录提示。
hostname console login:
示例 2-2 将系统引导至多用户状态(运行级别 3)
以下示例显示了将系统引导至运行级别 3 时出现的消息。
ok boot Probing system devices Probing memory ChassisSerialNumber FN62030249 Probing I/O buses . . . . OpenBoot 4.30.4.a, 8192 MB memory installed, Serial #51944031. Ethernet address 0:3:ba:18:9a:5f, Host ID: 83189a5f. Rebooting with command: boot Boot device: /pci@1c,600000/scsi@2/disk@0,0:a File and args: SunOS Release 5.11 Version fips_checksum_nightly 64-bit Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. DEBUG enabled misc/forthdebug (455673 bytes) loaded Hardware watchdog enabled Hostname: portia-123 NIS domain name is solaris.us.oracle.com portia-123 console login: NIS domain name is solaris.us.oracle.com
将系统引导至单用户状态用于进行系统维护,如备份文件系统或对其他系统问题进行故障排除。
ok boot -s
SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx
# who -r
示例 2-3 SPARC: 将系统引导至单用户状态(运行级别 S)
以下示例显示了将系统引导至运行级别 S 时出现的消息。
ok boot -s SC Alert: Host System has Reset Enter #. to return to ALOM. cpu Device: pci Device: ebus /ebus@800: serial Device: pci /pci@780: Device 0 Nothing there /pci@7c0: Device 0 pci /pci@7c0/pci@0: Device 4 network network /pci@7c0/pci@0: Device 8 pci /pci@7c0/pci@0/pci@8: Device 1 network network /pci@7c0/pci@0/pci@8: Device 2 scsi tape disk Sun Fire(TM) T1000, No Keyboard Copyright 2008 ... All rights reserved. OpenBoot 4.30.0.build_12***PROTOTYPE BUILD***, 2000 MB memory available, Serial #69312178. Ethernet address 0:14:4f:21:9e:b2, Host ID: 84219eb2. Boot device: /pci@7c0/pci@0/pci@8/scsi@2/disk@0,0:a File and args: zfs-file-system Loading: /platform/SUNW,Sun-Fire-T1000/boot_archive ramdisk-root hsfs-file-system Loading: /platform/SUNW,Sun-Fire-T1000/kernel/sparcv9/unix SunOS Release 5.11 64-bit Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.30.0.build_12***PROTOTYPE BUILD***, 2000 MB memory available, Serial #69312178. Ethernet address 0:14:4f:21:9e:b2, Host ID: 84219eb2. Boot device: /pci@7c0/pci@0/pci@8/scsi@2/disk@0,0:a File and args: zfs-file-system Loading: /platform/SUNW,Sun-Fire-T1000/boot_archive ramdisk-root hsfs-file-system Loading: /platform/SUNW,Sun-Fire-T1000/kernel/sparcv9/unix SunOS Release 5.11 64-bit Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. os-io Hostname: t1000 t1000 console login:
如果在引导过程中需要指定替代内核或 /etc/system 文件,则以交互方式引导系统非常有用。使用以下过程以交互方式引导系统。
要在引导仅具有一个引导环境的基于 SPARC 的系统时指定另一个 /etc/system 文件,可以使用 boot-a 命令以交互方式引导此系统。另外,您还可以通过创建并引导备用引导环境来解决 /etc/system 文件问题。请参见在 SPARC 平台上从 ZFS 引导环境引导。
# cp /etc/system /etc/system.bak # cp /boot/solaris/filelist.ramdisk /boot/solaris/filelist.ramdisk.orig
# echo "etc/system.bak" >> /boot/solaris/filelist.ramdisk
# bootadm update-archive -v
ok boot -a
Name of system file [etc/system]: /etc/system.bak
在不提供任何信息的情况下按回车键将接受系统缺省设置。
示例 2-4 以交互方式引导系统
在以下示例中,接受了缺省选择(显示在方括号 [] 中)。有关使用 boot -a 命令引导替代文件系统的说明和示例,请参见如何以交互方式引导系统。
ok boot -a Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a File and args: -a Name of system file [/etc/system]: SunOS Release 5.11 Version ... 64-bit Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. Retire store [/etc/devices/retire_store] (/dev/null to bypass): root filesystem type [zfs]: Enter physical name of root device [/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a]: Hostname: system1 Mar 11 17:15:20 svc.startd[9]: svc:/system/filesystem/local:default: \ Method "/lib/svc/method/fs-local" failed with exit status 95. system1 console login: NIS domain name is solaris.us.oracle.com NIS domain name is solaris.us.oracle.com system1 console login: