使用此过程在故障安全模式下引导基于 SPARC 的系统以更新引导归档文件。如果在更新引导归档文件后系统不引导,您可能需要在单用户模式下引导系统。有关更多信息,请参见SPARC: 如何将系统引导至运行级别 S(单用户级别)。
此过程还说明了在故障安全模式下如何引导指定的 ZFS 数据集。
成为超级用户或同等角色。
角色包含授权和具有一定权限的命令。有关角色的更多信息,请参见 《系统管理指南:安全性服务》中的“配置 RBAC(任务列表)”。
使系统进入 ok 提示符:
# init 0 |
引导故障安全归档文件。
要引导缺省故障安全归档文件,请键入:
ok boot -F failsafe |
要引导特定 ZFS 数据集的故障安全归档文件,请键入:
ok boot -F failsafe -Z dataset |
例如:
ok boot -F failsafe -Z rpool/ROOT/zfsBE2 |
要确定要引导的数据集的名称,请首先使用 boot -L 命令显示系统中可用 BE 的列表。有关更多信息,请参见SPARC: 如何列出 ZFS 根池中可用的可引导数据集。
如果检测到不一致的引导归档文件,将会显示一条消息。
要更新引导归档文件,请键入 y,然后按回车键。
An out of sync boot archive was detected on rpool. The boot archive is a cache of files used during boot and should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?] y |
如果成功更新归档文件,将会显示一条消息:
The boot archive on rpool was updated successfully. |
该示例介绍如何在故障安全模式下引导基于 SPARC 的系统。如果未指定任何设备,则引导缺省引导设备的故障安全归档文件。
ok boot -F failsafe Resetting ... screen not found. Can't open input device. Keyboard not present. Using ttya for input and output. Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard OpenBoot 3.23, 1024 MB memory installed, Serial #13116682. Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a. Rebooting with command: boot -F failsafe Boot device: /pci@1f,4000/scsi@3/disk@1,0:a File and args: -F failsafe SunOS Release 5.10t Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Configuring /dev Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t1d0s0. The boot archive is a cache of files used during boot and should be kept in syncto ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?] y Updating boot archive on /dev/dsk/c0t1d0s0. The boot archive on /dev/dsk/c0t1d0s0 was updated successfully. Solaris 5.10 was found on /dev/dsk/c0t1d0s0. Do you wish to have it mounted read-write on /a? [y,n,?] n Starting shell. # |
此示例介绍如何在故障安全模式下引导 ZFS 数据集。请注意,首先使用 boot -L 命令显示可用引导环境的列表。此命令必须在 ok 提示符下运行。
ok boot -L Rebooting with command: boot -L Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -L 1 zfsBE2 Select environment to boot: [ 1 - 1 ]: 1 To boot the selected entry, invoke: boot [<root-device>] -Z rpool/ROOT/zfsBE2 Program terminated {0} ok Resetting ... screen not found. Can't open input device. Keyboard not present. Using ttya for input and output. Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard OpenBoot 3.23, 1024 MB memory installed, Serial #13116682. Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a. {0} ok boot -F failsafe -Z rpool/ROOT/zfsBE2 Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -F failsafe -Z rpool/ROOT/zfsBE2 SunOS Release 5.10 Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Configuring /dev Searching for installed OS instances... ROOT/zfsBE2 was found on rpool. Do you wish to have it mounted read-write on /a? [y,n,?] y mounting rpool on /a Starting shell. # # # # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT rpool 16.8G 6.26G 10.5G 37% ONLINE /a # # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c0t1d0s0 ONLINE 0 0 0 errors: No known data errors # # df -h Filesystem size used avail capacity Mounted on /ramdisk-root:a 163M 153M 0K 100% / /devices 0K 0K 0K 0% /devices /dev 0K 0K 0K 0% /dev ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 601M 344K 601M 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab swap 602M 1.4M 601M 1% /tmp /tmp/root/etc 602M 1.4M 601M 1% /.tmp_proto/root/etc fd 0K 0K 0K 0% /dev/fd rpool/ROOT/zfsBE2 16G 5.7G 9.8G 37% /a rpool/export 16G 20K 9.8G 1% /a/export rpool/export/home 16G 18K 9.8G 1% /a/export/home rpool 16G 63K 9.8G 1% /a/rpool |