From owner-freebsd-doc Fri Oct 8 11: 0:25 1999 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 21A2614DE0 for ; Fri, 8 Oct 1999 11:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA11853; Fri, 8 Oct 1999 11:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from terrapin.ru.ac.za (terrapin.ru.ac.za [146.231.128.6]) by hub.freebsd.org (Postfix) with ESMTP id 52AAE14EC3 for ; Fri, 8 Oct 1999 10:49:41 -0700 (PDT) (envelope-from nbm@mithrandr.moria.org) Received: from duca.dialup.ru.ac.za ([146.231.98.24] helo=mithrandr.moria.org) by terrapin.ru.ac.za with esmtp (Exim 3.03 #1) id 11Ze97-000Oed-00 for FreeBSD-gnats-submit@freebsd.org; Fri, 08 Oct 1999 19:49:34 +0200 Received: (qmail 62033 invoked by uid 1001); 8 Oct 1999 16:51:41 -0000 Message-Id: <19991008165141.62032.qmail@mithrandr.moria.org> Date: 8 Oct 1999 16:51:41 -0000 From: nbm@rucus.ru.ac.za Reply-To: nbm@rucus.ru.ac.za To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: docs/14211: indent-style changes for formatting-media Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14211 >Category: docs >Synopsis: indent-style changes for formatting-media >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 8 11:00:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Neil Blakey-Milner >Release: FreeBSD 4.0-CURRENT i386 >Organization: Rhodes University Computer Users' Society >Environment: FreeBSD mithrandr.moria.org 4.0-CURRENT FreeBSD 4.0-CURRENT #2: Wed Sep 29 17:30:21 SAST 1999 root@mithrandr.moria.org:/usr/src/sys/compile/MITHRANDR i386 >Description: This indents the formatting-media article in the proposed style. This is entirely whitespace changes, translators may ignore it, but should note the style. >How-To-Repeat: >Fix: --- article.sgml.old Fri Oct 8 18:14:09 1999 +++ article.sgml Fri Oct 8 18:43:02 1999 @@ -4,228 +4,310 @@ ]>
+ + Formatting Media For Use With FreeBSD 2.2-RELEASE - -Formatting Media For Use With FreeBSD 2.2-RELEASE -A Tutorial - - - -Doug -White - -
dwhite@resnet.uoregon.edu
-
-
-
- -March 1997 -This document describes how to slice, partition, and -format hard disk drives and similar media for use with FreeBSD. The -examples given have been tested under FreeBSD 2.2-GAMMA and may work -for other releases. - -
- - -Introduction & Definitions - - -Overview -Successfully adding disks to an existing system is the mark of an -experienced system administrator. Slicing, partitioning, and adding -disks requires a careful dance of proper command and name syntax. One -slipped finger and an entire disk could disappear in seconds. This -document is written in an attempt to simplify this process and avoid -accidents. Thankfully, enhancements to existing tools (notably -sysinstall) have greatly improved this process in recent releases of -FreeBSD. - -There are two possible modes of disk formatting: - - - -compatibility mode: Arranging a -disk so that it has a slice table for use with other operating -systems. - -dangerously dedicated mode: -Formatting a disk with no slice table. This makes the process of -adding disks easier, however non-FreeBSD operating systems may not -accept the disk. - - -For most cases, dedicated mode is the easiest to set up and use -in existing systems, as a new disk is usually dedicated entirely to -FreeBSD. However, compatibility mode insures optimum interoperability -with future installations at a cost of increased complexity. - -In addition to selecting the mode, two methods of slicing the -disk are available. One is using the system installation tool -/stand/sysinstall. 2.1.7-RELEASE and later -versions of sysinstall contain code to ease setup -of disks during normal system operation, mainly allowing access to the -Label and Partition editors and a Write feature which will update just -the selected disk and slice without affecting other disks. The other -method is running the tools manually from a root command line. For -dangerously dedicated mode, only three or four commands are involved -while sysinstall requires some manipulation. - - -Definitions - -UNIX disk management over the centuries has invented many new -definitions for old words. The following glossary covers the -definitions used in this document and (hopefully) for FreeBSD in -general. + A Tutorial + + + + Doug + + White + + +
+ dwhite@resnet.uoregon.edu +
+
+
+
+ + March 1997 + + + This document describes how to slice, partition, and + format hard disk drives and similar media for use with + FreeBSD. The examples given have been tested under FreeBSD + 2.2-GAMMA and may work for other releases. + +
+ + + Introduction & Definitions + + + Overview + + Successfully adding disks to an existing system is the + mark of an experienced system administrator. Slicing, + partitioning, and adding disks requires a careful dance of + proper command and name syntax. One slipped finger and an + entire disk could disappear in seconds. This document is + written in an attempt to simplify this process and avoid + accidents. Thankfully, enhancements to existing tools + (notably sysinstall) have greatly improved this process in + recent releases of FreeBSD. + + There are two possible modes of disk formatting: + + + + compatibility mode: Arranging a + disk so that it has a slice table for use with other + operating systems. + + + + dangerously dedicated mode: + Formatting a disk with no slice table. This makes the + process of adding disks easier, however non-FreeBSD + operating systems may not accept the disk. + + + + For most cases, dedicated mode is the easiest to set up + and use in existing systems, as a new disk is usually + dedicated entirely to FreeBSD. However, compatibility mode + insures optimum interoperability with future installations at + a cost of increased complexity. + + In addition to selecting the mode, two methods of slicing + the disk are available. One is using the system installation + tool /stand/sysinstall. 2.1.7-RELEASE and + later versions of sysinstall contain code + to ease setup of disks during normal system operation, mainly + allowing access to the Label and Partition editors and a Write + feature which will update just the selected disk and slice + without affecting other disks. The other method is running + the tools manually from a root command line. For dangerously + dedicated mode, only three or four commands are involved while + sysinstall requires some + manipulation. + + + + Definitions + + UNIX disk management over the centuries has invented many + new definitions for old words. The following glossary covers + the definitions used in this document and (hopefully) for + FreeBSD in general. - -compatibility mode: Arranging a disk so that it has a slice -table for use with other operating systems. Oppose dangerously -dedicated mode. - -dangerously dedicated mode: Formatting a disk with no slice -table. This makes the process of adding disks easier, however -non-FreeBSD operating systems may not accept the disk. Oppose -compatibility mode. - -disk: A circular disc, covered with magnetic or similarly -manipulable material, spun by a motor under a head. Data is stored on -the disk by changing the pattern of magnetism on the disc, which can -be later read. Hard disks, CD-ROMs, Magneto-optical,and Zip/Jaz -removables are examples of disks. - -slice: A division of a disk. Up to four slices are permitted on one -disk in the PC standard. Slices are composed of contiguous sectors. -Slices are recorded in a slice table used by the system BIOS to -locate bootable partitions. The slice table is usually called the -Partition Table in DOS parlance. Maintained by the fdisk utility. - -partition: A division of a slice. Usually used in reference -to divisions of the FreeBSD slice of a disk. Each filesystem and swap -area on a disk resides in a partition. Maintained using the disklabel -utility. + + + compatibility mode: Arranging a disk so that it has a + slice table for use with other operating systems. Oppose + dangerously dedicated mode. + + + + dangerously dedicated mode: Formatting a disk with no + slice table. This makes the process of adding disks + easier, however non-FreeBSD operating systems may not + accept the disk. Oppose compatibility mode. + + + + disk: A circular disc, covered with magnetic or + similarly manipulable material, spun by a motor under a + head. Data is stored on the disk by changing the pattern + of magnetism on the disc, which can be later read. Hard + disks, CD-ROMs, Magneto-optical,and Zip/Jaz removables are + examples of disks. + + + + slice: A division of a disk. Up to four slices are + permitted on one disk in the PC standard. Slices are + composed of contiguous sectors. Slices are recorded in a + slice table used by the system BIOS to + locate bootable partitions. The slice table is usually + called the Partition Table in DOS parlance. Maintained by + the fdisk utility. + + + + partition: A division of a slice. Usually used in + reference to divisions of the FreeBSD slice of a disk. + Each filesystem and swap area on a disk resides in a + partition. Maintained using the disklabel utility. + -sector: Smallest subdivision of a disk. One sector usually -represents 512 bytes of data. - - - - - -Warnings & Pitfalls - -Building disks is not something to take lightly. It is quite possible -to destroy the contents of other disks in your system if the proper -precautions are not taken. - -Check your work carefully. It is very simple to destroy -the incorrect disk when working with these commands. When -in doubt consult the kernel boot output for the proper device. - -Needless to say, we are not responsible for any damage to any data -or hardware that you may experience. You work at your own risk! - - + + sector: Smallest subdivision of a disk. One sector + usually represents 512 bytes of data. + + + + + + Warnings & Pitfalls + + Building disks is not something to take lightly. It is + quite possible to destroy the contents of other disks in your + system if the proper precautions are not taken. + + Check your work carefully. It is very simple + to destroy the incorrect disk when working with these + commands. When in doubt consult the kernel boot output for + the proper device. + + Needless to say, we are not responsible for any damage to + any data or hardware that you may experience. You work at + your own risk! + + + + Zip, Jaz, and Other Removables + + Removable disks can be formatted in the same way as normal + hard disks. It is essential to have the disk drive connected + to the system and a disk placed in the drive during startup, + so the kernel can determine the drive's geometry. Check the + dmesg output and make sure your device and + the disk's size is listed. If the kernel reports - -Zip, Jaz, and Other Removables - -Removable disks can be formatted in the same way as normal hard -disks. It is essential to have the disk drive connected to the system -and a disk placed in the drive during startup, so the kernel can -determine the drive's geometry. Check the dmesg -output and make sure your device and the disk's size is listed. If -the kernel reports Can't get the size -then the disk was not in the drive. In this case, you will need to restart the -machine before attempting to format disks. - - - - - -Formatting Disks in Dedicated Mode - - -Introduction - -This section details how to make disks that are totally dedicated to -FreeBSD. Remember, dedicated mode disks cannot be booted by the PC -architecture. - - - -Making Dedicated Mode Disks using Sysinstall - -/stand/sysinstall, the system installation -utility, has been expanded in recent versions to make the process of -dividing disks properly a less tiring affair. The fdisk and disklabel -editors built into sysinstall are GUI tools that remove much of the -confusion from slicing disks. For FreeBSD versions 2.1.7 and later, -this is perhaps the simplest way to slice disks. - -Start sysinstall as root by typing + then the disk was not in the drive. In this case, you will + need to restart the machine before attempting to format + disks. + + + + + Formatting Disks in Dedicated Mode + + + Introduction + + This section details how to make disks that are totally + dedicated to FreeBSD. Remember, dedicated mode disks cannot + be booted by the PC architecture. + + + + Making Dedicated Mode Disks using Sysinstall + + /stand/sysinstall, the system + installation utility, has been expanded in recent versions to + make the process of dividing disks properly a less tiring + affair. The fdisk and disklabel editors built into sysinstall + are GUI tools that remove much of the confusion from slicing + disks. For FreeBSD versions 2.1.7 and later, this is perhaps + the simplest way to slice disks. + + + + Start sysinstall as root by typing + -&prompt.root; /stand/sysinstall + +&prompt.root; /stand/sysinstall + -from the command prompt. -Select Index. -Select Partition. -Select the disk to edit with arrow keys and -SPACE. - -If you are using this entire disk for FreeBSD, select -A. -When asked: + from the command prompt. + + + + Select Index. + + + + Select Partition. + + + + Select the disk to edit with arrow keys and + SPACE. + + + + If you are using this entire disk for FreeBSD, select + A. + + + + When asked: + Do you want to do this with a true partition entry so as to remain cooperative with any future possible operating systems on the drive(s)? -answer No. -When asked if you still want to do this, answer -Yes. -Select Write. -When warned about Writing on installed systems, answer -Yes. -Quitthe FDISK Editor and -ESCAPE back to the Index menu. -Select Label from the Index -menu. -Label as desired. For a single partition, enter -C to Create a partition, accept the -default size, partition type Filesystem, and a mountpoint (which isn't -used). -Enter W when done and confirm to -continue. The filesystem will be newfs'd for you, unless you select -otherwise (for news partitions you'll want to do this!). You'll get -the error: + + + answer No. + + + + When asked if you still want to do this, answer + Yes. + + + + Select Write. + + + + When warned about Writing on installed systems, answer + Yes. + + + + Quitthe FDISK Editor and + ESCAPE back to the Index menu. + + + + Select Label from the Index + menu. + + + + Label as desired. For a single partition, enter + C to Create a partition, accept the + default size, partition type Filesystem, and a mountpoint + (which isn't used). + + + + Enter W when done and confirm to + continue. The filesystem will be newfs'd for you, unless + you select otherwise (for news partitions you'll want to + do this!). You'll get the error: + -Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory + +Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory -Ignore. - -Exit out by repeatedly pressing ESCAPE. - - - - -Making Dedicated Mode Disks Using the Command Line + Ignore. + + + + Exit out by repeatedly pressing + ESCAPE. + + + + + + Making Dedicated Mode Disks Using the Command Line + + Execute the following commands, replacing wd2 with the + disk name. Lines beginning with # are comments. -Execute the following commands, replacing wd2 with the disk -name. Lines beginning with # are comments. &prompt.root; dd if=/dev/zero of=/dev/rwd2 count=2 @@ -235,8 +317,8 @@ - If you need to edit the disklabel to create multiple -partitions (such as swap), use the following: + If you need to edit the disklabel to create multiple + partitions (such as swap), use the following: @@ -249,106 +331,167 @@ -Your disk is now ready for use. - - - - - -Making Compatibility Mode Disks - - -Introduction -The command line is the easiest way to make dedicated disks, and -the worst way to make compatibility disks. The command-line fdisk -utility requires higher math skills and an in-depth understanding of -the slice table, which is more than most people want to deal with. -Use sysinstall for compatibility disks, as described below. + Your disk is now ready for use. + + + + + Making Compatibility Mode Disks + + + Introduction + + The command line is the easiest way to make dedicated + disks, and the worst way to make compatibility disks. The + command-line fdisk utility requires higher math skills and an + in-depth understanding of the slice table, which is more than + most people want to deal with. Use sysinstall for + compatibility disks, as described below. + + + + Making Compatibility Mode Disks Using Sysinstall + + + + Start sysinstall as root by typing - - - -Making Compatibility Mode Disks Using Sysinstall - - -Start sysinstall as root by typing &prompt.root; /stand/sysinstall -from the command prompt. -Select Index. -Select Partition. -Select the disk to edit with arrow keys and -SPACE. - -If you are using this entire disk for FreeBSD, select -A. + from the command prompt. + + + + Select Index. + + + + Select Partition. + + + + Select the disk to edit with arrow keys and + SPACE. + + + + If you are using this entire disk for FreeBSD, select + A. + + + + When asked: -When asked: Do you want to do this with a true partition entry so as to remain cooperative with any future possible operating systems on the drive(s)? - answer yes. -Select Write. -When asked to install the boot manager, select None with -SPACE then hit ENTER for OK. -Quit the FDISK Editor. -You'll be asked about the boot manager, select -None -again. -Select Label from the Index -menu. -Label as desired. For a single partition, accept the -default size, type filesystem, and a mountpoint (which isn't -used). -The filesystem will be newfs'd for you, unless you select otherwise (for news partitions you'll want to do this!). You'll get the error: + + answer yes. + + + + Select Write. + + + + When asked to install the boot manager, select None + with SPACE then hit + ENTER for OK. + + + + Quit the FDISK Editor. + + + + You'll be asked about the boot manager, select + None again. + + + + Select Label from the Index + menu. + + + + Label as desired. For a single partition, accept the + default size, type filesystem, and a mountpoint (which + isn't used). + + + + The filesystem will be newfs'd for you, unless you + select otherwise (for news partitions you'll want to do + this!). You'll get the error: + Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory -Ignore. - -Exit out by repeatedly pressing ESCAPE. - - -Your new disk is now ready for use. - - - - - -Other Disk Operations - -Adding Swap Space - -As a system grows, it's need for swap space can also grow. -Although adding swap space to existing disks is very difficult, a new -disk can be partitioned with additional swap space. - -To add swap space when adding a disk to a system: - -When partitioning the disk, edit the disklabel and -allocate the amount of swap space to add in partition `b' and the -remainder in another partition, such as `a' or `e'. The size is given -in 512 byte blocks. -When newfsing the drive, do NOT newfs the `c' -partition. Instead, newfs the partition where the non-swap space -lies. -Add an entry to /etc/fstab as follows: + + Ignore. + + + + Exit out by repeatedly pressing + ESCAPE. + + + + Your new disk is now ready for use. + + + + + Other Disk Operations + + + Adding Swap Space + + As a system grows, it's need for swap space can also grow. + Although adding swap space to existing disks is very + difficult, a new disk can be partitioned with additional swap + space. + + To add swap space when adding a disk to a system: + + + + When partitioning the disk, edit the disklabel and + allocate the amount of swap space to add in partition `b' + and the remainder in another partition, such as `a' or + `e'. The size is given in 512 byte blocks. + + + + When newfsing the drive, do NOT newfs the `c' + partition. Instead, newfs the partition where the + non-swap space lies. + + + + Add an entry to /etc/fstab as + follows: + /dev/wd0b none swap sw 0 0 - -Change /dev/wd0b to the device of the newly added -space. -To make the new space immediately available, use the -swapon command. + + Change /dev/wd0b to the device of the newly added + space. + + + + To make the new space immediately available, use the + swapon command. + @@ -356,18 +499,21 @@ swapon: added /dev/sd0b as swap space - - - - + + + + - -Copying the Contents of Disks + + Copying the Contents of Disks -Submitted By: Renaud Waldura (renaud@softway.com) + + Submitted By: Renaud Waldura + (renaud@softway.com) + + To move file from your original base disk to the fresh new + one, do: -To move file from your original base disk to the fresh new one, -do: &prompt.root; mount /dev/wd2 /mnt @@ -376,30 +522,35 @@ &prompt.root; rm -rf /usr/home/* &prompt.root; mount /dev/wd2 /usr/home - - - + + + + + Creating Striped Disks using CCD - -Creating Striped Disks using CCD -Commands Submitted By: Stan Brown (stanb@awod.com) - - -The Concatenated Disk Driver, or CCD, allows you to treat several identical disks as a single disk. -Striping can result in increased disk performance by distributing reads and -writes across the disks. See the &man.ccd.4; and &man.ccdconfig.8; man pages or the -CCD Homepage for further details. - -To create a new CCD, execute the following commands. This describes -how to add three disks together; simply add or remove devices as -necessary. Remember that the disks to be striped must be identical. + Commands Submitted By: Stan Brown + (stanb@awod.com) + + The Concatenated Disk Driver, or CCD, allows you to treat + several identical disks as a single disk. Striping can result + in increased disk performance by distributing reads and writes + across the disks. See the &man.ccd.4; and &man.ccdconfig.8; + man pages or the CCD + Homepage for further details. + + To create a new CCD, execute the following commands. This + describes how to add three disks together; simply add or + remove devices as necessary. Remember that the disks to be + striped must be identical. + + Before executing these commands, make sure you add the line -Before executing these commands, make sure you add the line pseudo-device ccd 4 -to your kernel. + to your kernel. @@ -422,36 +573,41 @@ -Now you can mount and use your CCD by referencing device /dev/ccd0c. - - - - - - -Credits - - - -The author would like to thank the following individuals for -their contributions to this project: - -Darryl Okahata -(darrylo@hpnmhjw.sr.hp.com) for his -simple dedicated mode setup documentation which I have used repeatedly -on freebsd-questions. -Jordan Hubbard -(jkh@FreeBSD.org) for making -sysinstall useful for this type of task. -John Fieber -(jfieber@indiana.edu) for making -information and examples of the DocBook DTD on which this document is -based. -Greg Lehey (grog@FreeBSD.org) for checking my -work and pointing out inaccuracies, as well as miscellaneous support. - - - - - + Now you can mount and use your CCD by referencing device + /dev/ccd0c. + + + + + Credits + + The author would like to thank the following individuals for + their contributions to this project: + + + + Darryl Okahata + (darrylo@hpnmhjw.sr.hp.com) for his simple + dedicated mode setup documentation which I have used + repeatedly on freebsd-questions. + + + + Jordan Hubbard (jkh@FreeBSD.org) for + making sysinstall useful for this type of task. + + + + John Fieber (jfieber@indiana.edu) for + making information and examples of the DocBook DTD on which + this document is based. + + + + Greg Lehey (grog@FreeBSD.org) for + checking my work and pointing out inaccuracies, as well as + miscellaneous support. + + +
>Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message