在需要指定备用内核或备用 /etc/system 文件时,请使用此过程引导系统。
在使用 boot a 命令交互式引导基于 x86 的系统时,如要指定备用的 -/etc/system 文件,请执行以下步骤:
1. 创建 /etc/system 和 boot/solaris/filelist.ramdisk 文件的备份副本。
# cp /etc/system /etc/system.bak # cp /boot/solaris/filelist.ramdisk /boot/solaris/filelist.ramdisk.orig |
2. 将 etc/system.bak 文件名添加到 /boot/solaris/filelist.ramdisk 文件。
# echo "etc/system.bak" >> /boot/solaris/filelist.ramdisk |
3. 更新引导归档文件。
# bootadm update-archive -v |
重新引导系统。
# reboot |
如果系统显示 Press any key to reboot 提示,请按任意键以重新引导系统。
在出现此提示时,您还可以使用“重置”按钮。如果系统已关闭,请使用电源开关打开系统。
引导序列开始时,将显示 GRUB 主菜单。
要访问 GRUB 编辑菜单,请键入 e。
使用方向键选择 kernel 或 kernel$ 行。
键入 e 以编辑引导项行。
键入 -a 交互式引导系统,然后按回车键返回至上一菜单。
要交互式地引导系统,请键入 b。
键入模块的缺省目录,或按 Enter 键接受缺省目录。
Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]: |
键入备用的系统文件名 alternate-file。
Name of system file [etc/system]: /etc/system.bak |
在不提供备用文件的情况下按 Enter 键可接受缺省名称。
修复损坏的 /etc/system 文件。
将系统重新引导至运行级别 3。
# reboot syncing file systems... done rebooting... GNU GRUB version 0.95 (637K lower / 2096064K upper memory) =================================================== Solaris 10 10/08 s10x_u6wos_03 X86 Solaris failsafe ===================================================== Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line. ===================================================== GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ===================================================== findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive ====================================================== Use the and keys to select which entry is highlighted. Press 'b' to boot, 'e' to edit the selected command in the boot sequence, 'c' for a command-line, 'o' to open a new line after ('O' for before) the selected line, 'd' to remove the selected line, or escape to go back to the main menu. [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits. ] grub edit> kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -a GNU GRUB version 0.95 (637K lower / 2096064K upper memory) =================================================== findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -a module /platform/i86pc/boot_archive ==================================================== . . . Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]: Name of system file [/etc/system]: /etc/system.bak SunOS Release 5.10 Version Generic_137138-04 32-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: pups NIS domain name is ....sfbay.sun.com Reading ZFS config: done. Mounting ZFS filesystems: (5/5) pups console login: |