CompTIA
LX0-103 · Question #112
LX0-103 Question #112: Real Exam Question with Answer & Explanation
The correct answer is D. /dev/hdb5. GRUB numbers hard disks from 0 and partitions from 0, while Linux names disks alphabetically from 'a' and numbers partitions from 1, requiring an offset conversion.
System Architecture
Question
In GRUB's configuration file an administrator finds the following line: root (hd1,4) Which of the following is the corresponding device name on a Linux system?
Options
- A/dev/hda4
- B/dev/hda5
- C/dev/hdb4
- D/dev/hdb5
Explanation
GRUB numbers hard disks from 0 and partitions from 0, while Linux names disks alphabetically from 'a' and numbers partitions from 1, requiring an offset conversion.
Common mistakes.
- A. /dev/hda4 is wrong on both counts - hd0 maps to hda (first disk), and partition 4 in GRUB is partition 5 in Linux.
- B. /dev/hda5 uses the correct partition translation (GRUB 4 to Linux 5) but incorrectly maps hd1 to hda instead of hdb.
- C. /dev/hdb4 correctly maps hd1 to hdb but fails to apply the partition offset, treating GRUB's 0-indexed partition 4 as Linux's partition 4 instead of 5.
Concept tested. GRUB to Linux device naming convention translation
Reference. https://www.gnu.org/software/grub/manual/grub/grub.html#Naming-convention
Topics
#GRUB#bootloader#device naming#partition numbering
Community Discussion
No community discussion yet for this question.