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