Add in a reference to disk-layout.eps, replacing the ASCII art for non-text

users.

Add much more information about the process of labelling a slice to create
partitions.
This commit is contained in:
Nik Clayton 2001-08-21 23:42:44 +00:00
parent cd53ebd94e
commit 09772d9161
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10424

View file

@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/install/chapter.sgml,v 1.93 2001/08/17 23:21:42 nik Exp $
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/install/chapter.sgml,v 1.94 2001/08/20 21:46:50 nik Exp $
-->
<chapter id="install">
@ -1493,7 +1493,13 @@ Mounting root from ufs:/dev/md0c
hierarchy, and <literal>f</literal> for the
<filename>/usr</filename> directory hierarchy.</para>
<literallayout class="monospaced">.-----------------. --. --.
<mediaobject>
<imageobject>
<imagedata fileref="install/disk-layout" format="EPS">
</imageobject>
<textobject>
<literallayout class="monospaced">.-----------------. --. --.
| | | |
| DOS / Windows | | | Partition c, no
: : > First slice, ad0s1 > filesystem, all
@ -1519,6 +1525,12 @@ Mounting root from ufs:/dev/md0c
| | | | |
| | --' | |
`-----------------' --' --'</literallayout>
</textobject>
<textobject>
<phrase>Conceptual model of a disk</phrase>
</textobject>
</mediaobject>
</example>
</sect2>
@ -1738,7 +1750,178 @@ Mounting root from ufs:/dev/md0c
</sect2>
<sect2 id="disklabeleditor">
<title>Initial Disklabel Screen</title>
<title>Creating Partitions using
<application>Disklabel</application></title>
<para>You must now create some partitions inside each slice that you
have just created. Remember that each partition is lettered, from
<literal>a</literal> through to <literal>h</literal>, and that
partitions <literal>b</literal>, <literal>c</literal>, and
<literal>d</literal> have conventional meanings that you should adhere
to.</para>
<para>Certain applications can benefit from particular partition
schemes, especially if you are laying out partitions across more than
one disk. However, for this, your first FreeBSD installation, you do
not need to give too much thought to how you partition the disk. It
is more important that you install FreeBSD and start learning how to
use it. You can always re-install FreeBSD to change your partition
scheme when you are more familiar with the operating system.</para>
<para>This scheme features four partitions&mdash;one for swap space, and
three for filesystems.</para>
<table frame="none">
<title>Partition Layout for First Disk</title>
<tgroup cols="3">
<thead>
<row>
<entry>Partition</entry>
<entry>Filesystem</entry>
<entry>Size</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>a</literal></entry>
<entry><filename>/</filename></entry>
<entry>64MB</entry>
<entry>This is the root file system. Every other filesystem
will be mounted somewhere under this one. 64MB is a
reasonable size for this filesystem. You will not be storing
too much data on it, as a regular FreeBSD install will put
about 40MB of data here. The remaining space is for temporary
data, and also leaves expansion space if future versions of
FreeBSD need more space in <filename>/</filename></entry>
</row>
<row>
<entry><literal>b</literal></entry>
<entry>N/A</entry>
<entry>2-3 x RAM</entry>
<entry><para>The system's swap space is kept on this partition.
Choosing the right amount of swap space can be a bit of an
art. A good rule of thumb is that you should have two or
three times the amount of RAM as swap space. So if you have
64MB of RAM then you should between 128MB and 196MB of swap.
You should also have at least 64MB of swap, so if you have
less than 32MB of RAM in your computer then set the swap
amount to 64MB.</para><para>If you have more than one disk then you can put swap
space on each disk. FreeBSD will then use each disk for
swap, which effectively speeds up the act of swapping. In
this case, calculate the total amount of swap you need
(e.g., 128MB), and then divide this by the number of disks
you have (e.g., two disks) to give the amount of swap you
should put on each disk, in this example, 64MB of swap per
disk.</para></entry>
</row>
<row>
<entry><literal>e</literal></entry>
<entry><filename>/var</filename></entry>
<entry>50MB</entry>
<entry>The <filename>/var</filename> directory contains variable
length files; log files, and other administrative files. Many
of these files are read-from or written-to extensively during
FreeBSD's day-to-day running. Putting these files on another
filesystem allows FreeBSD to optimise the access of these
files without affecting other files in other directories that
do not have the same access pattern.</entry>
</row>
<row>
<entry><literal>f</literal></entry>
<entry><filename>/usr</filename></entry>
<entry>Rest of disk</entry>
<entry>All your other files will typically be stored in
<filename>/usr</filename>, and its subdirectories.</entry>
</row>
</tbody>
</tgroup>
</table>
<para>If you will be installing FreeBSD on to more than one disk then
you must also create partitions in the other slices that you
configured. The easiest way to do this is to create two partitions on
each disk, one for the swap space, and one for a filesystem.</para>
<table frame="none">
<title>Partition Layout for Subsequent Disks</title>
<tgroup cols="3">
<thead>
<row>
<entry>Partition</entry>
<entry>Filesystem</entry>
<entry>Size</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>b</literal></entry>
<entry>N/A</entry>
<entry>See description</entry>
<entry>As already discussed, you can split swap space across
each disk. Even though the <literal>a</literal> partition is
free, convention dictates that swap space stays on the
<literal>b</literal> partition.</entry>
</row>
<row>
<entry><literal>e</literal></entry>
<entry>/disk<replaceable>n</replaceable></entry>
<entry>Rest of disk</entry>
<entry>The rest of the disk is taken up with one big partition.
This could easily be put on the <literal>a</literal>
partition, instead of the <literal>e</literal> partition.
However, convention says that the <literal>a</literal>
partition on a slice is reserved for the filesystem that will
be the root (<filename>/</filename>) filesystem. You do not
have to follow this convention, but
<application>Sysinstall</application> does, so following it
yourself makes the installation slightly cleaner. You can
choose to mount this filesystem anywhere; this example
suggests that you mount them as directories
<filename>/disk<replaceable>n</replaceable></filename>, where
<replaceable>n</replaceable> is a number that changes for each
disk. But you can use another scheme if you prefer.</entry>
</row>
</tbody>
</tgroup>
</table>
<para>Having chosen your partition layout you can now create it using
<application>Sysinstall</application>. You will see this
message.</para>
<screen> Message
Now, you need to create BSD partitions inside of the fdisk
@ -1748,12 +1931,30 @@ Mounting root from ufs:/dev/md0c
more specific needs or just don't care for the layout chosen by
(A)uto, press F1 for more information on manual layout.
[ OK ]
[ OK ] </screen>
[ Press enter to continue ]</screen>
<para>Press <keycap>Enter</keycap> to start the FreeBSD partition
editor, called <application>Disklabel</application>.</para>
<para>There are no partitions shown when you first enter the
editor.</para>
<para><xref linkend="sysinstall-label"> shows the display when you first
start <application>Disklabel</application>. The display is divided in
to three sections.</para>
<para>The first few lines show the name of the disk you are currently
working on, and the slice that contains the partitions you are
creating (at this point <application>Disklabel</application> calls
this the <literal>Partition name</literal> rather than slice name).
This display also shows the amount of free space within the slice;
that is, space that was set aside in the slice, but that has not yet
been assigned to a partition.</para>
<para>The middle of the display shows the partitions that have been
created, the name of the filesystem that each partition contains,
their size, and some options pertaining to the creation of the
filesystem.</para>
<para>The bottom third of the screen shows the keystrokes that are valid
in <application>Disklabel</application>.</para>
<figure id="sysinstall-label">
<title>Sysinstall Disklabel Editor</title>
@ -1765,16 +1966,13 @@ Mounting root from ufs:/dev/md0c
</mediaobject>
</figure>
<para>Pressing <keycap>F1</keycap> will give instructions for using
the DiskLabel Editor. Press <keycap>Q</keycap> to continue.</para>
</sect2>
<sect2 id="partitionauto">
<title>Auto Defaults for Partitions</title>
<para>Pressing <keycap>A</keycap> displayed the suggested disklabels
for this particular disk size. If a small hard disk is being used,
the default values may be appropriate.</para>
<para><application>Disklabel</application> can automatically create
partitions for you, and assign them default sizes. Try this now, by
Pressing <keycap>A</keycap>. You will see a display similar to that
shown in <xref linkend="sysinstall-label2">. Depending on the size of
the disk you are using the defaults may or may not be appropriate.
This does not matter, as you do not have to accept the
defaults.</para>
<figure id="sysinstall-label2">
<title>Sysinstall Disklabel Editor With Auto Defaults</title>
@ -1785,106 +1983,105 @@ Mounting root from ufs:/dev/md0c
</imageobject>
</mediaobject>
</figure>
</sect2>
<sect2 id="partitionchange">
<title>Creating Custom Partitions</title>
<para>To delete the suggested partitions, and replace them with your
own, use the arrow keys to select the first partition, and press
<keycap>D</keycap> to delete it. Repeat this to delete all the
suggested partitions.</para>
<para>Write down the auto defaults for all the file systems (/,
swap, /var, /usr). Using the arrow keys, select the first
partition ( / ) and press <keycap>D</keycap> to delete the
partition. Delete all the partitions in the same manner.</para>
<para>To create the first partition (<literal>a</literal>, mounted as
<filename>/</filename>), make sure the disk information at the top of
the screen is selected, and press <keycap>C</keycap>. A dialog box
will appear prompting you for the size of the new partition (as shown
in <xref linkend="sysinstall-label-add">). You can enter the size as
the number of disk blocks you want to use, or, more usefully, as a
number followed by either <literal>M</literal> for megabytes,
<literal>G</literal> for gigabytes, or <literal>C</literal> for
cylinders.</para>
<para>It is easiest to create the partitions in the same order
shown by the auto default.</para>
<figure id="sysinstall-label-add">
<title>Free Space For Root Partition</title>
<sect3>
<title>Example Custom Partition</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>To create the root partition, first press <keycap>C</keycap>
and a dialog box will appear showing the total
space available in blocks :</para>
<para>The default size shown will create a partition that takes up the
rest of the slice. If you are using the partition sizes described
earlier then delete the existing figure using
<keycap>Backspace</keycap>, and then type in
<userinput>64M</userinput>, as shown in
<xref linkend="sysinstall-label-add2">. Then press
<guibutton>OK</guibutton>.</para>
<figure id="sysinstall-label-add2">
<title>Edit Root Partition Size</title>
<figure id="sysinstall-label-add">
<title>Free Space For Root Partition</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root1" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Having chosen the partition's size you will then asked whether
this partition will contain a filesystem or swap space. The dialog
box is shown in <xref linkend="sysinstall-label-type">. This first
partition will contain a filesystem, so check that
<guimenuitem>FS</guimenuitem> is selected and then press
<keycap>Enter</keycap>.</para>
<para>This example will set the root partition to 100M. First, delete
the entry using the <keycap>BACKSPACE</keycap> and enter the desired
value :</para>
<figure id="sysinstall-label-type">
<title>Choose The Root Partition Type</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-fs" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>Finally, because you are creating a filesystem, you must tell
<application>Disklabel</application> where the filesystem is to be
mounted. The dialog box is shown in
<xref linkend="sysinstall-label-mount">. The root filesystem's mount
point is <filename>/</filename>, so type <userinput>/</userinput>, and
then press <keycap>Enter</keycap>.</para>
<figure id="sysinstall-label-add2">
<title>Edit Root Partition Size</title>
<figure id="sysinstall-label-mount">
<title>Choose The Root Mount Point</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root2" format="PNG">
</imageobject>
</mediaobject>
</figure>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>With [OK] highlighted, then press <keycap>Enter</keycap>. The
following dialog box will display :</para>
<para>The display will then update to show you the newly created
partition. You should repeat this procedure for the other
partitions. When you create the swap partition you will not be
prompted for the filesystem mount point, as swap partitions are never
mounted. When you create the final partition,
<filename>/usr</filename>, you can leave the suggested size as is, to
use the rest of the slice.</para>
<figure id="sysinstall-label-type">
<title>Choose The Root Partition Type</title>
<para>Your final FreeBSD DiskLabel Editor screen will appear similar to
<xref linkend="sysinstall-label4">, although your values chosen may
be different. Press <keycap>Q</keycap> to finish.</para>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-fs" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The root partition needs to be a file system. With "FS"
and [OK] highlighted, press <keycap>Enter</keycap>.</para>
<para>The next dialog box to appear is to enter the mount
point for the root partition. Enter "/" for the root partition
mount point. With the [OK] highlighted, press
<keycap>Enter</keycap>.</para>
<figure id="sysinstall-label-mount">
<title>Choose The Root Mount Point</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-root3" format="PNG">
</imageobject>
</mediaobject>
</figure>
<para>The swap, /var and /usr partitions are created in the
same way. Be sure to choose "swap" as the filesystem type
for the swap partition.</para>
<para>Generally the swap
value is twice the amount of RAM in the system. For this
system, the "swap" partition will be set to 516M.</para>
<para>The "/var" partition will be set to 100M and the "/usr"
partition will get the remaining amount of disk space.</para>
<para>Your final FreeBSD DiskLabel Editor screen will appear similar
although your values chosen may be different. Press
<keycap>Q</keycap> to finish.</para>
<figure id="sysinstall-label4">
<title>Sysinstall Disklabel Editor</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-ed2" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect3>
<figure id="sysinstall-label4">
<title>Sysinstall Disklabel Editor</title>
<mediaobject>
<imageobject>
<imagedata fileref="install/disklabel-ed2" format="PNG">
</imageobject>
</mediaobject>
</figure>
</sect2>
</sect1>