Chapter 3 Installation

Nik Clayton
3.1. Which platform should I download? I have a 64 bit capable Intel® CPU, but I only see amd64.
3.2. Which file do I download to get FreeBSD?
3.3. What do I do if the images do not fit on a single disk?
3.4. Where are the instructions for installing FreeBSD?
3.5. What do I need to run FreeBSD?
3.6. How can I make my own custom release or install disk?
3.7. Can Windows® co-exist with FreeBSD?
3.8. Another operating system destroyed my Boot Manager. How do I get it back?
3.9. I booted from my ATAPI CD-ROM, but the install program says no CD-ROM is found. Where did it go?
3.10. Can I install on my laptop over PLIP (Parallel Line IP)?
3.11. Do I need to install the source?
3.12. Do I need to build a kernel?
3.13. Should I use DES, Blowfish, or MD5 passwords and how do I specify which form my users receive?
3.14. Why do I get a “panic: can't mount root” error when rebooting the system after installation?
3.15. What are the limits for memory?
3.16. What are the limits for FFS file systems?
3.17. Why do I get an error message, “archsw.readin.failed” after compiling and booting a new kernel?
3.18. Is there a tool to perform post-installation configuration tasks?

3.1. Which platform should I download? I have a 64 bit capable Intel® CPU, but I only see amd64.

amd64 is the term FreeBSD uses for 64-bit compatible x86 architectures. Most modern computers should use amd64. Older hardware should use i386. If you are installing on a non-x86-compatible architecture select the platform which best matches the architecture you are using.

3.2. Which file do I download to get FreeBSD?

On the Getting FreeBSD page select [iso] next to the architecture you want to use.

Any of the following can be used:

file description
disc1.iso Contains enough to install FreeBSD and a minimal set of packages.
dvd1.iso Similar to disc1.iso but with additional packages.
memstick.img A bootable image sufficient for copying to a USB stick.
bootonly.iso A minimal image that requires network access during installation to completely install FreeBSD.

pc98 users require these floppy images: floppies/boot.flp, floppies/kern1.flp, floppies/kern2.flp, and floppies/mfsroot1.flp. These images need to be copied onto floppies by tools like dd(1).

Full instructions on this procedure and a little bit more about installation issues in general can be found in the Handbook entry on installing FreeBSD.

3.3. What do I do if the images do not fit on a single disk?

Common mistakes when preparing the boot media are:

  • Not downloading the image in binary mode when using FTP.

    Some FTP clients default their transfer mode to ascii and attempt to change any end-of-line characters received to match the conventions used by the client's system. This will almost invariably corrupt the boot image. Check the SHA-256 of the downloaded boot image: if it is not exactly that on the server, then the download process is suspect.

    To workaround: type binary at the FTP command prompt after getting connected to the server and before starting the download of the image.

  • Using the DOS copy command (or equivalent GUI tool) to transfer the boot image to floppy.

    Programs like copy will not work as the boot image has been created to be booted into directly. The image has the complete content of the floppy, track for track, and is not meant to be placed on the floppy as a regular file. You have to transfer it to the floppy “raw”, using the low-level tools (e.g., fdimage or rawrite) described in the installation guide to FreeBSD.

3.4. Where are the instructions for installing FreeBSD?

Installation instructions for versions since FreeBSD 9.0 can be found at Handbook entry on installing FreeBSD. Older instructions can be found in the legacy entry on installing FreeBSD.

3.5. What do I need to run FreeBSD?

For FreeBSD you will need a 486 or better PC, with 64 MB or more of RAM and at least 1 GB of hard disk space.

See also Chapter 4.

3.6. How can I make my own custom release or install disk?

Customized FreeBSD installation media can be created by building a custom release. Follow the instructions in the Release Engineering article.

3.7. Can Windows® co-exist with FreeBSD?

If Windows is installed first, then yes. FreeBSD's boot manager will then manage to boot Windows and FreeBSD. If you install Windows second, it will boorishly overwrite your boot manager without even asking. If that happens, see the next section.

3.8. Another operating system destroyed my Boot Manager. How do I get it back?

This depends on what boot manager you have installed. The FreeBSD boot selection menu (likely what you are using if you end up in this situation) can be reinstalled using boot0cfg(8). For example, to restore the boot menu onto the disk ada0:

# boot0cfg -B ada0

The non-interactive MBR bootloader can be installed using gpart(8):

# gpart bootcode -b /boot/mbr ada0

For more complex situations, including GPT disks, see gpart(8).

3.9. I booted from my ATAPI CD-ROM, but the install program says no CD-ROM is found. Where did it go?

The usual cause of this problem is a mis-configured CD-ROM drive. Many PCs now ship with the CD-ROM as the slave device on the secondary IDE controller, with no master device on that controller. This is illegal according to the ATAPI specification, but Windows plays fast and loose with the specification, and the BIOS ignores it when booting. This is why the BIOS was able to see the CD-ROM to boot from it, but why FreeBSD cannot see it to complete the install.

Reconfigure your system so that the CD-ROM is either the master device on the IDE controller it is attached to, or make sure that it is the slave on an IDE controller that also has a master device.

3.10. Can I install on my laptop over PLIP (Parallel Line IP)?

Yes. Use a standard Laplink cable. If necessary, you can check out the PLIP section of the Handbook for details on parallel port networking.

3.11. Do I need to install the source?

In general, no. There is nothing in the base system which requires the presence of the source to operate. Some ports, like sysutils/lsof, will not build unless the source is installed. In particular, if the port builds a kernel module or directly operates on kernel structures, the source must be installed.

3.12. Do I need to build a kernel?

Usually not. The supplied GENERIC kernel contains the drivers an ordinary computer will need. freebsd-update(8), the FreeBSD binary upgrade tool, cannot upgrade custom kernels, another reason to stick with the GENERIC kernel when possible. For computers with very limited RAM, such as embedded systems, it may be worthwhile to build a smaller custom kernel containing just the required drivers.

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

FreeBSD 7 and 8 use MD5 password hashing by default. Recent versions of FreeBSD use SHA512 by default. 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. FreeBSD also allows you to use the Blowfish and MD5 password formats. 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.

3.14. 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 ad0 (the second BIOS disk) while the kernel assigns the first disk on the secondary controller device, ad2. After the device probing, the kernel tries to mount what the boot blocks think is the boot disk, ad0, while it is really ad2, and fails.

To fix the problem, do one of the following:

  1. 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 (i.e, 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. Move the FreeBSD disk onto the primary IDE controller, so the hard disks are consecutive.

3.15. What are the limits for memory?

Memory limits depend on the platform used. On a standard i386™ install, the limit is 4 GB but more memory can be supported through pae(4). See instructions for using 4 GB or more memory on i386.

FreeBSD/pc98 has a limit of 4 GB memory, and PAE can not be used with it. Other architectures supported by FreeBSD have much higher theoretical limits on maximum memory (many terabytes).

3.16. What are the limits for FFS file systems?

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

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

Table 3-1. Maximum File Sizes

FS Block Size Works Should Work
4 KB > 4 GB 4 TB - 1
8 KB > 32 GB 32 TB - 1
16 KB > 128 GB 32 TB - 1
32 KB > 512 GB 64 TB - 1
64 KB > 2048 GB 128 TB - 1

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

For block sizes of 8 KB and larger, everything should be limited by the 2 G - 1 limit on FS block numbers, but is actually limited by the 1 G - 1 limit on FS block numbers. Using the correct limit of 2 G - 1 blocks does cause problems.

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

Because your world and kernel are out of sync. This is not supported. Be sure you use make buildworld and make buildkernel to update your kernel.

You can boot by specifying the kernel directly at the second stage, pressing any key when the | shows up before loader is started.

3.18. Is there a tool to perform post-installation configuration tasks?

Yes, HEAD users can set WITH_BSDCONFIG in /etc/src.conf. Users of 9.X and higher may also install sysutils/bsdconfig.