使用此过程将当前处于运行级别 0 的系统引导至运行级别 3。
重新引导系统。
# reboot |
如果系统显示 Press any key to reboot 提示,请按任意键以重新引导系统。
在出现此提示时,您还可以使用“重置”按钮。如果系统已关闭,请使用电源开关打开系统。
引导序列开始时,将显示 GRUB 菜单。
显示 GRUB 菜单时,按 Enter 键引导缺省 OS 实例。
如果在 10 秒内未选择项,系统会自动引导至运行级别 3。
引导过程成功完成后,将显示登录提示。
登录到系统。
hostname console login: |
确认系统已引导至运行级别 3。
# who -r system% who -r . run-level 3 Mar 2 09:44 3 0 S |
# reboot Jul 24 11:29:52 bearskin reboot: rebooted by root syncing file systems... done rebooting... Adaptec AIC-7899 SCSI BIOS v2.57S4 (c) 2000 Adaptec, Inc. All Rights Reserved. Press <Ctrl><A> for SCSISelect(TM) Utility! Ch B, SCSI ID: 0 SEAGATE ST336607LSUN36G 160 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. 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: # who -r . run-level 3 Jul 24 11:31 3 0 S |
使用此过程可将位于运行级别 0 的系统引导至运行级别 S。单用户级别用于执行系统维护。
此过程可用于所有 GRUB 实现。但是,GRUB 主菜单中的引导项随您所运行的 Oracle Solaris 发行版而异。
有关您在引导时可指定的所有内核选项的说明,请参见 x86: 通过在引导时编辑 GRUB 菜单修改引导行为。
重新引导系统。
# reboot |
如果系统显示 Press any key to reboot 提示,请按任意键以重新引导系统。
在出现此提示时,您还可以使用“重置”按钮。如果系统已关闭,请使用电源开关打开系统。
引导序列开始时,将显示 GRUB 菜单。
显示 GRUB 主菜单时,键入 e 以编辑 GRUB 菜单。
根据要运行的版本,使用方向键选择 kernel 或 kernel$ 行。
如果不能使用方向键,请使用插入记号键 (^) 向上滚动,并使用字母 v 键向下滚动。
再次键入 e 以编辑引导项。
在这里,您可以向 kernel 或 kernel$ 行添加选项和参数。
要在单用户模式下引导系统,请在引导条目行的结尾键入 -s,然后按回车键返回至上一屏幕。
要指定其他引导行为,请将 -s 选项替换为适当的引导选项。
可以使用此方式指定以下备用引导行为:
执行重新配置引导
在 32 位模式下引导具备 64 位计算能力的系统
使用内核调试器引导系统
重定向控制台
有关更多信息,请参见 boot(1M) 手册页。
要在单用户模式下引导系统,请键入 b。
出现提示时,键入超级用户口令。
确认系统处于运行级别 S。
# who -r . run-level S Jun 13 11:07 S 0 0 |
执行将运行级别更改为 S 所需的系统维护任务。
完成系统维护任务后,重新引导系统。
# reboot Jul 2 14:30:01 pups reboot: initiated by root on /dev/console syncing files... Press <Ctrl><A> forPSCSISelect(TM) Utility! 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 -s GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ======================================================= findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -s 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. . . . SunOS Release 5.10 Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". Hostname: pups Requesting System Maintenance Mode SINGLE USER MODE Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console. Entering System Maintenance Mode Jul 2 14:41:48 su: 'su root' succeeded for root on /dev/console Sun Microsystems Inc. # who -r who -r . run-level S Jul 2 14:39 S 0 0 # |
在需要指定备用内核或备用 /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: |