From owner-svn-doc-all@FreeBSD.ORG Thu Feb 7 15:53:27 2013 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C85CEBB3; Thu, 7 Feb 2013 15:53:27 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B4D4F98D; Thu, 7 Feb 2013 15:53:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r17FrRIG010368; Thu, 7 Feb 2013 15:53:27 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r17FrR7r010367; Thu, 7 Feb 2013 15:53:27 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201302071553.r17FrR7r010367@svn.freebsd.org> From: Dru Lavigne Date: Thu, 7 Feb 2013 15:53:27 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r40906 - head/en_US.ISO8859-1/books/handbook/disks X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2013 15:53:27 -0000 Author: dru Date: Thu Feb 7 15:53:27 2013 New Revision: 40906 URL: http://svnweb.freebsd.org/changeset/doc/40906 Log: This patch addresses the following: - fix &os;, , incorrect directory, varname, and devicename tags - general rewording/tightening to address "you" and redundancy - one comment was weirdly tagged and I couldn't figure out how to fix it so it was removed - a newfs example was modified as UFS2 is now the default Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Thu Feb 7 15:09:55 2013 (r40905) +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Thu Feb 7 15:53:27 2013 (r40906) @@ -11,7 +11,7 @@ Synopsis - This chapter covers the use of disks in FreeBSD. This + This chapter covers the use of disks in &os;. This includes memory-backed disks, network-attached disks, standard SCSI/IDE storage devices, and devices using the USB interface. @@ -20,13 +20,13 @@ - The terminology FreeBSD uses to describe the - organization of data on a physical disk (partitions and - slices). + The terminology &os; uses to describe the organization + of data on a physical disk. - How to add additional hard disks to your system. + How to add additional hard disks to a &os; + system. @@ -48,7 +48,7 @@ - How to create and burn CDs and DVDs on FreeBSD. + How to create and burn CDs and DVDs on &os;. @@ -56,8 +56,8 @@ - How to use backup programs available under - FreeBSD. + How to use the backup programs available under + &os;. @@ -74,8 +74,8 @@ - Know how to configure and install a new FreeBSD kernel - (). + Know how to configure and + install a new &os; kernel. @@ -84,8 +84,7 @@ Device Names The following is a list of physical storage devices - supported in FreeBSD, and the device names associated with - them. + supported in &os;, and their associated device names. Physical Disk Naming Conventions @@ -180,21 +179,16 @@ adding - The following section will describe how to add a new + This section describes how 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 to the wide - variations of procedures to do this, the details are beyond the - scope of this document. - - Login as user root. After you have - installed the drive, inspect - /var/run/dmesg.boot to ensure the new disk - was found. Continuing with our example, the newly added drive - will be da1 and we want to mount it on - /1 (if you are adding an IDE drive, the - device name will be ad1). + 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 manufacturers. Reboot + the system and become root. + + Inspect /var/run/dmesg.boot to ensure + the new disk was found. In this example, the newly added SCSI + drive should appear as da1.partitionsslices @@ -202,36 +196,35 @@ fdisk - FreeBSD runs on IBM-PC compatible computers, therefore it - must take into account the PC BIOS partitions. These are + &os; runs on IBM-PC compatible computers, therefore it + must take into account the PC BIOS partitions which 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 - dedicated mode. Otherwise, FreeBSD will - have to live within one of the PC BIOS partitions. FreeBSD - calls the PC BIOS partitions slices 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 a good way to avoid confusing the - fdisk utility of other, non-FreeBSD operating - systems. + truly dedicated to &os;, use dedicated + mode. Otherwise, &os; will have to live within one of the PC + BIOS partitions. &os; calls the PC BIOS partitions + slices so as not to confuse them with + traditional BSD partitions. Slices may also be used on a disk + that is dedicated to &os;, but used in a computer that also has + another operating system installed. This is a good way to avoid + confusing the fdisk utility of non-&os; + operating systems. - In the slice case the drive will be added as + In the slice case, the drive will be added as /dev/da1s1e. This is read as: SCSI disk, unit number 1 (second SCSI disk), slice 1 (PC BIOS partition 1), and e BSD partition. In the dedicated - case, the drive will be added simply as + case, the drive will be added as /dev/da1e. Due to the use of 32-bit integers to store the number of - sectors, &man.bsdlabel.8; is limited to 2^32-1 sectors per disk + sectors, &man.bsdlabel.8; is limited to 2^32-1 sectors per disk, or 2TB in most cases. The &man.fdisk.8; format allows a starting sector of no more than 2^32-1 and a length of no more - than 2^32-1, limiting partitions to 2TB and disks to 4TB in most - cases. The &man.sunlabel.8; format is limited to 2^32-1 sectors - per partition and 8 partitions for a total of 16TB. For larger - disks, &man.gpart.8; may be used to create + than 2^32-1, limiting partitions to 2TB and disks to 4TB, in + most cases. The &man.sunlabel.8; format is limited to 2^32-1 + sectors per partition and 8 partitions for a total of 16TB. For + larger disks, &man.gpart.8; may be used to create GPT partitions. GPT has the added benefit of not being limited to 4 slices. @@ -249,15 +242,14 @@ Navigating - <application>Sysinstall</application> + sysinstall - You may use sysinstall to partition - and label a new disk using its easy to use menus. Either - login as user root or use the - su command. Run + sysinstall can be used to partition + and label a new disk using its easy-to-use menus. As + root, run sysinstall and enter the Configure menu. Within the - FreeBSD Configuration Menu, scroll down + &os; Configuration Menu, scroll down and select the Fdisk option. @@ -266,14 +258,14 @@ Editor Once inside fdisk, pressing - A will use the entire disk for FreeBSD. - When asked if you want to remain cooperative with + A will use the entire disk for &os;. + When asked whether to remain cooperative with any future possible operating systems, answer YES. Write the changes to the disk - using W. Now exit the FDISK editor by - pressing Q. Next you will be asked about - the Master Boot Record. Since you are - adding a disk to an already running system, choose + using W. Exit the fdisk editor by + pressing Q which will prompt about + the Master Boot Record. Since the disk is + being added to an already running system, choose None. @@ -282,43 +274,43 @@ BSD partitions - Next, you need to exit - sysinstall and start it again. - Follow the directions above, although this time choose the - Label option. This will enter the - Disk Label Editor. This is where you - will create the traditional BSD partitions. A disk can - have up to eight partitions, labeled + Next, exit sysinstall and + start it again. Follow the directions above, except this + time choose the Label option. This + will enter the Disk Label Editor. This + editor is used to create traditional BSD partitions. A + disk can have up to eight partitions, labeled a-h. A few of the partition labels have special uses. The a partition is - used for the root partition (/). - Thus only your system disk (e.g., the disk you boot from) - should have an a partition. The - b partition is used for swap - partitions, and you may have many disks with swap + used for the root partition (/). Only the disk the + system boots from should have an a + partition. The b partition is used for + swap partitions, and there can be many disks with swap partitions. The c partition addresses - the entire disk in dedicated mode, or the entire FreeBSD + the entire disk in dedicated mode, or the entire &os; slice in slice mode. The other partitions are for general use. - sysinstall's Label editor - favors the e partition for non-root, - non-swap partitions. Within the Label editor, create a - single file system by pressing C. When - prompted if this will be a FS (file system) or swap, - choose FS and type in a mount point - (e.g., /mnt). When adding a disk in - post-install mode, sysinstall - will not create entries in /etc/fstab - for you, so the mount point you specify is not - important. - - You are now ready to write the new label to the disk - and create a file system on it. Do this by pressing - W. Ignore any errors from - sysinstall that it could not - mount the new partition. Exit the Label Editor and - sysinstall completely. + The label editor in + sysinstall favors the + e partition for non-root, non-swap + partitions. Within the label editor, create a single file + system by pressing C. When prompted if + this will be a FS (file system) or swap, choose + FS and type in a mount point such as + /mnt). When adding + a disk in post-install mode, + sysinstall will not create + entries in /etc/fstab, so the mount + point you specify is not important. + + Press W to write the new label to the + disk and create a file system on it. Ignore any errors + from sysinstall indicating that + it could not mount the new partition. Exit the label + editor then sysinstall + completely. @@ -337,12 +329,12 @@ Using Slices - This setup will allow your disk to work correctly with - other operating systems that might be installed on your - computer and will not confuse other operating systems' - fdisk utilities. It is recommended - to use this method for new disk installs. Only use - dedicated mode if you have a good reason + The setup in the following example allows the new disk + to work correctly with other operating systems that might be + installed on the computer without confusing other operating + systems' fdisk utilities. This method is + recommended for new disk installs. Only use + dedicated mode if there is a good reason to do so! &prompt.root; dd if=/dev/zero of=/dev/da1 bs=1k count=1 @@ -354,7 +346,7 @@ &prompt.root; mount /dev/da1s1e /1 # Mount the partition(s) &prompt.root; vi /etc/fstab # Add the appropriate entry/entries to your /etc/fstab. - If you have an IDE disk, substitute + For an IDE disk, substitute ad for da. @@ -363,13 +355,11 @@ OS/2 - If you will not be sharing the new drive with another - operating system, you may use the - dedicated mode. Remember this mode can - confuse Microsoft operating systems; however, no damage will - be done by them. IBM's &os2; however, will - appropriate any partition it finds which it - does not understand. + If the new drive will not be shared with another + operating system, dedicated mode can be + used. This mode can confuse Microsoft operating systems; + however, no damage will be done by them. To configure a + disk in dedicated mode: &prompt.root; dd if=/dev/zero of=/dev/da1 bs=1k count=1 &prompt.root; bsdlabel -Bw da1 auto @@ -422,89 +412,78 @@ RAIDsoftware RAIDCCD - When choosing a mass storage solution the most important - factors to consider are speed, reliability, and cost. It is - rare to have all three in balance; normally a fast, reliable - mass storage device is expensive, and to cut back on cost - either speed or reliability must be sacrificed. + When choosing a mass storage solution, the most + important factors to consider are speed, reliability, and + cost. It is rare to have all three in balance. Normally a + fast, reliable mass storage device is expensive, and to cut + back on cost either speed or reliability must be + sacrificed. In designing the system described below, cost was chosen as the most important factor, followed by speed, then reliability. Data transfer speed for this system is - ultimately constrained by the network. And while - reliability is very important, the CCD drive described - below serves online data that is already fully backed up - on CD-R's and can easily be replaced. - - Defining your own requirements is the first step in - choosing a mass storage solution. If your requirements - prefer speed or reliability over cost, your solution will - differ from the system described in this section. + ultimately constrained by the network. While reliability is + very important, the CCD drive described below serves online + data that is already fully backed up and which can easily be + replaced. + + Defining the requirements is the first step in choosing + a mass storage solution. If the requirements prefer speed + or reliability over cost, the solution will differ from the + system described in this section. Installing the Hardware In addition to the IDE system disk, three Western Digital 30GB, 5400 RPM IDE disks form the core of the CCD - disk described below providing approximately 90GB of + disk described below, providing approximately 90GB of online storage. Ideally, each IDE disk would have its own IDE controller and cable, but to minimize cost, additional - IDE controllers were not used. Instead the disks were + IDE controllers were not used. Instead, the disks were configured with jumpers so that each IDE controller has one master, and one slave. Upon reboot, the system BIOS was configured to automatically detect the disks attached. More - importantly, FreeBSD detected them on reboot: + importantly, &os; detected them on reboot:ad0: 19574MB <WDC WD205BA> [39770/16/63] at ata0-master UDMA33 ad1: 29333MB <WDC WD307AA> [59598/16/63] at ata0-slave UDMA33 ad2: 29333MB <WDC WD307AA> [59598/16/63] at ata1-master UDMA33 ad3: 29333MB <WDC WD307AA> [59598/16/63] at ata1-slave UDMA33 - If FreeBSD does not detect all the disks, ensure - that you have jumpered them correctly. Most IDE drives - also have a Cable Select jumper. This is - not the jumper for the master/slave - relationship. Consult the drive documentation for help in - identifying the correct jumper. - - Next, consider how to attach them as part of the file - system. You should research both &man.vinum.4; () and &man.ccd.4;. In this - particular configuration, &man.ccd.4; was chosen. + If &os; does not detect all the disks, consult + the drive documentation for proper setup and verify + that the controller is supported by &os;. Setting Up the CCD - The &man.ccd.4; driver allows you to take several - identical disks and concatenate them into one logical file - system. In order to use &man.ccd.4;, you need a kernel - with &man.ccd.4; support built in. Add this line to your - kernel configuration file, rebuild, and reinstall the - kernel: + The &man.ccd.4; driver takes several identical disks + and concatenates them into one logical file system. In + order to use &man.ccd.4;, its kernel module must be + loaded using &man.ccd.4;. When using a custom kernel, + ensure that this line is compiled in: device ccd - The &man.ccd.4; support can also be loaded as a kernel - loadable module. - - To set up &man.ccd.4;, you must first use - &man.bsdlabel.8; to label the disks: + Before configuring &man.ccd.4;, use &man.bsdlabel.8; + to label the disks: bsdlabel -w ad1 auto bsdlabel -w ad2 auto bsdlabel -w ad3 auto - This creates a bsdlabel for + This example creates a bsdlabel for ad1c, ad2c and ad3c that spans the entire disk. - The next step is to change the disk label type. You - can use &man.bsdlabel.8; to edit the disks: + The next step is to change the disk label type. Use + &man.bsdlabel.8; to edit the disks: bsdlabel -e ad1 bsdlabel -e ad2 @@ -537,46 +516,46 @@ bsdlabel -e ad3 Building the File System - Now that you have all the disks labeled, you must - build the &man.ccd.4;. To do that, use &man.ccdconfig.8;, - with options similar to the following: + Now that all the disks are labeled, build the + &man.ccd.4; using &man.ccdconfig.8;, with options similar + to the following: ccdconfig ccd0 32 0 /dev/ad1e /dev/ad2e /dev/ad3e - The use and meaning of each option is shown + The use and meaning of each option is described below: The first argument is the device to configure, in this case, /dev/ccd0c. The - /dev/ portion is optional. + /dev/ portion is optional. - The interleave for the file system. The - interleave defines the size of a stripe in disk - blocks, each normally 512 bytes. So, an interleave of - 32 would be 16,384 bytes. + The interleave for the file system, which defines + the size of a stripe in disk blocks, each normally 512 + bytes. So, an interleave of 32 would be 16,384 + bytes. - Flags for &man.ccdconfig.8;. If you want to - enable drive mirroring, you can specify a flag here. - This configuration does not provide mirroring for + Flags for &man.ccdconfig.8;. For example, to + enable drive mirroring, specify a flag. This + configuration does not provide mirroring for &man.ccd.4;, so it is set at 0 (zero). The final arguments to &man.ccdconfig.8; are the devices to place into the array. Use the complete - pathname for each device. + path name for each device. After running &man.ccdconfig.8; the &man.ccd.4; is - configured. A file system can be installed. Refer to - &man.newfs.8; for options, or simply run: + configured and a file system can be installed. Refer to + &man.newfs.8; for options, or run: newfs /dev/ccd0c @@ -584,9 +563,9 @@ bsdlabel -e ad3 Making it All Automatic - Generally, you will want to mount the &man.ccd.4; upon - each reboot. To do this, you must configure it first. - Write out your current configuration to + Generally, &man.ccd.4; should be configured to + automount upon each reboot. To do this, write out the + current configuration to /etc/ccd.conf using the following command: @@ -599,9 +578,9 @@ bsdlabel -e ad3 mounted. - If you are booting into single user mode, before you - can &man.mount.8; the &man.ccd.4;, you need to issue the - following command to configure the array: + When booting into single user mode, the following + command must be issued to configure the array before + the &man.ccd.4; can be mounted: ccdconfig -C @@ -634,7 +613,7 @@ bsdlabel -e ad3 storage. &man.vinum.4; implements the RAID-0, RAID-1 and RAID-5 models, both individually and in combination. - See for more + Refer to for more information about &man.vinum.4;. @@ -647,32 +626,31 @@ bsdlabel -e ad3 hardware - FreeBSD also supports a variety of hardware + &os; also supports a variety of hardware RAID controllers. These devices control a - RAID subsystem without the need for FreeBSD + RAID subsystem without the need for &os; specific software to manage the array. Using an on-card BIOS, the card - controls most of the disk operations itself. The following is - a brief setup description using a Promise + controls most of the disk operations. The following is a + brief setup description using a Promise IDE RAID controller. When this card is installed and the system is started up, it displays a prompt requesting information. Follow the - instructions to enter the card's setup screen. From here, you - have the ability to combine all the attached drives. After - doing so, the disk(s) will look like a single drive to - FreeBSD. Other RAID levels can be set up + instructions to enter the card's setup screen and to combine + all the attached drives. After doing so, the disks will + look like a single drive to &os;. Other + RAID levels can be set up accordingly. Rebuilding ATA RAID1 Arrays - FreeBSD allows you to hot-replace a failed disk in an - array. This requires that you catch it before you - reboot. + &os; supports the ability to hot-replace a failed disk in + an array. - You will probably see something like the following in + An error indicating a failed disk will appear in /var/log/messages or in the &man.dmesg.8; output: @@ -684,7 +662,7 @@ ad6: hard error reading fsbn 1116119 of status=59 error=40 ar0: WARNING - mirror lost - Using &man.atacontrol.8;, check for further + Use &man.atacontrol.8; to check for further information: &prompt.root; atacontrol list @@ -709,8 +687,8 @@ ar0: ATA RAID1 subdisks: ad4 ad6 status: - You will first need to detach the ata channel with the - failed disk so you can safely remove it: + First, detach the ata channel with the failed disk + so that it can be safely removed: &prompt.root; atacontrol detach ata3 @@ -779,19 +757,18 @@ ar0: ATA RAID1 subdisks: ad4 ad6 status: disks - A lot of external storage solutions, nowadays, use the - Universal Serial Bus (USB): hard drives, USB thumbdrives, CD-R - burners, etc. &os; provides support for these devices. + Many external storage solutions, such as hard drives, USB + thumbdrives, and CD/DVD burners, use the Universal Serial Bus + (USB). &os; provides support for these devices. Configuration The USB mass storage devices driver, &man.umass.4;, - provides the support for USB storage devices. If you use the - GENERIC kernel, you do not have to change - anything in your configuration. If you use a custom kernel, - be sure that the following lines are present in your kernel - configuration file: + is built into the GENERIC kernel + and provides support for USB storage devices. For a custom + kernel, be sure that the following lines are present in the + kernel configuration file: device scbus device da @@ -802,21 +779,17 @@ device ehci device usb device umass - The &man.umass.4; driver uses the SCSI subsystem to access - to the USB storage devices, your USB device will be seen as a - SCSI device by the system. Depending on the USB chipset on - your motherboard, you only need either device - uhci or device ohci for USB 1.X - support, however having both in the kernel configuration file - is harmless. Support for USB 2.0 controllers is provided by - the &man.ehci.4; driver (the device ehci - line). Do not forget to compile and install the new kernel if - you added any lines. + Since the &man.umass.4; driver uses the SCSI subsystem to + access the USB storage devices, any USB device will be seen as + a SCSI device by the system. Depending on the USB chipset on + the motherboard, device uhci or + device ohci is used to provide USB 1.X + support. Support for USB 2.0 controllers is provided by + device ehci. - If your USB device is a CD-R or DVD burner, the SCSI - CD-ROM driver, &man.cd.4;, must be added to the kernel via - the line: + If the USB device is a CD or DVD burner, &man.cd.4;, + must be added to the kernel via the line: device cd @@ -829,9 +802,9 @@ device umass Testing the Configuration - The configuration is ready to be tested: plug in your USB - device, and in the system message buffer (&man.dmesg.8;), the - drive should appear as something like: + To test the USB configuration, plug in the USB device. In + the system message buffer, &man.dmesg.8;, the drive should + appear as something like: umass0: USB Solid state disk, rev 1.10/1.00, addr 2 GEOM: create disk da0 dp=0xc2d74850 @@ -840,97 +813,91 @@ da0: <Generic Traveling Disk 1.11> da0: 1.000MB/s transfers da0: 126MB (258048 512 byte sectors: 64H 32S/T 126C) - Of course, the brand, the device node - (da0) and other details can differ - according to your configuration. - - Since the USB device is seen as a SCSI one, the - camcontrol command can be used to list the - USB storage devices attached to the system: + The brand, device node (da0), and + other details will differ according to the device. + + Since the USB device is seen as a SCSI one, + camcontrol can be used to list the USB + storage devices attached to the system: &prompt.root; camcontrol devlist <Generic Traveling Disk 1.11> at scbus0 target 0 lun 0 (da0,pass0) - If the drive comes with a file system, you should be able - to mount it. The will help you - to format and create partitions on the USB drive if - needed. + If the drive comes with a file system, it can be mounted. + Refer to for + instructions on how to format and create partitions on the USB + drive. - Allowing untrusted users to mount arbitrary media, - e.g., by enabling vfs.usermount as + Allowing untrusted users to mount arbitrary media, by + enabling vfs.usermount as described below, should not be considered safe from a security point of view. Most file systems in &os; were not built to safeguard against malicious devices. - To make this device mountable as a normal user, certain - steps have to be taken. First, the devices that are created - when a USB storage device is connected need to be accessible - by the user. A solution is to make all users of these devices - a member of the operator group. This - is done with &man.pw.8;. Second, when the devices are - created, the operator group should be - able to read and write them. This is accomplished by adding - these lines to + To make the device mountable as a normal user, one + solution is to make all users of the device a member of the + operator group using &man.pw.8;. + Next, ensure that the operator group is + able to read and write the device by adding these lines to /etc/devfs.rules: [localrules=5] add path 'da*' mode 0660 group operator - If there already are SCSI disks in the system, it must - be done a bit different. E.g., if the system already - contains disks da0 through - da2 attached to the system, change + If SCSI disks are installed in the system, change the second line as follows: add path 'da[3-9]*' mode 0660 group operator - This will exclude the already existing disks from - belonging to the operator - group. + This will exclude the first three SCSI disks + (da0 to + da2)from belonging to the + operator group. - You also have to enable your &man.devfs.rules.5; ruleset - in your /etc/rc.conf file: + Next, enable the &man.devfs.rules.5; ruleset in + /etc/rc.conf: devfs_system_ruleset="localrules" - Next, the kernel has to be configured to allow regular - users to mount file systems. The easiest way is to add the + Next, instruct the running kernel to allow regular users + to mount file systems. The easiest way is to add the following line to /etc/sysctl.conf: vfs.usermount=1 - Note that this only takes effect after the next reboot. - Alternatively, one can also use &man.sysctl.8; to set this - variable. + Since this only takes effect after the next reboot use + &man.sysctl.8; to set this variable now. The final step is to create a directory where the file system is to be mounted. This directory needs to be owned by the user that is to mount the file system. One way to do that is for root to create a subdirectory - owned by that user as - /mnt/username - (replace username by the login name - of the actual user and usergroup by - the user's primary group): + owned by that user as /mnt/username. + In the following example, replace + username with the login name of the + user and usergroup with the user's + primary group: &prompt.root; mkdir /mnt/username &prompt.root; chown username:usergroup /mnt/username Suppose a USB thumbdrive is plugged in, and a device - /dev/da0s1 appears. Since these devices - usually come preformatted with a FAT file system, one can - mount them like this: + /dev/da0s1 appears. If the device is + preformatted with a FAT file system, it can be mounted + using: &prompt.user; mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /mnt/username - If you unplug the device (the disk must be unmounted - before), you should see, in the system message buffer, - something like the following: + Before the device can be unplugged, it + must be unmounted first. After device + removal, the system message buffer will show messages similar + to the following: umass0: at uhub0 port 1 (addr 2) disconnected (da0:umass-sim0:0:0:0): lost device @@ -964,7 +931,7 @@ umass0: detached - Creating and Using Optical Media (CDs) + Creating and Using CD Media CDROMs @@ -974,18 +941,18 @@ umass0: detached Introduction - CDs have a number of features that differentiate them from - conventional disks. Initially, they were not writable by the - user. They are designed so that they can be read continuously - without delays to move the head between tracks. They are also - much easier to transport between systems than similarly sized - media were at the time. - - CDs do have tracks, but this refers to a section of data - to be read continuously and not a physical property of the - disk. To produce a CD on FreeBSD, you prepare the data files - that are going to make up the tracks on the CD, then write the - tracks to the CD. + CD media provide a number of features that differentiate + them from conventional disks. Initially, they were not + writable by the user. They are designed so that they can be + read continuously without delays to move the head between + tracks. They are also much easier to transport between + systems. + + CD media do have tracks, but this refers to a section of + data to be read continuously and not a physical property of + the disk. For example, to produce a CD on &os;, prepare the + data files that are going to make up the tracks on the CD, + then write the tracks to the CD. ISO 9660 @@ -994,11 +961,10 @@ umass0: detached The ISO 9660 file system was designed to deal with these - differences. It unfortunately codifies file system limits - that were common then. Fortunately, it provides an extension - mechanism that allows properly written CDs to exceed those - limits while still working with systems that do not support - those extensions. + differences. To overcome the original file system limits, it + provides an extension mechanism that allows properly written + CDs to exceed those limits while still working with systems + that do not support those extensions. The sysutils/cdrtools - port includes &man.mkisofs.8;, a program that you can use to - produce a data file containing an ISO 9660 file - system. It has options that support various extensions, and - is described below. + port includes &man.mkisofs.8;, a program that can be used to + produce a data file containing an ISO 9660 file system. It + has options that support various extensions, and is described + below. CD burner ATAPI - Which tool to use to burn the CD depends on whether your + Which tool to use to burn the CD depends on whether the CD burner is ATAPI or something else. ATAPI CD burners use - the burncd - program that is part of the base system. SCSI and USB CD - burners should use - cdrecord - from the sysutils/cdrtools - port. It is also possible to use - cdrecord - and other tools for SCSI drives on ATAPI hardware with the - ATAPI/CAM module. - - If you want CD burning software with a graphical user - interface, you may wish to take a look at either - X-CD-Roast or + burncd + which is part of the base system. SCSI and USB CD burners + should use cdrecord from the + sysutils/cdrtools port. + It is also possible to use cdrecord and other tools + for SCSI drives on ATAPI hardware with the ATAPI/CAM module. + + For CD burning software with a graphical user + interface, consider X-CD-Roast or K3b. These tools are available as packages or from the sysutils/xcdroast and @@ -1044,11 +1009,10 @@ umass0: detached <application>mkisofs</application> - The &man.mkisofs.8; program, which is part of the - sysutils/cdrtools port, - produces an ISO 9660 file system that is an image of a - directory tree in the &unix; file system name space. The - simplest usage is: + The sysutils/cdrtools + port also installs &man.mkisofs.8;, which produces an ISO 9660 + file system that is an image of a directory tree in the &unix; + file system name space. The simplest usage is: &prompt.root; mkisofs -o imagefile.iso /path/to/tree @@ -1057,11 +1021,11 @@ umass0: detached ISO 9660 - This command will create an + This command creates an imagefile.iso containing an ISO 9660 file system that is a copy of the tree at /path/to/tree. In the process, it - will map the file names to names that fit the limitations of + maps the file names to names that fit the limitations of the standard ISO 9660 file system, and will exclude files that have names uncharacteristic of ISO file systems. @@ -1073,19 +1037,19 @@ umass0: detached file systems Joliet - A number of options are available to overcome those + A number of options are available to overcome these restrictions. In particular, enables the Rock Ridge extensions common to &unix; systems, enables Joliet extensions used by Microsoft systems, and can be used to create HFS file systems used by &macos;. - For CDs that are going to be used only on FreeBSD systems, + For CDs that are going to be used only on &os; systems, can be used to disable all filename restrictions. When used with , it produces - a file system image that is identical to the FreeBSD tree you - started from, though it may violate the ISO 9660 standard in a - number of ways. + a file system image that is identical to the specified &os; + tree, though it may violate the ISO 9660 standard in a number + of ways. CDROMs @@ -1096,36 +1060,35 @@ umass0: detached in producing an El Torito bootable CD. This option takes an argument which is the path to a boot image from the top of the tree being written to the CD. By default, - &man.mkisofs.8; creates an ISO image in the so-called - floppy disk emulation mode, and thus expects - the boot image to be exactly 1200, 1440 or 2880 KB in - size. Some boot loaders, like the one used by the FreeBSD - distribution disks, do not use emulation mode; in this case, - the option should be used. So, - if /tmp/myboot holds a bootable FreeBSD - system with the boot image in - /tmp/myboot/boot/cdboot, you could - produce the image of an ISO 9660 file system in - /tmp/bootable.iso like so: + &man.mkisofs.8; creates an ISO image in floppy disk + emulation mode, and thus expects the boot image to + be exactly 1200, 1440 or 2880 KB in size. Some boot + loaders, like the one used by the &os; distribution disks, do + not use emulation mode. In this case, + should be used. So, if + /tmp/myboot holds a + bootable &os; system with the boot image in /tmp/myboot/boot/cdboot, this + command would produce the image of an ISO 9660 file system as + /tmp/bootable.iso: &prompt.root; mkisofs -R -no-emul-boot -b boot/cdboot -o /tmp/bootable.iso /tmp/myboot *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***