引导和关闭 Oracle® Solaris 11.2 系统

退出打印视图

更新时间: 2014 年 7 月
 
 

x86: 如何从 GRUB 菜单删除引导项

使用 bootadm 命令的 remove-entry 子命令从 GRUB 菜单删除指定项或以逗号分隔的项列表。如果指定带有同一标题的多个项,则会删除带有此标题的所有项。

  1. 承担 root 角色。

    请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限

  2. (u53ef选)列出当前引导项。
    # bootadm list-menu
  3. 从 GRUB 菜单删除指定项。
    # bootadm remove-entry [-P pool] [{entry-title [,entry-title...] |
    	-i entry-number[,entry-number...]}
  4. 验证是否已删除此项。
    # bootadm list-menu

    注 - 如果未看到更改,请检查 grub.cfg 文件以确认进行了更改。
示例 2-9  x86: 从 GRUB 菜单删除引导项

以下示例显示了从 GRUB 菜单删除项编号 2 的操作。

# bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 30
0 Oracle Solaris 11/11
1 Oracle Solaris 11.2
2 Oracle Solaris 11_test
bootadm remove-entry -i 2
1 entry removed
# bootadm list-menu
The location of the boot loader configuration file is /rpool/boot/grub
default 2
console graphics
timeout 30
0 Oracle Solaris 11/11
1 Oracle Solaris 11.2