Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

FAQs for FreeBSD 2.X, 3.X and 4

.X.pdf
Скачиваний:
9
Добавлен:
23.08.2013
Размер:
888.6 Кб
Скачать

Chapter 3 Installation

20. Is FreeBSD compatible with any disk managers?

FreeBSD recognizes the Ontrack Disk Manager and makes allowances for it. Other disk managers are not supported.

If you just want to use the disk with FreeBSD you do not need a disk manager. Just configure the disk for as much space as the BIOS can deal with (usually 504 megabytes), and FreeBSD should figure out how much space you really have. If you are using an old disk with an MFM controller, you may need to explicitly tell FreeBSD how many cylinders to use.

If you want to use the disk with FreeBSD and another operating system, you may be able to do without a disk manager: just make sure the FreeBSD boot partition and the slice for the other operating system are in the first 1024 cylinders. If you are reasonably careful, a 20 megabyte boot partition should be plenty.

21. When I boot FreeBSD I get Missing Operating System. What is happening?

This is classically a case of FreeBSD and DOS or some other OS conflicting over their ideas of disk geometry. You will have to reinstall FreeBSD, but obeying the instructions given above will almost always get you going.

22. Why can I not get past the boot manager’s F? prompt?

This is another symptom of the problem described in the preceding question. Your BIOS geometry and FreeBSD geometry settings do not agree! If your controller or BIOS supports cylinder translation (often marked as “ >1GB drive support”), try toggling its setting and reinstalling FreeBSD.

23. Do I need to install the complete sources?

In general, no. However, we would strongly recommend that you install, at a minimum, the base source kit, which includes several of the files mentioned here, and the sys (kernel) source kit, which includes sources for the kernel. There is nothing in the system which requires the presence of the sources to operate, however, except for the kernel-configuration program config(8). With the exception of the kernel sources, our build structure is set up so that you can read-only mount the sources from elsewhere via NFS and still be able to make new binaries (due to the kernel-source restriction, we recommend that you not mount this on /usr/src directly, but rather in some other location with appropriate symbolic links to duplicate the top-level structure of the source tree).

Having the sources on-line and knowing how to build a system with them will make it much easier for you to upgrade to future releases of FreeBSD.

To actually select a subset of the sources, use the Custom menu item when you are in the Distributions menu of the system installation tool.

24. Do I need to build a kernel?

Building a new kernel was originally pretty much a required step in a FreeBSD installation, but more recent releases have benefited from the introduction of a much friendlier kernel configuration tool. When at the FreeBSD boot prompt (boot:), use the -c flag and you will be dropped into a visual configuration screen which allows you to configure the kernel’s settings for most common ISA cards.

It is still recommended that you eventually build a new kernel containing just the drivers that you need, just to save a bit of RAM, but it is no longer a strict requirement for most systems.

17

Chapter 3 Installation

25. Should I use DES, Blowfish, or MD5 passwords and how do I specify which form my users receive?

The default password format on FreeBSD is to use MD5-based passwords. These are believed to be more secure than the traditional Unix password format, which used a scheme based on the DES algorithm. DES passwords are still available if you need to share your password file with legacy operating systems which still use the less secure password format (they are available if you choose to install the “crypto” distribution in sysinstall, or by installing the crypto sources if building from source). Installing the crypto libraries will also allow you to use the Blowfish password format, which is more secure. Which password format to use for new passwords is controlled by the “passwd_format” login capability in /etc/login.conf, which takes values of “des”, “blf” (if these are available)

or “md5”. See the login.conf(5) manual page for more information about login capabilities.

26. Why does the boot floppy start, but hang at the Probing Devices... screen?

If you have a IDE Zip or Jaz drive installed, remove it and try again. The boot floppy can get confused by the drives. After the system is installed you can reconnect the drive. Hopefully this will be fixed in a later release.

27. Why do I get a panic: can’t mount root error when rebooting the system after installation?

This error comes from confusion between the boot block’s and the kernel’s understanding of the disk devices. The error usually manifests on two-disk IDE systems, with the hard disks arranged as the master or single device on separate IDE controllers, with FreeBSD installed on the secondary IDE controller. The boot blocks think the system is installed on wd1 (the second BIOS disk) while the kernel assigns the first disk on the secondary controller device wd2. After the device probing, the kernel tries to mount what the boot blocks think is the boot disk, wd1, while it is really wd2, and fails.

To fix the problem, do one of the following:

1.For FreeBSD 3.3 and later, reboot the system and hit Enter at the Booting kernel in 10 seconds; hit [Enter] to interrupt prompt. This will drop you into the boot loader.

Then type set root_disk_unit="disk_number" . disk_number will be 0 if FreeBSD is installed on the master drive on the first IDE controller, 1 if it is installed on the slave on the first IDE controller, 2 if it is installed on the master of the second IDE controller, and 3 if it is installed on the slave of the second IDE controller.

Then type boot, and your system should boot correctly.

To make this change permanent (ie so you do not have to do this every time you reboot or turn on your FreeBSD machine), put the line root_disk_unit="disk_number" in /boot/loader.conf.local .

2.If using FreeBSD 3.2 or earlier, at the Boot: prompt, enter 1:wd(2,a)kernel and press Enter. If the system starts, then run the command echo "1:wd(2,a)kernel" > /boot.config to make it the default boot string.

3.Move the FreeBSD disk onto the primary IDE controller, so the hard disks are consecutive.

4.Rebuild your kernel, (../handbook/kernelconfig.html) modify the wd configuration lines to read:

controller

wdc0

at isa? port

"IO_WD1"

bio irq

14

vector

wdintr

disk

wd0

at wdc0 drive 0

 

 

 

 

 

 

 

# disk

wd1

 

at wdc0 drive

1

# comment out this

line

controller

wdc1

at

isa?

port

"IO_WD2"

bio irq

15

vector

wdintr

disk

wd1

at

wdc1

drive 0

#

change from

wd2 to

wd1

18

Chapter 3 Installation

disk

wd2

at wdc1 drive 1 # change from wd3 to wd2

Install the new kernel. If you moved your disks and wish to restore the previous configuration, replace the disks in the desired configuration and reboot. Your system should boot successfully.

28. What are the limits for memory?

For memory, the limit is 4 gigabytes. If you plan to install this much memory into a machine, you need to be careful. You will probably want to use ECC memory and to reduce capacitive loading use 9 chip memory modules versus 18 chip memory modules.

29. What are the limits for ffs filesystems?

For ffs filesystems, the maximum theoretical limit is 8 terabytes (2G blocks), or 16TB for the default block size of 8K. In practice, there is a soft limit of 1 terabyte, but with modifications filesystems with 4 terabytes are possible (and exist).

The maximum size of a single ffs file is approximately 1G blocks, or 4TB with a block size of 4K.

Table 3-1. Maximum file sizes

fs block size

2.2.7-stable

3.0-current

works

should work

4K

4T-1

4T-1

4T-1

>4T

8K

>32G

8T-1

>32G

32T-1

16K

>128G

16T-1

>128G

32T-1

32K

>512G

32T-1

>512G

64T-1

64K

>2048G

64T-1

>2048G

128T-1

When the fs block size is 4K, triple indirect blocks work and everything should be limited by the maximum fs block number that can be represented using triple indirect blocks (approx. 1K^3 + 1K^2 + 1K), but everything is limited by a (wrong) limit of 1G-1 on fs block numbers. The limit on fs block numbers should be 2G-1. There are some bugs for fs block numbers near 2G-1, but such block numbers are unreachable when the fs block size is 4K.

For block sizes of 8K and larger, everything should be limited by the 2G-1 limit on fs block numbers, but is actually limited by the 1G-1 limit on fs block numbers, except under -STABLE triple indirect blocks are unreachable, so the limit is the maximum fs block number that can be represented using double indirect blocks (approx. (blocksize/4)^2 + (blocksize/4)), and under -CURRENT exceeding this limit may cause problems. Using the correct limit of 2G-1 blocks does cause problems.

30. Why do I get an error message, archsw.readin.failed after compiling and booting a new kernel?

You can boot by specifying the kernel directly at the second stage, pressing any key when the | shows up before loader is started. More specifically, you have upgraded the source for your kernel, and installed a new kernel builtin from them without making world. This is not supported. Make world.

31. How do I upgrade from 3.X -> 4.X?

We strongly recommend that you use binary snapshots to do this. 4-STABLE snapshots are available at

19

Chapter 3 Installation

ftp://releng4.FreeBSD.org/.

Because of the many changes between 3.X and 4-STABLE, a direct upgrade from source will probably fail. A source upgrade can be done, but only in stages. First, upgrade to the latest 3-STABLE (RELENG_3). Then upgrade to 4.1.1-RELEASE (RELENG_4_1_1_RELEASE). Finally, upgrade to 4-STABLE (RELENG_4).

If you wish to upgrade using source, please see the FreeBSD Handbook (../handbook/cutting-edge.html) for more information.

Caution: Upgrading via source is never recommended for new users, and upgrading from 3.X to 4.X is even less so; make sure you have read the instructions carefully before attempting to upgrade via source.

32. What are these “security profiles”?

A “security profile” is a set of configuration options that attempts to achieve the desired ratio of security to convenience by enabling and disabling certain programs and other settings. For full details, see the Security Profile (../handbook/install-post.html#SECURITYPROFILE) section of the Handbook’s post-install chapter (../handbook/install-post.html).

Notes

1. In an e-mail from Keith Frechette <kfrechet@us.ibm.com>.

20

Chapter 4 Hardware compatibility

1. Does FreeBSD support architectures other than the x86?

Yes. FreeBSD currently runs on both Intel x86 and DEC (now Compaq) Alpha architectures. Interest has also been expressed in a port of FreeBSD to the SPARC architecture, join the FreeBSD SPARC porting mailing list <freebsd-sparc@FreeBSD.org> if you are interested in joining that project. Most recent additions to the list of upcoming platforms are IA-64 and PowerPC, join the FreeBSD IA64 porting mailing list <freebsd-ia64@FreeBSD.org> or the FreeBSD PowerPC porting mailing list <freebsd-ppc@FreeBSD.org> respectively for more information about ongoing work on these platforms. For general discussion on new architectures, join the FreeBSD non-Intel platforms porting mailing list <freebsd-platforms@FreeBSD.org>.

If your machine has a different architecture and you need something right now, we suggest you look at NetBSD (http://www.netbsd.org/) or OpenBSD (http://www.openbsd.org/).

2. I want to get a piece of hardware for my FreeBSD system. Which model/brand/type is best?

This is discussed continually on the FreeBSD mailing lists. Since hardware changes so quickly, however, we expect this. We still strongly recommend that you read through the Hardware Notes (http://www.FreeBSD.org/releases/4.7R/hardware.html) and search the mailing list archives (http://www.freebsd.org/search/#mailinglists) before asking about the latest and greatest hardware. Chances are a discussion about the type of hardware you are looking for took place just last week.

If you are looking for a laptop, check the FreeBSD-mobile mailing list archives. Otherwise, you probably want the archives for FreeBSD-questions, or possibly a specific mailing list for a particular hardware type.

3. What kind of hard drives does FreeBSD support?

FreeBSD supports EIDE and SCSI drives (with a compatible controller; see the next section), and all drives using the original “Western Digital” interface (MFM, RLL, ESDI, and of course IDE). A few ESDI controllers that use proprietary interfaces may not work: stick to WD1002/3/6/7 interfaces and clones.

4. Which SCSI controllers are supported?

See the complete list in the current Hardware Notes (http://www.FreeBSD.org/releases/4.7R/hardware.html).

5. Which CDROM drives are supported by FreeBSD?

Any SCSI drive connected to a supported controller is supported.

The following proprietary CDROM interfaces are also supported:

Mitsumi LU002 (8bit), LU005 (16bit) and FX001D (16bit 2x Speed).

Sony CDU 31/33A

Sound Blaster Non-SCSI CDROM

Matsushita/Panasonic CDROM

ATAPI compatible IDE CDROMs

21

Chapter 4 Hardware compatibility

All non-SCSI cards are known to be extremely slow compared to SCSI drives, and some ATAPI CDROMs may not work.

As of 2.2 the FreeBSD CDROM from the FreeBSD Mall supports booting directly from the CD.

6. Which CD-RW drives are supported by FreeBSD?

FreeBSD supports any ATAPI-compatible IDE CD-R or CD-RW drive. For FreeBSD versions 4.0 and later, see the manual page for burncd(8). For earlier FreeBSD versions, see the examples in /usr/share/examples/atapi.

FreeBSD also supports any SCSI CD-R or CD-RW drives. Install and use the cdrecord command from the ports or packages system, and make sure that you have the pass device compiled in your kernel.

7. Does FreeBSD support ZIP drives?

FreeBSD supports the SCSI ZIP drive out of the box, of course. The ZIP drive can only be set to run at SCSI target IDs 5 or 6, but if your SCSI host adapter’s BIOS supports it you can even boot from it. It is not clear which host adapters support booting from targets other than 0 or 1, so you will have to consult your adapter’s documentation if you would like to use this feature.

ATAPI (IDE) Zip drives are supported in FreeBSD 2.2.6 and later releases.

FreeBSD has contained support for Parallel Port Zip Drives since version 3.0. If you are using a sufficiently up to date version, then you should check that your kernel contains the scbus0, da0, ppbus0, and vp0 drivers (the GENERIC kernel contains everything except vp0). With all these drivers present, the Parallel Port drive should be available as /dev/da0s4. Disks can be mounted using mount /dev/da0s4 /mnt OR (for dos disks) mount_msdos /dev/da0s4 /mnt as appropriate.

Also check out the FAQ on removable drives later in this chapter, and the note on “formatting” in the Administration chapter.

8. Does FreeBSD support JAZ, EZ and other removable drives?

Apart from the IDE version of the EZ drive, these are all SCSI devices, so they should all look like SCSI disks to FreeBSD, and the IDE EZ should look like an IDE drive.

I am not sure how well FreeBSD supports changing the media out while running. You will of course need to dismount the drive before swapping media, and make sure that any external units are powered on when you boot the system so FreeBSD can see them.

See this note on “formatting” .

9. Which multi-port serial cards are supported by FreeBSD?

There is a list of these in the Miscellaneous devices (../handbook/install.html#INSTALL-MISC) section of the handbook.

Some unnamed clone cards have also been known to work, especially those that claim to be AST compatible.

Check the sio(4) manual page to get more information on configuring such cards.

22

Chapter 4 Hardware compatibility

10. Does FreeBSD support my USB keyboard?

USB device support was added to FreeBSD 3.1. However, it is still in preliminary state and may not always work as of version 3.2. If you want to experiment with the USB keyboard support, follow the procedure described below.

1.Use FreeBSD 3.2 or later.

2.Add the following lines to your kernel configuration file, and rebuild the kernel.

device uhci

device ohci

device usb

device ukbd

options KBD_INSTALL_CDEV

In versions of FreeBSD before 4.0, use this instead:

controller uhci0

controller ohci0

controller usb0

controller ukbd0

options KBD_INSTALL_CDEV

3.Go to the /dev directory and create device nodes as follows:

#cd /dev

#./MAKEDEV kbd0 kbd1

4.Edit /etc/rc.conf and add the following lines:

usbd_enable="YES"

usbd_flags=""

After the system is rebooted, the AT keyboard becomes /dev/kbd0 and the USB keyboard becomes /dev/kbd1, if both are connected to the system. If there is the USB keyboard only, it will be /dev/ukbd0.

If you want to use the USB keyboard in the console, you have to explicitly tell the console driver to use the existing USB keyboard. This can be done by running the following command as a part of system initialization.

# kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null

Note that if the USB keyboard is the only keyboard, it is accessed as /dev/kbd0, thus, the command should look like:

# kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null

/etc/rc.i386 is a good place to add the above command.

Once this is done, the USB keyboard should work in the X environment as well without any special settings.

Hot-plugging and unplugging of the USB keyboard may not work quite right yet. It is a good idea to connect the keyboard before you start the system and leave it connected until the system is shutdown to avoid troubles.

See the ukbd(4) manual page for more information.

23

Chapter 4 Hardware compatibility

11. I have an unusual bus mouse. How do I set it up?

FreeBSD supports the bus mouse and the InPort bus mouse from such manufactures as Microsoft, Logitech and ATI. The bus device driver is compiled in the GENERIC kernel by default in FreeBSD versions 2.X, but not included in version 3.0 or later. If you are building a custom kernel with the bus mouse driver, make sure to add the following line to the kernel config file

In FreeBSD 3.0 or before, add:

device mse0 at isa? port 0x23c tty irq5 vector mseintr

In FreeBSD 3.X, the line should be:

device mse0 at isa? port 0x23c tty irq5

And in FreeBSD 4.X and later, the line should read:

device mse0 at isa? port 0x23c irq5

Bus mice usually comes with dedicated interface cards. These cards may allow you to set the port address and the IRQ number other than shown above. Refer to the manual of your mouse and the mse(4) manual page for more information.

12. How do I use my PS/2 (“mouse port” or “keyboard”) mouse?

If you are running a post-2.2.5 version of FreeBSD, the necessary driver, psm, is included and enabled in the kernel. The kernel should detect your PS/2 mouse at boot time.

If you are running a previous but relatively recent version of FreeBSD (2.1.X or better) then you can simply enable it in the kernel configuration menu at installation time, otherwise later with -c at the boot: prompt. It is disabled by default, so you will need to enable it explicitly.

If you are running an older version of FreeBSD then you will have to add the following lines to your kernel configuration file and compile a new kernel.

In FreeBSD 3.0 or earlier, the line should be:

device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr

In FreeBSD 3.1 or later, the line should be:

device psm0 at isa? tty irq 12

In FreeBSD 4.0 or later, the line should be:

device psm0 at atkbdc? irq 12

See the Handbook entry on configuring the kernel (../handbook/kernelconfig.html) if you have no experience with building kernels.

Once you have a kernel detecting psm0 correctly at boot time, make sure that an entry for psm0 exists in /dev. You can do this by typing:

# cd /dev; sh MAKEDEV psm0

24

Chapter 4 Hardware compatibility

when logged in as root.

13. Is it possible to make use of a mouse in any way outside the X Window system?

If you are using the default console driver, syscons, you can use a mouse pointer in text consoles to cut & paste text. Run the mouse daemon, moused, and turn on the mouse pointer in the virtual console:

#moused -p /dev/xxxx -t yyyy

#vidcontrol -m on

Where xxxx is the mouse device name and yyyy is a protocol type for the mouse. See the moused(8) manual page for supported protocol types.

You may wish to run the mouse daemon automatically when the system starts. In version 2.2.1, set the following variables in /etc/sysconfig.

mousedtype="yyyy"

mousedport="xxxx"

mousedflags=""

In versions 2.2.2 to 3.0, set the following variables in /etc/rc.conf.

moused_type="yyyy"

moused_port="xxxx"

moused_flags=""

In 3.1 and later, assuming you have a PS/2 mouse, all you need to is add moused_enable="YES" to

/etc/rc.conf.

In addition, if you would like to be able to use the mouse daemon on all virtual terminals instead of just console at boot-time, add the following to /etc/rc.conf.

allscreens_flags="-m on"

Staring from FreeBSD 2.2.6, the mouse daemon is capable of determining the correct protocol type automatically unless the mouse is a relatively old serial mouse model. Specify auto the protocol to invoke automatic detection.

When the mouse daemon is running, access to the mouse needs to be coordinated between the mouse daemon and other programs such as the X Window. Refer to another section on this issue.

14. How do I cut and paste text with a mouse in the text console?

Once you get the mouse daemon running (see previous section), hold down the button 1 (left button) and move the mouse to select a region of text. Then, press the button 2 (middle button) or the button 3 (right button) to paste it at the text cursor.

In versions 2.2.6 and later, pressing the button 2 will paste the text. Pressing the button 3 will “extend” the selected region of text. If your mouse does not have the middle button, you may wish to emulate it or remap buttons using moused options. See the moused(8) manual page for details.

25

Chapter 4 Hardware compatibility

15. Does FreeBSD support any USB mice?

Preliminary USB device support was added to FreeBSD 3.1. It did not always work through early versions of 3.X. As of FreeBSD 4.0, USB devices should work out of the box. If you want to experiment with the USB mouse support under FreeBSD 3.X, follow the procedure described below.

1.Use FreeBSD 3.2 or later.

2.Add the following lines to your kernel configuration file, and rebuild the kernel.

device uhci

device ohci

device usb

device ums

In versions of FreeBSD before 4.0, use this instead:

controller uhci0

controller ohci0

controller usb0

device

ums0

3.Go to the /dev directory and create a device node as follows:

#cd /dev

#./MAKEDEV ums0

4.Edit /etc/rc.conf and add the following lines:

moused_enable="YES" moused_type="auto" moused_port="/dev/ums0" moused_flags="" usbd_enable="YES" usbd_flags=""

See the previous section for more detailed discussion on moused.

5.In order to use the USB mouse in the X session, edit XF86Config. If you are using XFree86 3.3.2 or later, be sure to have the following lines in the Pointer section:

Device "/dev/sysmouse"

Protocol "Auto"

If you are using earlier versions of XFree86, be sure to have the following lines in the Pointer section:

Device "/dev/sysmouse"

Protocol "SysMouse"

Refer to another section on the mouse support in the X environment.

Hot-plugging and unplugging of the USB mouse may not work quite right yet. It is a good idea connect the mouse before you start the system and leave it connected until the system is shutdown to avoid trouble.

26