8.1. | How can I add my new hard disk to my FreeBSD system? |
See the Adding Disks section in the FreeBSD Handbook. | |
8.2. | How do I move my system over to my huge new disk? |
The best way is to reinstall the operating system on the new disk, then move the user data over. This is highly recommended when tracking -STABLE for more than one release or when updating a release instead of installing a new one. Install booteasy on both disks with boot0cfg(8) and dual boot until you are happy with the new configuration. Skip the next paragraph to find out how to move the data after doing this. Alternatively, partition and label the new disk with either sade(8) or gpart(8). If the disks are MBR-formatted, booteasy can be installed on both disks with boot0cfg(8) so that the computer can dual boot to the old or new system after the copying is done. Once the new disk set up, the data cannot just be copied. Instead, use tools that understand device files and system flags, such as dump(8). Although it is recommended to move the data while in single-user mode, it is not required. When the disks are formatted with
UFS, never use anything but
dump(8) and restore(8) to move the root file
system. These commands should also be used when moving a
single partition to another empty partition. The sequence
of steps to use
For example, to move
Rearranging partitions with
To split a directory from its parent, say putting
The cpio(1) and pax(1) utilities are also available for moving user data. These are known to lose file flag information, so use them with caution. | |
8.3. | Which partitions can safely use Soft Updates? I have
heard that Soft Updates on |
Short answer: Soft Updates can usually be safely used on all partitions. Long answer: Soft Updates has two characteristics that may be undesirable on certain partitions. First, a Soft Updates partition has a small chance of losing data during a system crash. The partition will not be corrupted as the data will simply be lost. Second, Soft Updates can cause temporary space shortages. When using Soft Updates, the kernel can take up to thirty seconds to write changes to the physical disk. When a large file is deleted the file still resides on disk until the kernel actually performs the deletion. This can cause a very simple race condition. Suppose one large file is deleted and another large file is immediately created. The first large file is not yet actually removed from the physical disk, so the disk might not have enough room for the second large file. This will produce an error that the partition does not have enough space, even though a large chunk of space has just been released. A few seconds later, the file creation works as expected. If a system should crash after the kernel accepts a chunk of data for writing to disk, but before that data is actually written out, data could be lost. This risk is extremely small, but generally manageable. These issues affect all partitions using Soft Updates. So, what does this mean for the root partition? Vital information on the root partition changes very rarely. If the system crashed during the thirty-second window after such a change is made, it is possible that data could be lost. This risk is negligible for most applications, but be aware that it exists. If the system cannot tolerate this much risk, do not use Soft Updates on the root file system!
Finally, dump(8) does not work in live mode (-L) on a filesystem, with Journaled Soft Updates (SU+J). | |
8.4. | Can I mount other foreign file systems under FreeBSD? |
FreeBSD supports a variety of other file systems.
FreeBSD includes the Network File System NFS and the FreeBSD Ports Collection provides several FUSE applications to support many other file systems. | |
8.5. | How do I mount a secondary DOS partition? |
The secondary DOS partitions are found after
all the primary partitions. For
example, if
| |
8.6. | Is there a cryptographic file system for FreeBSD? |
Yes, gbde(8) and geli(8). See the Encrypting Disk Partitions section of the FreeBSD Handbook. | |
8.7. | How do I boot FreeBSD and Linux® using GRUB? |
To boot FreeBSD using GRUB,
add the following to either
title FreeBSD 9.1
root Where | |
8.8. | How do I boot FreeBSD and Linux® using BootEasy? |
Install LILO at the start of the Linux® boot partition instead of in the Master Boot Record. Then boot LILO from BootEasy. This is recommended when running Windows® and Linux® as it makes it simpler to get Linux® booting again if Windows® is reinstalled. | |
8.9. | How do I change the boot prompt from
|
This cannot be accomplished with the standard boot
manager without rewriting it. There are a number of other
boot managers in the | |
8.10. | How do I use a new removable drive? |
If the drive already has a file system on it, use a command like this:
If the drive will only be used with FreeBSD systems, partition it with UFS or ZFS. This will provide long filename support, improvement in performance, and stability. If the drive will be used by other operating systems, a more portable choice, such as msdosfs, is better.
Finally, create a new file system:
and mount it:
It is a good idea to add a line to
/dev/da0p1 /mnt ufs rw,noauto 0 0 | |
8.11. | Why do I get Incorrect super block when mounting a CD? |
The type of device to mount must be specified. This is described in the Handbook section on Using Data CDs. | |
8.12. | Why do I get Device not configured when mounting a CD? |
This generally means that there is no CD in the drive, or the drive is not visible on the bus. Refer to the Using Data CDs section of the Handbook for a detailed discussion of this issue. | |
8.13. | Why do all non-English characters in filenames show up as “?” on my CDs when mounted in FreeBSD? |
The CD probably uses the “Joliet” extension for storing information about files and directories. This is discussed in the Handbook section on Using Data CD-ROMs. | |
8.14. | A CD burned under FreeBSD cannot be read under any other operating system. Why? |
This means a raw file was burned to the CD, rather than creating an ISO 9660 file system. Take a look at the Handbook section on Using Data CDs. | |
8.15. | How can I create an image of a data CD? |
This is discussed in the Handbook section on Writing Data to an ISO File System. For more on working with CD-ROMs, see the Creating CDs Section in the Storage chapter in the Handbook. | |
8.16. | Why can I not |
Trying to mount an audio CD will produce an error
like cd9660: /dev/cd0: Invalid
argument. This is because
| |
8.17. | How do I |
By default, mount(8) will attempt to mount the
last data track (session) of a CD. To
load an earlier session, use the
| |
8.18. | How do I let ordinary users mount CD-ROMs, DVDs, USB drives, and other removable media? |
As
To make this persist across reboots, add the line
Users can only mount devices they have read
permissions to. To allow users to mount a device
permissions must be set in
For example, to allow users to mount the first USB drive add: # Allow all users to mount a USB drive. own /dev/da0 root:operator perm /dev/da0 0666 All users can now mount devices they could read onto a directory that they own:
Unmounting the device is simple:
Enabling Note:The device name used in the previous examples must be changed according to the configuration. | |
8.19. | The |
This is due to how these commands actually work.
When a program is using a file, and the file is
deleted, the file is not really removed from the file
system until the program stops using it. The file is
immediately deleted from the directory listing, however.
As an example, consider a file large enough
to affect the output of
This situation is common on web servers. Many people
set up a FreeBSD web server and forget to rotate the log
files. The access log fills up Note that Soft Updates can delay the freeing of disk space and it can take up to 30 seconds for the change to be visible. | |
8.20. | How can I add more swap space? |
This section of the Handbook describes how to do this. | |
8.21. | Why does FreeBSD see my disk as smaller than the manufacturer says it is? |
Disk manufacturers calculate gigabytes as a billion bytes each, whereas FreeBSD calculates them as 1,073,741,824 bytes each. This explains why, for example, FreeBSD's boot messages will report a disk that supposedly has 80 GB as holding 76,319 MB. Also note that FreeBSD will (by default) reserve 8% of the disk space. | |
8.22. | How is it possible for a partition to be more than 100% full? |
A portion of each UFS partition (8%, by default) is
reserved for use by the operating system and the
For more details, look up |
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.