Booting and Shutting Down Oracle® Solaris 11.2 Systems

Exit Print View

Updated: July 2014
 
 

x86: GRUB 2 Partition and Device Naming Scheme

If you are familiar with how device naming for GRUB Legacy works, you need to be aware of the differences between the GRUB Legacy naming scheme and the GRUB 2 naming scheme. While GRUB Legacy implements a 0-based naming scheme for partition indexes, GRUB 2 uses a 1-based naming scheme for partition indexes.

The GRUB 2 device naming scheme uses the following format:

(hdX, part-typeY, part-typeZ, ...)

Because partition schemes can be nested, GRUB's device naming scheme has been changed to support arbitrary nesting levels. GRUB accepts either the old-style device naming (“(hd0,1)”) or the new-style device naming that includes the partition scheme name. For example:

(hd0, gpt1)

The previous example refers to the first GPT partition on the first disk.


Note - Only the GRUB partition numbering has changed, not disk numbering. Disk numbers remain 0-based.

Because GRUB 2 relies on file system UUIDs (or labels) and a built-in search command for automatically locating the proper device or partition name, you are not required to manually specify device names. The following table provides examples of the partition indexes and device names that GRUB uses.

Table 2-1  GRUB 2 Partition and Device Naming Scheme
Device Name
Description
Notes
(hd0, msdos1)
Specifies the first DOS partition on the first disk.
(hd0, gpt2)
Specifies the second GPT partition on the disk.
This is an example of the prototypical partition where the current release would be installed.
(hd0, msdos1, sunpc1)
Specifies the first VTOC slice in the Oracle Solaris partition that is stored in the first DOS partition on the first disk.
This is an example of the prototypical partition where versions of Oracle Solaris prior to this release would be installed.

If you need to determine which partition number refers to a partition that interests you, access the GRUB command-line interpreter by pressing the C key (or Control-C, if you are editing a menu entry). Then, run the ls command to list all of the partitions that GRUB can identify, which is similar to the following figure.

image:Figure of the GRUB 2 command interpreter screen where information about devices can be retrieved.

The –l option to the ls command displays more detailed information about each partition, including file system and file system UUID information, which is similar to the following figure.

image:Figure of GRUB 2 command interpreter screen showing command output displaying devices that GRUB has identified.

Note - GRUB counts the drive numbers from zero, regardless of their type and does not distinguish between Integrated Drive Electronics (IDE) and Small Computer Systems Interface (SCSI) devices.