9.1. | How do I move my system over to my huge new disk? |
The best way is to reinstall the OS on the new disk, then move the user data over. This is highly recommended if you have been tracking -STABLE for more than one release, or have updated a release instead of installing a new one. You can install booteasy on both disks with boot0cfg(8), and dual boot them until you are happy with the new configuration. Skip the next paragraph to find out how to move the data after doing this. Should you decide not to do a fresh install, you
need to partition and label the new disk with either
Now you have the new disk set up, and are ready
to move the data. Unfortunately, you cannot just blindly
copy the data. Things like device files (in
You should never use anything but dump(8) and restore(8) to move the root filesystem. The tar(1) command may work - then again, it may not. You should also use dump(8) and restore(8) if you are moving a single partition to another empty partition. The sequence of steps to use dump to move a partitions data to a new partition is:
For example, if you are going to move root to
Rearranging your partitions with dump takes a bit more
work. To merge a partition like
To split a directory from its parent, say putting
You might prefer cpio(1), pax(1), tar(1) to dump(8) for user data. At the time of this writing, these are known to lose file flag information, so use them with caution. | |
9.2. | Will a «dangerously dedicated» disk endanger my health? |
The installation procedure allows you to chose two different methods in partitioning your hard disk(s). The default way makes it compatible with other operating systems on the same machine, by using fdisk table entries (called «slices» in FreeBSD), with a FreeBSD slice that employs partitions of its own. Optionally, one can chose to install a boot-selector to switch between the possible operating systems on the disk(s). The alternative uses the entire disk for FreeBSD, and makes no attempt to be compatible with other operating systems. So why it is called «dangerous»? A disk in this mode does not contain what normal PC utilities would consider a valid fdisk table. Depending on how well they have been designed, they might complain at you once they are getting in contact with such a disk, or even worse, they might damage the BSD bootstrap without even asking or notifying you. In addition, the «dangerously dedicated» disk's layout is known to confuse many BIOSes, including those from AWARD (e.g. as found in HP Netserver and Micronics systems as well as many others) and Symbios/NCR (for the popular 53C8xx range of SCSI controllers). This is not a complete list, there are more. Symptoms of this confusion include the read error message printed by the FreeBSD bootstrap when it cannot find itself, as well as system lockups when booting. Why have this mode at all then? It only saves a few kbytes of disk space, and it can cause real problems for a new installation. «Dangerously dedicated» mode's origins lie in a desire to avoid one of the most common problems plaguing new FreeBSD installers - matching the BIOS «geometry» numbers for a disk to the disk itself. «Geometry» is an outdated concept, but one still at the heart of the PC's BIOS and its interaction with disks. When the FreeBSD installer creates slices, it has to record the location of these slices on the disk in a fashion that corresponds with the way the BIOS expects to find them. If it gets it wrong, you will not be able to boot. «Dangerously dedicated» mode tries to work around this by making the problem simpler. In some cases, it gets it right. But it is meant to be used as a last-ditch alternative - there are better ways to solve the problem 99 times out of 100. So, how do you avoid the need for «DD» mode
when you are installing? Start by making a note of the geometry
that your BIOS claims to be using for your disks. You can
arrange to have the kernel print this as it boots by specifying
When you are slicing up your disk, check that the disk geometry displayed in the FDISK screen is correct (ie. it matches the BIOS numbers); if it is wrong, use the g key to fix it. You may have to do this if there is absolutely nothing on the disk, or if the disk has been moved from another system. Note that this is only an issue with the disk that you are going to boot from; FreeBSD will sort itself out just fine with any other disks you may have. Once you have got the BIOS and FreeBSD agreeing about the geometry of the disk, your problems are almost guaranteed to be over, and with no need for «DD» mode at all. If, however, you are still greeted with the dreaded read error message when you try to boot, it is time to cross your fingers and go for it - there is nothing left to lose. To return a «dangerously dedicated» disk for normal PC use, there are basically two options. The first is, you write enough NULL bytes over the MBR to make any subsequent installation believe this to be a blank disk. You can do this for example with
Alternatively, the undocumented DOS «feature»
will to install a new master boot record as well, thus clobbering the BSD bootstrap. | |
9.3. | Which partitions can safely use Soft Updates? I have
heard that Soft Updates on |
Short answer: you can usually use Soft Updates safely on all partitions. Long answer: There used to be some concern over using Soft Updates on the root partition. Soft Updates has two characteristics that caused this. First, a Soft Updates partition has a small chance of losing data during a system crash. (The partition will not be corrupted; the data will simply be lost.) Also, Soft Updates can cause temporary space shortages. When using Soft Updates, the kernel can take up to thirty seconds to actually write changes to the physical disk. If you delete a large file, the file still resides on disk until the kernel actually performs the deletion. This can cause a very simple race condition. Suppose you delete one large file and immediately create another large file. 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. You get an error that the partition does not have enough space, although you know perfectly well that you just released a large chunk of space! When you try again mere seconds later, the file creation works as you expect. This has left more than one user scratching his head and doubting his sanity, the FreeBSD filesystem, or both. 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 or corrupted. This risk is extremely small, but generally manageable. Use of IDE write caching greatly increases this risk; it is strongly recommended that you disable IDE write caching when using Soft Updates. 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. Files such as
| |
9.4. | What is inappropriate about my ccd? |
The symptom of this is:
This usually happens when you are trying to concatenate
the | |
9.5. | Why can I not edit the disklabel on my ccd? |
The symptom of this is:
This is because the disklabel returned by ccd is actually a «fake» one that is not really on the disk. You can solve this problem by writing it back explicitly, as in:
| |
9.6. | Can I mount other foreign filesystems under FreeBSD? |
FreeBSD supports a variety of other filesystems.
FreeBSD also supports network filesystems such as NFS (see mount_nfs(8)), NetWare (see mount_nwfs(8)), and Microsoft-style SMB filesystems (see mount_smbfs(8)). | |
9.7. | How do I mount a secondary DOS partition? |
The secondary DOS partitions are found after ALL the
primary partitions. For example, if you have an
«E» partition as the second DOS partition on
the second SCSI drive, you need to create the special files
for «slice 5» in
Σημείωση:You can omit this step if you are running FreeBSD 5.0-RELEASE or newer with devfs(5) enabled. | |
9.8. | Is there a cryptographic filesystem for FreeBSD? |
Yes. FreeBSD 5.0 includes gbde(8), and FreeBSD 6.0 added geli(8). For earlier releases, see the security/cfs port. | |
9.9. | How can I use the Windows NT(R) loader to boot FreeBSD? |
The general idea is that you copy the first sector of your
native root FreeBSD partition into a file in the DOS/Windows NT(R)
partition. Assuming you name that file something like
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows NT" C:\BOOTSECT.BSD="FreeBSD" C:\="DOS" If FreeBSD is installed on the same disk as the Windows NT(R) boot
partition simply copy
Προειδοποίηση:Do not simply copy When the FreeBSD boot manager runs it records the last
OS booted by setting the active flag on the partition table
entry for that OS and then writes the whole 512-bytes of itself
back to the MBR so if you just copy
| |
9.10. | How do I boot FreeBSD and Linux(R) from LILO? |
If you have FreeBSD and Linux(R) on the same disk, just follow LILO's installation instructions for booting a non-Linux(R) operating system. Very briefly, these are: Boot Linux(R), and add the following lines to
other=/dev/hda2 table=/dev/hda label=FreeBSD (the above assumes that your FreeBSD slice is known to
Linux(R) as If FreeBSD resides on another disk, you need to add
other=/dev/dab4 table=/dev/dab loader=/boot/chain.b label=FreeBSD In some cases you may need to specify the BIOS drive number to the FreeBSD boot loader to successfully boot off the second disk. For example, if your FreeBSD SCSI disk is probed by BIOS as BIOS disk 1, at the FreeBSD boot loader prompt you need to specify: Boot: You can configure boot(8) to automatically do this for you at boot time. The Linux(R)+FreeBSD mini-HOWTO is a good reference for FreeBSD and Linux(R) interoperability issues. | |
9.11. | How do I boot FreeBSD and Linux(R) using GRUB |
Booting FreeBSD using GRUB is very simple. Just
add the following to your configuration file
title FreeBSD 6.1 root (hd0,a) kernel /boot/loader Where | |
9.12. | How do I boot FreeBSD and Linux(R) using BootEasy? |
Install LILO at the start of your Linux(R) boot partition instead of in the Master Boot Record. You can then boot LILO from BootEasy. If you are running Windows(R) 95 and Linux(R) this is recommended anyway, to make it simpler to get Linux(R) booting again if you should need to reinstall Windows(R) 95 (which is a Jealous Operating System, and will bear no other Operating Systems in the Master Boot Record). | |
9.13. | How do I change the boot prompt from |
You can not do that with the standard boot manager without
rewriting it. There are a number of other boot managers
in the | |
9.14. | I have a new removable drive, how do I use it? |
Whether it is a removable drive like a Zip(R) or an EZ drive (or even a floppy, if you want to use it that way), or a new hard disk, once it is installed and recognized by the system, and you have your cartridge/floppy/whatever slotted in, things are pretty much the same for all devices. (this section is based on Mark Mayo's ZIP FAQ) If it is a ZIP drive or a floppy, you have already got a DOS filesystem on it, you can use a command like this:
if it is a floppy, or this:
for a ZIP disk with the factory configuration. For other disks, see how they are laid out using fdisk(8) or sysinstall(8). The rest of the examples will be for a ZIP drive on da2, the third SCSI disk. Unless it is a floppy, or a removable you plan on sharing
with other people, it is probably a better idea to stick a BSD
filesystem on it. You will get long filename support, at least a
2X improvement in performance, and a lot more stability. First,
you need to redo the DOS-level partitions/filesystems. You can
either use fdisk(8) or
You can use disklabel or
Finally, create a new filesystem, this one is on our ZIP drive using the whole disk:
and mount it:
and it is probably a good idea to add a line like this
to /dev/da2c /zip ffs rw,noauto 0 0 | |
9.15. | Why do I get Incorrect super block when mounting a CDROM? |
You have to tell mount(8) the type of the device that you want to mount. This is described in the Handbook section on optical media, specifically the section Using Data CDs. | |
9.16. | Why do I get Device not configured when mounting a CDROM? |
This generally means that there is no CDROM in the CDROM drive, or the drive is not visible on the bus. Please see the Using Data CDs section of the Handbook for a detailed discussion of this issue. | |
9.17. | Why do all non-English characters in filenames show up as «?» on my CDs when mounted in FreeBSD? |
Your CDROM probably uses the «Joliet» extension for storing information about files and directories. This is discussed in the Handbook chapter on creating and using CDROMs, specifically the section on Using Data CDROMs. | |
9.18. | I burned a CD under FreeBSD and now I can not read it under any other operating system. Why? |
You most likely burned a raw file to your CD, rather than creating an ISO 9660 filesystem. Take a look at the Handbook chapter on creating CDROMs, particularly the section on burning raw data CDs. | |
9.19. | How can I create an image of a data CD? |
This is discussed in the Handbook section on duplicating data CDs. For more on working with CDROMs, see the Creating CDs Section in the Storage chapter in the Handbook. | |
9.20. | Why can I not |
If you try to mount an audio CD, you will get an error
like cd9660: /dev/acd0c: Invalid
argument. This is because
| |
9.21. | How do I |
By default, mount(8) will attempt to mount the
last data track (session) of a CD. If you would like to
load an earlier session, you must use the
| |
9.22. | How do I let ordinary users mount floppies, CDROMs and other removable media? |
Ordinary users can be permitted to mount devices. Here is how:
All users can now mount the floppy
Users in group
Unmounting the device is simple:
Enabling Σημείωση:The device name used in the previous examples must be changed according to your configuration. | |
9.23. | The |
You need to understand what When a program is using a file, and you delete the
file, the file is not really removed from the filesystem
until the program stops using it. The file is immediately
deleted from the directory listing, however. You can see
this easily enough with a program such as
Note that Soft Updates can delay the freeing of disk space; you might need to wait up to 30 seconds for the change to be visible! 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 | |
9.24. | How can I add more swap space? |
In the Configuration and Tuning section of the Handbook, you will find a section describing how to do this. | |
9.25. | 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 80GB as holding 76319MB. Also note that FreeBSD will (by default) reserve 8% of the disk space. | |
9.26. | 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 the |
Αυτό το κείμενο, και άλλα κείμενα, μπορεί να βρεθεί στο ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/
Για ερωτήσεις σχετικά με το FreeBSD, διαβάστε την
τεκμηρίωση πριν να επικοινωνήσετε με την
<questions@FreeBSD.org>.
Για ερωτήσεις σχετικά με αυτή την τεκμηρίωση, στείλτε e-mail στην
<doc@FreeBSD.org>.