Booting and Shutting Down Oracle® Solaris 11.2 Systems

Exit Print View

Updated: July 2014
 
 

x86: GRUB 2 and GRUB Legacy Task Comparison

Although GRUB 2 shares several characteristics with GRUB Legacy, because GRUB 2 does not use a menu.lst file, many boot administration tasks are performed differently on systems that support GRUB 2. For example, you manage the GRUB menu and perform various boot loader administrative tasks by using new subcommands of the bootadm command.

A new –P pool argument is available for most of the bootadm subcommands. This option enables you to view or make changes to the GRUB menu and boot entries for a particular root pool. If you are running an operating system that supports GRUB Legacy, the –P option might not be available for these bootadm subcommands.

For example, you would list the GRUB menu for a specific root pool, as follows:

# bootadm list-menu -P pool-name

The following table compares some common GRUB 2 tasks and commands to the GRUB Legacy equivalent. For detailed instructions, see the bootadm(1M) man page and Administering the GRUB Configuration by Using the bootadm Command.

Table 2-2  GRUB 2 Tasks Compared to GRUB Legacy Tasks
Task or Command
GRUB 2 Method
GRUB Legacy Method
List the current boot entries in the GRUB menu.
bootadm list-menu
You can also view individual entries by the entry number or by title. To view an entry by title:
bootadm list-menu entry-title
If the title has spaces, quotation marks must be used to protect the title from being parsed as multiple arguments. For example:
bootadm list-menu `This is a menu entry with a title'
To view an entry by its entry number:
bootadm list-menu –i entry-number
bootadm list-menu
Generate a new GRUB configuration file (grub.cfg) that contains the default boot loader settings and one menu entry for each Oracle Solaris boot environment on each root pool on the system.
bootadm generate-menu
If there is an existing grub.cfg file on the system, use the –f option with the generate-menu subcommand. This syntax destroys the existing GRUB 2 configuration and replaces it with the new configuration.
If you use the –P option to generate a new GRUB 2 configuration file for a specific root pool on the system, note that the grub.cfg file that is generated is stored in the top-level ZFS dataset for that root pool.
Manually edit the menu.lst file to add the new information.
Add a new entry to the GRUB menu.
To add an entry by specifying its entry number:
bootadm add-entry –i entry-number
To add an entry by specifying its title:
bootadm add-entry entry-title
Manually add the entry to the menu.lst file.
Change an entry in the GRUB menu.
To change an entry by specifying its entry number:
bootadm change-entry –i entry-numberkey=value
To change an entry by specifying its title:
bootadm change-entry entry-title key=value
If the title has spaces, quotation marks must be used to protect the title from being parsed as multiple arguments.
This subcommand is used to make changes to an individual boot entry, for example, to specify the Oracle Solaris console device as a kernel argument. If the entry title matches multiple menu entries, only the first entry is modified.
A boot entry can also be changed by editing the GRUB menu at boot time, just as was done in previous releases with a GRUB Legacy entry.
Manually edit the menu.lst file to make persistent changes.
As an alternative, edit the GRUB menu at boot time to make changes to the boot entry that persist just until the next time the system is booted.
Remove an entry from the GRUB menu.
To remove an entry by specifying its entry number:
bootadm remove-entry –i entry-number
To remove an entry by specifying its title:
bootadm remove-entry entry-title
If a title is specified, all of the entries with that title are removed.
Manually remove the entry from the menu.lst file.
Manage the GRUB menu. For example, set the default GRUB menu entry from which to boot.
bootadm set-menu key=value
bootadm set-menu
Add custom menu entries to the GRUB menu, for example, a Linux entry.
Add the entry to the custom.cfg file, making sure to use the proper GRUB 2 configuration file syntax. See Customizing the GRUB Configuration.

Note - You must create this file first.

Add the information to the menu.lst file after installing Oracle Solaris.
Edit the GRUB menu at boot time to add boot arguments.
1. Interrupt the boot process by using the arrow keys to select the desired menu entry, then type e.
2. Add boot arguments to the end of the $multiboot line for the specified boot entry.
3. Press Control-X to boot from the modified entry. If the system console is on a serial device, F10 might not be properly recognized on a UEFI system. In that case, use Control-X.

Note - Pressing the Escape key while editing a menu entry returns you to the menu entry list, and all edits are discarded.

1. Interrupt the boot process by typing e.
2. Add the boot arguments to the end of the kernel$ line for the specified boot entry.
3. Press Return, then type b to boot the system.
Install the boot loader program.
bootadm install-bootloader
This command installs the boot loader on all of the devices in a mirrored root pool automatically.
installgrub for x86 based systems and installboot for SPARC based systems.
Create boot partitions for either UEFI or BIOS firmware.
Use the new –B option of the zpool create command to automatically create the firmware-appropriate boot partition, and the ZFS data partition into which the new ZFS pool will be stored, at the same time.
Attaching a disk to a root pool automatically creates the proper boot partitions and installs the boot loader on that disk. See Chapter 4, Managing ZFS Root Pool Components, in Managing ZFS File Systems in Oracle Solaris 11.2 .
GRUB Legacy supports systems with BIOS firmware only and therefore does not require a separate boot partition.