man-pages/man4/hd.4.html
2021-03-31 01:06:50 +01:00

133 lines
3.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of HD</TITLE>
</HEAD><BODY>
<H1>HD</H1>
Section: Linux Programmer's Manual (4)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
hd - MFM/IDE hard disk devices
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>hd*</B>
devices are block devices to access MFM/IDE hard disk drives
in raw mode.
The master drive on the primary IDE controller (major device
number 3) is
<B>hda</B>;
the slave drive is
<B>hdb</B>.
The master drive of the second controller (major device number 22)
is
<B>hdc</B>
and the slave is
<B>hdd</B>.
<P>
General IDE block device names have the form
<B>hd</B><I>X</I>, or
<B>hd</B><I>XP</I>, where
<I>X</I>
is a letter denoting the physical drive, and
<I>P</I>
is a number denoting the partition on that physical drive.
The first form,
<B>hd</B><I>X</I>, is used to address the whole drive.
Partition numbers are assigned in the order the partitions
are discovered, and only nonempty, nonextended partitions
get a number.
However, partition numbers 1-4 are given to the
four partitions described in the MBR (the &quot;primary&quot; partitions),
regardless of whether they are unused or extended.
Thus, the first logical partition will be
<B>hd</B><I>X</I><B>5</B>.
Both DOS-type partitioning and BSD-disklabel partitioning are supported.
You can have at most 63 partitions on an IDE disk.
<P>
For example,
<I>/dev/hda</I>
refers to all of the first IDE drive in the system; and
<I>/dev/hdb3</I>
refers to the third DOS &quot;primary&quot; partition on the second one.
<P>
They are typically created by:
<P>
mknod -m 660 /dev/hda b 3 0
mknod -m 660 /dev/hda1 b 3 1
mknod -m 660 /dev/hda2 b 3 2
...
mknod -m 660 /dev/hda8 b 3 8
mknod -m 660 /dev/hdb b 3 64
mknod -m 660 /dev/hdb1 b 3 65
mknod -m 660 /dev/hdb2 b 3 66
...
mknod -m 660 /dev/hdb8 b 3 72
chown root:disk /dev/hd*
<A NAME="lbAD">&nbsp;</A>
<H2>FILES</H2>
<I>/dev/hd*</I>
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+chown">chown</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+mknod">mknod</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?4+sd">sd</A></B>(4),
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8)
<A NAME="lbAF">&nbsp;</A>
<H2>COLOPHON</H2>
This page is part of release 5.05 of the Linux
<I>man-pages</I>
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT id="3"><A HREF="#lbAD">FILES</A><DD>
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
<DT id="5"><A HREF="#lbAF">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:01 GMT, March 31, 2021
</BODY>
</HTML>