GRUB consists of the following functional components:
stage1 – Is an image that is installed on the first sector of the Solaris fdisk partition. You can optionally install stage1 on the master boot sector by specifying the -m option with the installgrub command. See the installgrub(1M) man page and Disk Management in the GRUB Boot Environment in System Administration Guide: Devices and File Systems for more information.
stage2 – Is an image that is installed in a reserved area in the Solaris fdisk partition. The stage2 image is the core image of GRUB.
menu.lst file – Is typically located in the /boot/grub directory on systems with a UFS root and in the /pool-name/boot/grub directory on systems with a ZFS root. This file is read by the GRUB stage2 file. For more information, see the section, x86: Modifying Boot Behavior by Editing the menu.lst File.
You cannot use the dd command to write stage1 and stage2 images to disk. The stage1 image must be able to receive information about the location of the stage2 image that is on the disk. Use the installgrub command, which is the supported method for installing GRUB boot blocks.
GRUB uses conventions that are slightly different from previous Solaris releases. Understanding the GRUB device-naming conventions can assist you in correctly specifying drive and partition information when you configure GRUB on your system.
The following table describes the GRUB device-naming conventions for this Solaris release.
Table 15–1 Conventions for GRUB Devices
Device Name |
Description |
---|---|
(fd0) |
First diskette |
(fd1) |
Second diskette |
(nd) |
Network device |
(hd0,0) |
First fdisk partition on first hard disk |
(hd0,1) |
Second fdisk partition on first hard disk |
(hd0,0,a), |
Slice a on first fdisk partition on first hard disk |
(hd0,0,b) |
Slice b on first fdisk partition on first hard disk |
All GRUB device names must be enclosed in parentheses.
For more information about fdisk partitions, see Guidelines for Creating an fdisk Partition in System Administration Guide: Devices and File Systems.
Starting with the Solaris 10 10/08 release, the findroot command replaces the root command that was previously used by GRUB. The findroot command provides enhanced capabilities for discovering a targeted disk, regardless of the boot device. The findroot command also supports booting from a ZFS root file system This command replaces the root command that was formerly used by GRUB.
The following is a description of the device naming convention that is used by the findroot command for various GRUB implementations:
Solaris Live Upgrade:
findroot (BE_x,0,a) |
The x variable is the name of the boot environment.
Standard system upgrades and new installations for systems with ZFS support:
findroot(pool_p,0,a) |
The p variable is the name of the root pool.
Standard system upgrades and new installations for systems with UFS support:
findroot (rootfsN,0,a) |
The N variable is an integer number that starts at 0.