doc/en/handbook/disks/chapter.sgml
Nik Clayton 276c9344d5 Merged in the following changes. This was done by taking diffs between the
tags LINUXDOC_2_DOCBOOK_START and LINUXDOC_2_DOCBOOK from doc/handbook/.

Note that the LINUXDOC_2_DOCBOOK tag is not necessarily at the HEAD of
the file. So some files won't show changes because changes were applied
after I laid down the LINUXDOC_2_DOCBOOK tag.

Not everything was merged. In some cases, URLs had been shortened;

    http://www.freebsd.org/docproj/

becomes

     ../docproj/

This is a mistake, since users browsing the Handbook on their own machine
can't be expected to have links like this work. Of course, for mirrors,
they'll end up pointing back to the main site. For the mean time, do
nothing -- this will need an entity defined to reference the base URL
of the FreeBSD site, individual mirrors can set this as necessary.

Notice how some files (on the left) are merged to the same file (on
the right). This is because the new Handbook file structure is organised
on DocBook chapter lines.

Files with no revision number in the "From" column didn't exist when I
started the conversion.

File                 From  ->  To      Merged to files...
---------------------------------------------------------------
anoncvs.sgml               ->  1.1     cutting-edge/chapter.sgml
authors.sgml         1.93  ->  1.118   authors.ent
backups.sgml               ->  1.4     backups/chapter.sgml
bibliography.sgml    1.33  ->  1.37    bibliography/chapter.sgml
contrib.sgml         1.274 ->  1.312   staff/chapter.sgml
ctm.sgml             1.22  ->  1.23    cutting-edge/chapter.sgml
cvsup.sgml           1.36  ->  1.40    cutting-edge/chapter.sgml
disks.sgml                 ->  1.3     disks/chapter.sgml
eresources.sgml      1.39  ->  1.50    eresources/chapter.sgml
firewalls.sgml       1.19  ->  1.20    security/chapter.sgml
handbook.sgml        1.83  ->  1.91    handbook.sgml
history.sgml         1.24  ->  1.25    introduction/chapter.sgml
install.sgml         1.65  ->  1.67    install/chapter.sgml
isdn.sgml            1.12  ->  1.15    advanced-networking/chapter.sgml
kerberos.sgml        1.12  ->  1.13    security/chapter.sgml
kernelconfig.sgml    1.31  ->  1.32    kernelconfig/chapter.sgml
kerneldebug.sgml     1.17  ->  1.19    kerneldebug/chapter.sgml
linuxemu.sgml        1.22  ->  1.24    linuxemu/chapter.sgml
memoryuse.sgml       1.11  ->  1.12    internals/chapter.sgml
mirrors.sgml         1.80  ->  1.92    mirrors/chapter.sgml
nutshell.sgml        1.14  ->  1.15    introduction/chapter.sgml
pgpkeys.sgml         1.25  ->  1.28    pgpkeys/chapter.sgml
policies.sgml        1.16  ->  1.18    policies/chapter.sgml
porting.sgml         1.93  ->  1.112   contrib/chapter.sgml
ports.sgml           1.29  ->  1.31    ports/chapter.sgml
printing.sgml        1.21  ->  1.22    printing/chapter.sgml
relnotes.sgml        1.24  ->  1.28    introduction/chapter.sgml  [1]
submitters.sgml      1.161 ->  1.246   contrib/chapter.sgml
synching.sgml        1.12  ->  1.13    cutting-edge/chapter.sgml
userppp.sgml         1.28  ->  1.30    ppp-and-slip/chapter.sgml

[1] A chunk of relnotes.sgml is in an IGNORED marked section. Why?

Submitted by:	A bunch (~ 50%) of merging done by Charles A. Wimmer
                (cawimm@FreeBSD.ORG), rest by Nik.
1998-11-12 01:26:39 +00:00

165 lines
7.2 KiB
Text

<chapter id="disks">
<title>Disks</title>
<para><emphasis>Contributed by &a.obrien; 26 April 1998</emphasis></para>
<para>Lets say we want to add a new SCSI disk to a machine that currently
only has a single drive. First turn off the computer and install the
drive in the computer following the instructions of the computer,
controller, and drive manufacturer. Due the wide variations of procedures
to do this, the details are beyond the scope of this document.</para>
<para>Login as user <username>root</username>. After you've installed the
drive, inspect <filename>/var/run/dmesg.boot</filename> to ensure the new
disk was found. Continuing with our example, the newly added drive will be
<filename>sd1</filename> and we want to mount it on
<filename>/1</filename>. (if you are adding an IDE drive substitute
<filename>wd</filename> for <filename>sd</filename>)</para>
<para>Because FreeBSD runs on IBM-PC compatible computers, it must take into
account the PC BIOS partitions. These are different from the traditional
BSD partitions. A PC disk has up to four BIOS partition entries. If the
disk is going to be truly dedicated to FreeBSD, you can use the
<emphasis>dedicated</emphasis> mode. Otherwise, FreeBSD will have to live
with in one of the PC BIOS partitions. FreeBSD calls the PC BIOS
partitions, <emphasis>slices</emphasis> so as not to confuse them with
traditional BSD partitions. You may also use slices on a disk that is
dedicated to FreeBSD, but used in a computer that also has another
operating system installed. This is to not confuse the
<command>fdisk</command> utility of the other operating system.</para>
<para>In the slice case the drive will be added as
<filename>/dev/sd1s1e</filename>. This is read as: SCSI disk, unit number
1 (second SCSI disk), slice 1 (PC BIOS partition 1), and
<filename>e</filename> BSD partition. In the dedicated case, the drive
will be added simply as <filename>/dev/sd1e</filename>.</para>
<sect1>
<title>Using sysinstall</title>
<para> You may use <command>/stand/sysinstall</command> to partition and
label a new disk using its easy to use menus. Either login as user
<username>root</username> or use the <command>su</command> command. Run
<command>/stand/sysinstall</command> and enter the
<literal>Configure</literal> menu. With in the <literal>FreeBSD
Configuration Menu</literal>, scroll down and select the
<literal>Partition</literal> item. Next you should be presented with a
list of hard drives installed in your system. If you do not see
<literal>sd1</literal> listed, you need to recheck your physical
installation and <command>dmesg</command> output in the file
<filename>/var/run/dmesg.boot</filename>.</para>
<para>Select <literal>sd1</literal> to enter the <literal>FDISK Partition
Editor</literal>. Choose <literal>A</literal> to use the entire disk
for FreeBSD. When asked if you want to <quote>remain cooperative with
any future possible operating systems</quote>, answer
<literal>YES</literal>. Write the changes to the disk using
<command>W</command>. Now exit the FDISK editor using
<command>q</command>. Next you will be asked about the Master Boot
Record. Since you are adding a disk to an already running system, choose
<literal>None</literal>.</para>
<para>Next enter the <literal>Disk Label Editor</literal>. This is where
you will create the traditional BSD partitions. A disk can have up to
eight partitions, labeled a-h. A few of the partition labels have
special uses. The <literal>a</literal> partition is used for the root
partition (<filename>/</filename>). Thus only your system disk (e.g, the
disk you boot from) should have an <literal>a</literal> partition. The
<literal>b</literal> partition is used for swap partitions, and you may
have many disks with swap partitions. The <literal>c</literal> partition
addresses the entire disk in dedicated mode, or the entire FreeBSD slice
in slice mode. The other partitions are for general use.</para>
<para>Sysinstall's Label editor favors the <literal>e</literal> partition
for non-root, non-swap partitions. With in the Label editor, create a
single file system using <command>C</command>. When prompted if this
will be a FS (file system) or swap, choose <literal>FS</literal> and
give a mount point (e.g, <filename>/mnt</filename>). When adding a disk
in post-install mode, Sysinstall will not create entries in
<filename>/etc/fstab</filename> for you, so the mount point you specify
isn't important.</para>
<para>You are now ready to write the new label to the disk and create a
file system on it. Do this by hitting <command>W</command>. Ignore any
errors from Sysinstall that it could not mount the new partition. Exit
the Label Editor and Sysinstall completely.</para>
<para>The last step is to edit <filename>/etc/fstab</filename> to add an
entry for your new disk.</para>
</sect1>
<sect1>
<title>Using command line utilities</title>
<sect2>
<title>* Using Slices</title>
<para></para>
</sect2>
<sect2>
<title>Dedicated</title>
<para>If you will not be sharing the new drive with another operating
system, you may use the <literal>dedicated</literal> mode. Remember
this mode can confuse Microsoft operating systems; however, no damage
will be done by them. IBM's OS/2 however, will
&ldquo;appropriate&rdquo; any partition it finds which it doesn't
understand.</para>
<informalexample>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rsd1 bs=1k count=1</userinput>
&prompt.root; <userinput>disklabel -Brw sd1 auto</userinput>
&prompt.root; <userinput>disklabel -e sd</userinput>1 # create the `e' partition
&prompt.root; <userinput>newfs -d0 /dev/rsd1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/sd1e
&prompt.root; <userinput>mount /1</userinput></screen>
</informalexample>
<para>An alternate method is:</para>
<informalexample>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rsd1 count=2</userinput>
&prompt.root; <userinput>disklabel /dev/rsd1 | disklabel -BrR sd1 /dev/stdin</userinput>
&prompt.root; <userinput>newfs /dev/rsd1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/sd1e
&prompt.root; <userinput>mount /1</userinput></screen>
</informalexample>
</sect2>
</sect1>
<sect1>
<title>* Non-traditional Drives</title>
<sect2>
<title>* Zip Drives</title>
<para></para>
</sect2>
<sect2>
<title>* Jazz Drives</title>
<para></para>
</sect2>
<sect2>
<title>* Sequest Drives</title>
<para></para>
</sect2>
</sect1>
</chapter>
<!--
Local Variables:
mode: sgml
sgml-declaration: "../chapter.decl"
sgml-indent-data: t
sgml-omittag: nil
sgml-always-quote-attributes: t
sgml-parent-document: ("../handbook.sgml" "part" "chapter")
End:
-->