Rework the Storage chapter. Move the floppy disks section up before CD
burning.
This commit is contained in:
parent
46168b00b3
commit
d3211ba418
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14026
1 changed files with 251 additions and 251 deletions
|
@ -776,6 +776,255 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
|
|||
<screen>&prompt.root; <userinput>kill -HUP `cat /var/run/inetd.pid`</userinput></screen>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="floppies">
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Julio</firstname>
|
||||
<surname>Merino</surname>
|
||||
<contrib>Contributed by </contrib>
|
||||
</author>
|
||||
</authorgroup>
|
||||
<!-- 24 Dec 2001 -->
|
||||
</sect1info>
|
||||
|
||||
<title>Floppy disks</title>
|
||||
|
||||
<para>Floppy disks are, nowadays, an old-fashioned medium to
|
||||
store/share data. Although, there are still some times when you
|
||||
need to use them, because you do not have any other removable
|
||||
storage media or you need to use what you have saved in them on
|
||||
any other computer.</para>
|
||||
|
||||
<para>This section will explain how to use floppy disks in
|
||||
FreeBSD, that is, formating and copying/restoring data from
|
||||
them. But... I really have written this to help you about how to
|
||||
create forced-size floppies.</para>
|
||||
|
||||
<sect2>
|
||||
<title>The device</title>
|
||||
|
||||
<para>Floppy disks are accessed through entries in
|
||||
<filename>/dev</filename> (like any other device). To access the
|
||||
raw floppy disk you can use <filename>/dev/rfd<replaceable>X</replaceable></filename>,
|
||||
where <replaceable>X</replaceable> stands for the drive number, usually 0. When the disk is
|
||||
formatted you can use <filename>/dev/fd<replaceable>X</replaceable></filename>, or
|
||||
whichever of the other devices named
|
||||
<filename>/dev/fd<replaceable>XY</replaceable></filename>, where <replaceable>Y</replaceable> stands for a
|
||||
letter. These are all the same.</para>
|
||||
|
||||
<para>Other important devices are
|
||||
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename>, where <replaceable>size</replaceable> is a floppy disk
|
||||
size in kilobytes. These entries are used at low-level format
|
||||
time to determine the disk size.</para>
|
||||
|
||||
<para>Sometimes you will have to (re)create these entries under
|
||||
<filename>/dev</filename>. To do it, you can issue:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev && ./MAKEDEV "fd*"</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Formatting</title>
|
||||
|
||||
<para>A floppy disk needs to be low-level formated before it can
|
||||
be used. This is usually done by the vendor but you may want to
|
||||
do it to check media integrity or to force the disk capacity to
|
||||
be bigger.</para>
|
||||
|
||||
<para>To format the floppy at a low-level fashion you need to
|
||||
use <application>fdformat</application>. This utility expects
|
||||
the device name as an argument. We will use those
|
||||
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename> devices, which will allow us
|
||||
to format the floppy to its real size, or force them. So you
|
||||
insert a new 3.5inch floppy disk in your drive and issue:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/rfd0.1440</userinput></screen>
|
||||
|
||||
<para>This will take a while... You should notice any disk error
|
||||
here (this can help you determining which disks are good or
|
||||
bad).</para>
|
||||
|
||||
<para>To force the floppy disk size, we will use other entries
|
||||
in <filename>/dev</filename>. Get the same floppy and issue:
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/rfd0.1720</userinput></screen>
|
||||
|
||||
<para>It will take some more time than before (forced disks are
|
||||
slower). When it finishes, you will have a 1720kb floppy disk,
|
||||
but for the moment you will not notice any difference. You may
|
||||
use other disk sizes that you can find in <filename>/dev</filename>, but the most
|
||||
stable/compatible is the 1720kb for 3.5inch disks.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The disklabel</title>
|
||||
|
||||
<para>After low-level formatting the disk, you will need to
|
||||
place a disklabel on it. This disklabel will be destroyed
|
||||
later, but it is needed by the system to determine the size of
|
||||
the disk and its geometry later.</para>
|
||||
|
||||
<para>The new disklabel will take over the whole disk, and will
|
||||
contain all the proper information about the geometry of the
|
||||
normal or forced floppy. Take a look to
|
||||
<filename>/etc/disktab</filename> now; you will see geometry
|
||||
values of all kinds of floppy disks.
|
||||
|
||||
<para>You can run now <application>disklabel</application>
|
||||
like:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/sbin/disklabel -B -r -w /dev/rfd0 <replaceable>fdsize</replaceable></userinput></screen>
|
||||
|
||||
<para>Replace <replaceable>fdsize</replaceable> with <literal>fd1440</literal>, <literal>fd1720</literal> or whichever size you
|
||||
want. The last field instructs disklabel which entry to take
|
||||
from <filename>/etc/disktab</filename> to use.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The filesystem</title>
|
||||
|
||||
<para>Now your floppy is ready to be high-level formated. This
|
||||
will place a new filesystem on it, which will let FreeBSD read
|
||||
and write to the disk. After creating the new filesystem, the
|
||||
disklabel is destroyed, so if you want to reformat the disk, you
|
||||
will have to recreate the disklabel another time.</para>
|
||||
|
||||
<para>You can choose now which filesystem to use on your floppy.
|
||||
You can use UFS or FAT, though UFS is not a good idea for
|
||||
floppies. Choose FAT which is nice for floppies.</para>
|
||||
|
||||
<para>To put a new filesystem on the floppy do this:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/sbin/newfs_msdos /dev/fd0</userinput></screen>
|
||||
|
||||
<para>As we created a disklabel before, <application>newfs</application>
|
||||
will be able to fetch disk data and construct the new
|
||||
filesystem. And now, your disk is ready for use...</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Using the floppy</title>
|
||||
|
||||
<para>You have two choices to use the floppy. You can either
|
||||
mount the disk with <application>mount_msdos</application>, or you can
|
||||
use <application>mtools</application>.
|
||||
<application>Mtools</application> are great, but you will need
|
||||
to install them from the ports system.</para>
|
||||
|
||||
<para>Try it; issue a <application>mdir</application>. If you forced the
|
||||
disk, you will notice its extra size!</para>
|
||||
|
||||
<para>A last note about forced disks: they are compatible with
|
||||
practically all other operating systems without any external
|
||||
utility to read/write them. Microsoft systems will recognize
|
||||
them without problems. But note that there may be times when the
|
||||
floppy drive itself is not able to read them (this may happen
|
||||
with very old drives).</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="backups-floppybackups">
|
||||
<title>Backups to Floppies</title>
|
||||
|
||||
<sect2 id="floppies-using">
|
||||
<title>Can I Use floppies for Backing Up My Data?</title>
|
||||
<indexterm><primary>backup floppies</primary></indexterm>
|
||||
<indexterm><primary>floppy disks</primary></indexterm>
|
||||
|
||||
<para>Floppy disks are not really a suitable media for
|
||||
making backups as:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The media is unreliable, especially over long periods of
|
||||
time.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Backing up and restoring is very slow.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>They have a very limited capacity (the days of backing up
|
||||
an entire hard disk onto a dozen or so floppies has long since
|
||||
passed).</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>However, if you have no other method of backing up your data then
|
||||
floppy disks are better than no backup at all.</para>
|
||||
|
||||
<para>If you do have to use floppy disks then ensure that you use good
|
||||
quality ones. Floppies that have been lying around the office for a
|
||||
couple of years are a bad choice. Ideally use new ones from a
|
||||
reputable manufacturer.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-creating">
|
||||
<title>So How Do I Backup My Data to Floppies?</title>
|
||||
|
||||
<para>The best way to backup to floppy disk is to use
|
||||
<command>tar</command> with the <option>-M</option> (multi
|
||||
volume) option, which allows backups to span multiple
|
||||
floppies.</para>
|
||||
|
||||
<para>To backup all the files in the current directory and sub-directory
|
||||
use this (as root):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mcvf /dev/fd0 *</userinput></screen>
|
||||
|
||||
<para>When the first floppy is full <command>tar</command> will prompt you to
|
||||
insert the next volume (because <command>tar</command> is media independent it
|
||||
refers to volumes; in this context it means floppy disk).</para>
|
||||
|
||||
<screen>Prepare volume #2 for /dev/fd0 and hit return:</screen>
|
||||
|
||||
<para>This is repeated (with the volume number incrementing) until all
|
||||
the specified files have been archived.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-compress">
|
||||
<title>Can I Compress My Backups?</title>
|
||||
<indexterm>
|
||||
<primary><command>tar</command></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><command>gzip</command></primary>
|
||||
</indexterm>
|
||||
<indexterm><primary>compression</primary></indexterm>
|
||||
|
||||
<para>Unfortunately, <command>tar</command> will not allow the
|
||||
<option>-z</option> option to be used for multi-volume archives.
|
||||
You could, of course, <command>gzip</command> all the files,
|
||||
<command>tar</command> them to the floppies, then
|
||||
<command>gunzip</command> the files again!</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-restoring">
|
||||
<title>How Do I Restore My Backups?</title>
|
||||
|
||||
<para>To restore the entire archive use:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mxvf /dev/fd0</userinput></screen>
|
||||
|
||||
<para>There are two ways that you can use to restore only
|
||||
specific files. First, you can start with the first floppy
|
||||
and use:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mxvf /dev/fd0 <replaceable>filename</replaceable></userinput></screen>
|
||||
|
||||
<para><command>tar</command> will prompt you to insert subsequent floppies until it
|
||||
finds the required file.</para>
|
||||
|
||||
<para>Alternatively, if you know which floppy the file is on then you
|
||||
can simply insert that floppy and use the same command as above. Note
|
||||
that if the first file on the floppy is a continuation from the
|
||||
previous one then <command>tar</command> will warn you that it cannot
|
||||
restore it, even if you have not asked it to!</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="creating-cds">
|
||||
<sect1info>
|
||||
|
@ -1951,258 +2200,9 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
|
|||
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="floppies">
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Julio</firstname>
|
||||
<surname>Merino</surname>
|
||||
<contrib>Contributed by </contrib>
|
||||
</author>
|
||||
</authorgroup>
|
||||
<!-- 24 Dec 2001 -->
|
||||
</sect1info>
|
||||
|
||||
<title>Floppy disks</title>
|
||||
|
||||
<para>Floppy disks are, nowadays, an old-fashioned medium to
|
||||
store/share data. Although, there are still some times when you
|
||||
need to use them, because you do not have any other removable
|
||||
storage media or you need to use what you have saved in them on
|
||||
any other computer.</para>
|
||||
|
||||
<para>This section will explain how to use floppy disks in
|
||||
FreeBSD, that is, formating and copying/restoring data from
|
||||
them. But... I really have written this to help you about how to
|
||||
create forced-size floppies.</para>
|
||||
|
||||
<sect2>
|
||||
<title>The device</title>
|
||||
|
||||
<para>Floppy disks are accessed through entries in
|
||||
<filename>/dev</filename> (like any other device). To access the
|
||||
raw floppy disk you can use <filename>/dev/rfd<replaceable>X</replaceable></filename>,
|
||||
where <replaceable>X</replaceable> stands for the drive number, usually 0. When the disk is
|
||||
formatted you can use <filename>/dev/fd<replaceable>X</replaceable></filename>, or
|
||||
whichever of the other devices named
|
||||
<filename>/dev/fd<replaceable>XY</replaceable></filename>, where <replaceable>Y</replaceable> stands for a
|
||||
letter. These are all the same.</para>
|
||||
|
||||
<para>Other important devices are
|
||||
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename>, where <replaceable>size</replaceable> is a floppy disk
|
||||
size in kilobytes. These entries are used at low-level format
|
||||
time to determine the disk size.</para>
|
||||
|
||||
<para>Sometimes you will have to (re)create these entries under
|
||||
<filename>/dev</filename>. To do it, you can issue:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev && ./MAKEDEV "fd*"</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Formatting</title>
|
||||
|
||||
<para>A floppy disk needs to be low-level formated before it can
|
||||
be used. This is usually done by the vendor but you may want to
|
||||
do it to check media integrity or to force the disk capacity to
|
||||
be bigger.</para>
|
||||
|
||||
<para>To format the floppy at a low-level fashion you need to
|
||||
use <application>fdformat</application>. This utility expects
|
||||
the device name as an argument. We will use those
|
||||
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename> devices, which will allow us
|
||||
to format the floppy to its real size, or force them. So you
|
||||
insert a new 3.5inch floppy disk in your drive and issue:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/rfd0.1440</userinput></screen>
|
||||
|
||||
<para>This will take a while... You should notice any disk error
|
||||
here (this can help you determining which disks are good or
|
||||
bad).</para>
|
||||
|
||||
<para>To force the floppy disk size, we will use other entries
|
||||
in <filename>/dev</filename>. Get the same floppy and issue:
|
||||
|
||||
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/rfd0.1720</userinput></screen>
|
||||
|
||||
<para>It will take some more time than before (forced disks are
|
||||
slower). When it finishes, you will have a 1720kb floppy disk,
|
||||
but for the moment you will not notice any difference. You may
|
||||
use other disk sizes that you can find in <filename>/dev</filename>, but the most
|
||||
stable/compatible is the 1720kb for 3.5inch disks.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The disklabel</title>
|
||||
|
||||
<para>After low-level formatting the disk, you will need to
|
||||
place a disklabel on it. This disklabel will be destroyed
|
||||
later, but it is needed by the system to determine the size of
|
||||
the disk and its geometry later.</para>
|
||||
|
||||
<para>The new disklabel will take over the whole disk, and will
|
||||
contain all the proper information about the geometry of the
|
||||
normal or forced floppy. Take a look to
|
||||
<filename>/etc/disktab</filename> now; you will see geometry
|
||||
values of all kinds of floppy disks.
|
||||
|
||||
<para>You can run now <application>disklabel</application>
|
||||
like:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/sbin/disklabel -B -r -w /dev/rfd0 <replaceable>fdsize</replaceable></userinput></screen>
|
||||
|
||||
<para>Replace <replaceable>fdsize</replaceable> with <literal>fd1440</literal>, <literal>fd1720</literal> or whichever size you
|
||||
want. The last field instructs disklabel which entry to take
|
||||
from <filename>/etc/disktab</filename> to use.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The filesystem</title>
|
||||
|
||||
<para>Now your floppy is ready to be high-level formated. This
|
||||
will place a new filesystem on it, which will let FreeBSD read
|
||||
and write to the disk. After creating the new filesystem, the
|
||||
disklabel is destroyed, so if you want to reformat the disk, you
|
||||
will have to recreate the disklabel another time.</para>
|
||||
|
||||
<para>You can choose now which filesystem to use on your floppy.
|
||||
You can use UFS or FAT, though UFS is not a good idea for
|
||||
floppies. Choose FAT which is nice for floppies.</para>
|
||||
|
||||
<para>To put a new filesystem on the floppy do this:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>/sbin/newfs_msdos /dev/fd0</userinput></screen>
|
||||
|
||||
<para>As we created a disklabel before, <application>newfs</application>
|
||||
will be able to fetch disk data and construct the new
|
||||
filesystem. And now, your disk is ready for use...</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Using the floppy</title>
|
||||
|
||||
<para>You have two choices to use the floppy. You can either
|
||||
mount the disk with <application>mount_msdos</application>, or you can
|
||||
use <application>mtools</application>.
|
||||
<application>Mtools</application> are great, but you will need
|
||||
to install them from the ports system.</para>
|
||||
|
||||
<para>Try it; issue a <application>mdir</application>. If you forced the
|
||||
disk, you will notice its extra size!</para>
|
||||
|
||||
<para>A last note about forced disks: they are compatible with
|
||||
practically all other operating systems without any external
|
||||
utility to read/write them. Microsoft systems will recognize
|
||||
them without problems. But note that there may be times when the
|
||||
floppy drive itself is not able to read them (this may happen
|
||||
with very old drives).</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="backups-floppybackups">
|
||||
<title>Backups to Floppies</title>
|
||||
|
||||
<sect2 id="floppies-using">
|
||||
<title>Can I Use floppies for Backing Up My Data?</title>
|
||||
<indexterm><primary>backup floppies</primary></indexterm>
|
||||
<indexterm><primary>floppy disks</primary></indexterm>
|
||||
|
||||
<para>Floppy disks are not really a suitable media for
|
||||
making backups as:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The media is unreliable, especially over long periods of
|
||||
time.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Backing up and restoring is very slow.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>They have a very limited capacity (the days of backing up
|
||||
an entire hard disk onto a dozen or so floppies has long since
|
||||
passed).</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>However, if you have no other method of backing up your data then
|
||||
floppy disks are better than no backup at all.</para>
|
||||
|
||||
<para>If you do have to use floppy disks then ensure that you use good
|
||||
quality ones. Floppies that have been lying around the office for a
|
||||
couple of years are a bad choice. Ideally use new ones from a
|
||||
reputable manufacturer.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-creating">
|
||||
<title>So How Do I Backup My Data to Floppies?</title>
|
||||
|
||||
<para>The best way to backup to floppy disk is to use
|
||||
<command>tar</command> with the <option>-M</option> (multi
|
||||
volume) option, which allows backups to span multiple
|
||||
floppies.</para>
|
||||
|
||||
<para>To backup all the files in the current directory and sub-directory
|
||||
use this (as root):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mcvf /dev/fd0 *</userinput></screen>
|
||||
|
||||
<para>When the first floppy is full <command>tar</command> will prompt you to
|
||||
insert the next volume (because <command>tar</command> is media independent it
|
||||
refers to volumes; in this context it means floppy disk).</para>
|
||||
|
||||
<screen>Prepare volume #2 for /dev/fd0 and hit return:</screen>
|
||||
|
||||
<para>This is repeated (with the volume number incrementing) until all
|
||||
the specified files have been archived.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-compress">
|
||||
<title>Can I Compress My Backups?</title>
|
||||
<indexterm>
|
||||
<primary><command>tar</command></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><command>gzip</command></primary>
|
||||
</indexterm>
|
||||
<indexterm><primary>compression</primary></indexterm>
|
||||
|
||||
<para>Unfortunately, <command>tar</command> will not allow the
|
||||
<option>-z</option> option to be used for multi-volume archives.
|
||||
You could, of course, <command>gzip</command> all the files,
|
||||
<command>tar</command> them to the floppies, then
|
||||
<command>gunzip</command> the files again!</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="floppies-restoring">
|
||||
<title>How Do I Restore My Backups?</title>
|
||||
|
||||
<para>To restore the entire archive use:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mxvf /dev/fd0</userinput></screen>
|
||||
|
||||
<para>There are two ways that you can use to restore only
|
||||
specific files. First, you can start with the first floppy
|
||||
and use:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>tar Mxvf /dev/fd0 <replaceable>filename</replaceable></userinput></screen>
|
||||
|
||||
<para><command>tar</command> will prompt you to insert subsequent floppies until it
|
||||
finds the required file.</para>
|
||||
|
||||
<para>Alternatively, if you know which floppy the file is on then you
|
||||
can simply insert that floppy and use the same command as above. Note
|
||||
that if the first file on the floppy is a continuation from the
|
||||
previous one then <command>tar</command> will warn you that it cannot
|
||||
restore it, even if you have not asked it to!</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="backups-tapebackups">
|
||||
<title>Tape Backup Media</title>
|
||||
<sect1 id="backups-tapebackups">
|
||||
<title>Tapes and FreeBSD</title>
|
||||
|
||||
<indexterm><primary>tape media</primary></indexterm>
|
||||
<para>The major tape media are the 4mm, 8mm, QIC, mini-cartridge and
|
||||
|
|
Loading…
Reference in a new issue