Boot Problems and Other Non-installation Problems


This section covers problems related to booting as well as other noninstallation-related problems that you might encounter after a successful install.

FreeBSD Says "Missing Operating System" When Trying to Boot

This message usually means that FreeBSD did not correctly detect your hard disk's geometry when it installed. There are two solutions to this problem:

  • Create a small DOS partition at the beginning of the drive and install a bare minimum copy of DOS on it (FreeDOS, an MS-DOS workalike, is available for free at http://www.freedos.org). This should cause FreeBSD to detect the right information for partitioning.

  • Use the pfdisk program found on the DVD packaged with this book (in the tools directory) to detect the hard disk geometry and then set it manually in the FreeBSD partition editor.

Either way, you will have to reinstall FreeBSD to get things working.

FreeBSD's Boot Manager Hangs at "F?"

This problem, which indicates that no bootable DOS partitions (slices) are found, is usually caused by FreeBSD not detecting your hard disk geometry properly. See the preceding section for solutions to this problem.

FreeBSD's Boot Loader Says "Read Error" and Hangs

Once again, this is usually caused by FreeBSD not detecting the hard disk geometry correctly. See the preceding two sections for solutions to this problem.

No Boot Manager; System Boots Right into Windows

Either the boot manager didn't get installed when you installed FreeBSD or something you did in Windows (fdisk /mbr, for example) clobbered the FreeBSD boot manager. Fortunately, it is relatively easy to restore.

  1. Boot from the included DVD or from the installation floppies you created.

  2. After you have gotten into the Sysinstall program, select Configure and then Fdisk (see Chapter 2, "Installing FreeBSD," if you need a refresher on Sysinstall).

  3. If you have multiple hard disks in your system, you will be prompted for which system you want to run fdisk on. Select the primary disk that your system boots from.

  4. When you are in fdisk, simply select W to write the changes. You will be given a warning telling you that this should be done only when making changes to an existing installation. Select Yes and press Enter.

  5. When the system asks what to do about the boot loader, select Master Boot Record.

After you have completed this process, the boot manager should be back in operation.

FreeBSD Detects Less RAM Than Is Really in the System

FreeBSD can't always get the proper amount of memory in your system from the BIOS. Usually, this results in FreeBSD detecting only 64MB of RAM, even if you really have more.

To fix this problem, you will need to add the following option to the kernel configuration file:

options      "MAXMEM=n"


Here, n is the amount of memory you have in kilobytes. Remember that in binary math, a kilobyte is actually 1,024 bytes instead of 1,000 bytes. Thus, if you have 512MB of RAM, you'll need to enter 524288 as the number here.

After you have made this change, you will need to rebuild the kernel (see Chapter 18, "Kernel Configuration," for detailed information on rebuilding the kernel).

FreeBSD Complains "Device Not Configured" While Trying to Mount a CD-ROM Drive

This problem can be caused by a few things, as follows:

  • The CD-ROM drive might be empty; simply insert a CD and try again.

  • The second possibility is that an ATAPI CD-ROM drive is configured as the slave drive on the secondary controller and there is no master drive on the controller. You will need to reconfigure your CD-ROM drive as the master if this is the case (you usually can do this reconfiguration using the jumpers on the back of the CD-ROM drive).

  • If you have a SCSI CD-ROM drive, the drive might not be getting enough time to answer the bus reset request when the kernel is started. If this is the case, find the options SCSI_DELAY line in the kernel configuration file and increase the time. (The time is given in milliseconds. By default, it is set to 5000, or 5 seconds. You might start by doubling it to a value of 10000.) You will then need to rebuild the kernel (see Chapter 18).

Programs Crash with Signal 11 Errors

This problem is somewhat like an "illegal operation" error in Windows. It basically means that a program tried to access memory that was not allocated to it. This could be the result of a bug in the program or, if it is occurring with utilities included with FreeBSD, a bug in FreeBSD itself.

A third potential cause of this problem is flaky hardware. If the problem occurs at random points while compiling software, you can be almost sure that old or faulty hardware is the culprit. Common hardware causes for such problems include defective RAM, a CPU that is overheating (Is your CPU fan running? Are you overclocking?), defective cache memory, or a marginal power supply.

You can isolate hardware problems by booting your system into a different operating system, such as Knoppix, a Linux distribution that runs entirely from CD (meaning that you don't have to install it on your hard drive in order to see whether it has the same problems on your hardware that FreeBSD does). Knoppix is available for free at http://www.knoppix.net. Another option is memtest86 (http://www.memtest86.com), which you can download and burn to a bootable CD that can be used to diagnose potential memory problems.

Strange Error Messages (such as "proc size mismatch") Occur When Running top, ps, and Other System Utilities

This type of error is almost always caused by your world and your kernel being out of sync, usually because they're based on different states of the source code. Often, the problem stems from using make world to build the system from source and then failing to build a new kernel. The reverse could also be true: You built a new kernel with sources that you downloaded but did not do a make world first.

Because it is much quicker to rebuild the kernel than to rebuild the world, the simplest solution is to try making a new kernel and rebooting first (see Chapter 18 for detailed information on rebuilding the kernel).

If rebuilding the kernel doesn't fix the problem, try rebuilding the world. (See Chapter 19, "Keeping Up to Date with FreeBSD," for details on doing a make world.)

Finally, if neither of these options solves the problem, getting the latest source (see Chapter 19), making the world, and then rebuilding the kernel should get your system back on its feet.

Forgotten Root Password

If you have forgotten your root password, you can boot into single user mode to recover it.

To get into single user mode, reboot the system and then choose Option 4, Boot FreeBSD in Single User Mode, from the loader menu. When you are asked which shell to use, simply press Enter for the default. You should then get a root user prompt that looks like this:

#


At the prompt, type mount -u / and then press Enter to remount the root filesystem in read/write mode. Then, type mount -a to mount all the other filesystems. You can now type passwd root to change the password for the root account. (If this doesn't work, use /usr/bin/passwd root.) You will not be asked for the old password. Simply enter the new password you would like to use, press Enter, reenter it to confirm it, and press Enter again. Finally, reboot your system with shutdown -r now.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net