Whitespace/tag-only commit - move the entire disk adding procedure a

further step in, to allow for more topics in this chapter.  Enwrap
it with <sect1 id="disks-adding"> and <title>Adding disks</title>.

Translators need just add the above, and indent, and then add the
closing tag where I did.
This commit is contained in:
Neil Blakey-Milner 2000-03-20 12:33:41 +00:00
parent d4ec7f376e
commit 934e57c16c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6803
2 changed files with 234 additions and 226 deletions

View file

@ -1,139 +1,143 @@
<!--
The FreeBSD Documentation Project
$FreeBSD$
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml,v 1.8 1999/09/06 06:52:56 peter Exp $
-->
<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>da1</filename> and we want to mount it on
<filename>/1</filename>. (if you are adding an IDE drive substitute
<filename>wd</filename> for <filename>da</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>
<sect1 id="disks-adding">
<title>Adding disks</title>
<para>In the slice case the drive will be added as
<filename>/dev/da1s1e</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/da1e</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>da1</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>da1</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>
<para><emphasis>Contributed by &a.obrien; 26 April 1998</emphasis></para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 bs=1k count=1</userinput>
<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>da1</filename> and we want to mount it on
<filename>/1</filename>. (if you are adding an IDE drive substitute
<filename>wd</filename> for <filename>da</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/da1s1e</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/da1e</filename>.</para>
<sect2>
<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>da1</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>da1</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>
</sect2>
<sect2>
<title>Using command line utilities</title>
<sect3>
<title>* Using Slices</title>
<para></para>
</sect3>
<sect3>
<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>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 bs=1k count=1</userinput>
&prompt.root; <userinput>disklabel -Brw da1 auto</userinput>
&prompt.root; <userinput>disklabel -e da1</userinput> # create the `e' partition
&prompt.root; <userinput>newfs -d0 /dev/rda1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/da1e
&prompt.root; <userinput>mount /1</userinput></screen>
<para>An alternate method is:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 count=2</userinput>
<para>An alternate method is:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/rda1 count=2</userinput>
&prompt.root; <userinput>disklabel /dev/rda1 | disklabel -BrR da1 /dev/stdin</userinput>
&prompt.root; <userinput>newfs /dev/rda1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/da1e
&prompt.root; <userinput>mount /1</userinput></screen>
</sect3>
</sect2>
</sect1>
<sect1>
<!-- <sect1>
<title>* Non-traditional Drives</title>
<sect2>
@ -153,7 +157,7 @@
<para></para>
</sect2>
</sect1>
</sect1> -->
</chapter>
<!--