| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 4 |
.\" |
| 5 |
.TH hd 4 2025-09-21 "Linux man-pages 6.18" |
| 6 |
.SH NAME |
| 7 |
hd \- MFM/IDE hard disk devices |
| 8 |
.SH DESCRIPTION |
| 9 |
The |
| 10 |
.B hd* |
| 11 |
devices are block devices to access MFM/IDE hard disk drives |
| 12 |
in raw mode. |
| 13 |
The master drive on the primary IDE controller (major device |
| 14 |
number 3) is |
| 15 |
.BR hda ; |
| 16 |
the slave drive is |
| 17 |
.BR hdb . |
| 18 |
The master drive of the second controller (major device number 22) |
| 19 |
is |
| 20 |
.B hdc |
| 21 |
and the slave is |
| 22 |
.BR hdd . |
| 23 |
.P |
| 24 |
General IDE block device names have the form |
| 25 |
.BI hd X\c |
| 26 |
, or |
| 27 |
.BI hd XP\c |
| 28 |
, where |
| 29 |
.I X |
| 30 |
is a letter denoting the physical drive, and |
| 31 |
.I P |
| 32 |
is a number denoting the partition on that physical drive. |
| 33 |
The first form, |
| 34 |
.BI hd X\c |
| 35 |
, is used to address the whole drive. |
| 36 |
Partition numbers are assigned in the order the partitions are discovered, |
| 37 |
and only nonempty, nonextended partitions get a number. |
| 38 |
However, |
| 39 |
partition numbers 1\[en]4 are given to |
| 40 |
the four partitions described in the MBR |
| 41 |
(the "primary" partitions), |
| 42 |
regardless of whether they are unused or extended. |
| 43 |
Thus, |
| 44 |
the first logical partition will be |
| 45 |
.BI hd X 5\c |
| 46 |
\&. |
| 47 |
Both DOS-type partitioning and BSD-disklabel partitioning are supported. |
| 48 |
You can have at most 63 partitions on an IDE disk. |
| 49 |
.P |
| 50 |
For example, |
| 51 |
.I /dev/hda |
| 52 |
refers to all of the first IDE drive in the system; |
| 53 |
and |
| 54 |
.I /dev/hdb3 |
| 55 |
refers to the third DOS "primary" partition on the second one. |
| 56 |
.P |
| 57 |
They are typically created by: |
| 58 |
.P |
| 59 |
.in +4n |
| 60 |
.EX |
| 61 |
mknod \-m 660 /dev/hda b 3 0 |
| 62 |
mknod \-m 660 /dev/hda1 b 3 1 |
| 63 |
mknod \-m 660 /dev/hda2 b 3 2 |
| 64 |
\&... |
| 65 |
mknod \-m 660 /dev/hda8 b 3 8 |
| 66 |
mknod \-m 660 /dev/hdb b 3 64 |
| 67 |
mknod \-m 660 /dev/hdb1 b 3 65 |
| 68 |
mknod \-m 660 /dev/hdb2 b 3 66 |
| 69 |
\&... |
| 70 |
mknod \-m 660 /dev/hdb8 b 3 72 |
| 71 |
chown root:disk /dev/hd* |
| 72 |
.EE |
| 73 |
.in |
| 74 |
.SH FILES |
| 75 |
.I /dev/hd* |
| 76 |
.SH SEE ALSO |
| 77 |
.BR chown (1), |
| 78 |
.BR mknod (1), |
| 79 |
.BR sd (4), |
| 80 |
.BR mount (8) |