Linux Grub (II). Grub notations

We already saw what is Linux Grub and how does it work.

GRUB has its own notation, which is very similar, although somewhat different from the general notation that a typical user of Linux.

Linux Grub

This would be an example of a GRUB entry usual:


Brackets are a must, all devices listed in the menu of GRUB they must be enclosed in parentheses.

hd means hard drive, fd represents a floppy disk, cd represents the CD-ROM drive, etc.

The first number refers to the physical hard drive number, in this case the first drive, as they are counted from zero up. For example, hd2 refers to the third physical hard drive.

The second number refers to the partition number of the selected hard drive, again the partitions are counted from zero upwards. In this case, a synonym for the second partition.

From here, it is evident that the GRUB (menu) does not discriminate between IDE or SCSI disks or primary or logical partitions. The task of deciding which hard drive or partition to boot leaves to BIOS and Stage 1.

The meaning of the notation is very simple.

Primary partitions will be scored from 0 to 3 (hd ?, 0), (hd ?, 1), (hd ?, 2), (hd ?, 3). The logical partitions in the extended partition are counted between 4 and regardless of the actual number of partitions on the hard disk, for example (hd1, 7).

The entries are not enough to boot an operating system though.

GRUB also needs to know the operating system images to load. This is assigned as parameters for each of the called devices, including special marks (switches). For example, Windows Safe Mode is a special brand. Example 2:

default 0

timeout 8

The first line (by default 0) means that the first operating system in the list is started. The second line (timeout of 8) indicates how long (in seconds) the user has to make their choice before the default input is loaded.

The content of the article adheres to our principles of editorial ethics. To report an error click here.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.