Frequently Asked Questions for FreeBSD 6.`X`, 7.`X` and 8.`X`
Prev |  | Next

# Chapter 3 Installation

Nik Clayton

3.1. Which file do I download to get FreeBSD?
3.2. What do I do if the floppy images does not fit on a single floppy?
3.3. Where are the instructions for installing FreeBSD?
3.4. What do I need in order to run FreeBSD?
3.5. How can I make my own custom install floppy?
3.6. Can I have more than one operating system on my PC?
3.7. Can Windows® co-exist with FreeBSD?
3.8. Windows killed my boot manager! How do I get it back?
3.9. My A, T, or X series IBM Thinkpad locks up when I first booted up my FreeBSD installation. How can I solve this?
3.10. Can I install on a disk with bad blocks?
3.11. Strange things happen when I boot the install floppy! What is happening?
3.12. I booted from my ATAPI CD-ROM, but the install program says no CD-ROM is found. Where did it go?
3.13. Can I install on my laptop over PLIP (Parallel Line IP)?
3.14. Which geometry should I use for a disk drive?
3.15. Are there any restrictions on how I divide the disk up?
3.16. Is FreeBSD compatible with any disk managers?
3.17. When I boot FreeBSD for the first time after install I get “`Missing Operating System`”. What is happening?
3.18. Why can I not get past the boot manager's `F?` prompt?
3.19. Do I need to install the complete sources?
3.20. Do I need to build a kernel?
3.21. Should I use DES, Blowfish, or MD5 passwords and how do I specify which form my users receive?
3.22. Why does the boot floppy start, but hang at the `Probing Devices...` screen?
3.23. Why do I get a “`panic: can't mount root`” error when rebooting the system after installation?
3.24. What are the limits for memory?
3.25. What are the limits for FFS file systems?
3.26. Why do I get an error message, “`archsw.readin.failed`” after compiling and booting a new kernel?
3.27. Installation crashes while booting, what can I do?

3.1. Which file do I download to get FreeBSD?

You need three floppy images: `floppies/boot.flp`, `floppies/kern1.flp`, and `floppies/kern2.flp`. These images need to be copied onto floppies by tools like `fdimage` or dd(1).

If you need to download the distributions yourself (for a DOS file system install, for instance), below are some recommendations for distributions to grab:

- base/

- manpages/

- compat*/

- doc/

- src/ssys.*

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.2. What do I do if the floppy images does not fit on a single floppy?

A 3.5 inch (1.44 MB) floppy can accommodate 1,474,560 bytes of data. The boot image is exactly 1,474,560 bytes in size.

Common mistakes when preparing the boot floppy are:

- Not downloading the floppy 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 size 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.3. Where are the instructions for installing FreeBSD?

Installation instructions can be found in the Handbook entry on installing FreeBSD.

3.4. What do I need in order to run FreeBSD?

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

All versions of FreeBSD can run with a low end MDA graphics card but to run Xorg, a VGA or better video card is needed.

See also Chapter 4.

3.5. How can I make my own custom install floppy?

Currently there is no way to just make a custom install floppy. You have to cut a whole new release, which will include your install floppy.

To make a custom release, follow the instructions in the Release Engineering article.

3.6. Can I have more than one operating system on my PC?

Have a look at the multi-OS page.

3.7. Can Windows® co-exist with FreeBSD?

Install Windows first, then FreeBSD. 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. Windows killed my boot manager! How do I get it back?

You can reinstall the boot manager FreeBSD comes with in one of three ways:

- Running DOS, go into the `tools` directory of your FreeBSD distribution and look for `bootinst.exe`. You run it like so:

      ...\TOOLS> bootinst.exe boot.bin

  and the boot manager will be reinstalled.

- Boot the FreeBSD boot floppy again and go to the Custom menu item for custom installation. Choose Partition. Select the drive which used to contain your boot manager (likely the first one) and when you come to the partition editor for it, as the very first thing (e.g. do not make any changes) press W. This will ask for confirmation, select [ Yes ], and when you get the Boot Manager selection prompt, be sure to select the FreeBSD Boot Manager. This will re-write the boot manager to disk. Now quit out of the installation menu and reboot off the hard disk as normal.

- Boot the FreeBSD boot floppy (or CD-ROM) and choose the Fixit menu item. Select either the Fixit floppy or CD-ROM #2 (the “live” file system option) as appropriate and enter the fixit shell. Then execute the following command:

      Fixit# fdisk -B -b /boot/boot0 bootdevice

  substituting `bootdevice` for your real boot device such as `ad0` (first IDE disk), `ad4` (first IDE disk on auxiliary controller), `da0` (first SCSI disk), etc.

3.9. My A, T, or X series IBM Thinkpad locks up when I first booted up my FreeBSD installation. How can I solve this?

A bug in early revisions of IBM's BIOS on these machines mistakenly identifies the FreeBSD partition as a potential FAT suspend-to-disk partition. When the BIOS tries to parse the FreeBSD partition it hangs.

According to IBM[1], the following model/BIOS release numbers incorporate the fix.

Model | BIOS revision
--- | ---
T20 | IYET49WW or later
T21 | KZET22WW or later
A20p | IVET62WW or later
A20m | IWET54WW or later
A21p | KYET27WW or later
A21m | KXET24WW or later
A21e | KUET30WW

It has been reported that later IBM BIOS revisions may have reintroduced the bug. This message from Jacques Vidrine `<nectar@FreeBSD.org>` to the FreeBSD laptop computer mailing list describes a procedure which may work if your newer IBM laptop does not boot FreeBSD properly, and you can upgrade or downgrade the BIOS.

If you have an earlier BIOS, and upgrading is not an option, a workaround is to install FreeBSD, change the partition ID FreeBSD uses, and install new boot blocks that can handle the different partition ID.

First, you will need to restore the machine to a state where it can get through its self-test screen. Doing this requires powering up the machine without letting it find a FreeBSD partition on its primary disk. One way is to remove the hard disk and temporarily move it to an older ThinkPad (such as a ThinkPad 600) or a desktop PC with an appropriate conversion cable. Once it is there, you can delete the FreeBSD partition and move the hard disk back. The ThinkPad should now be in a bootable state again.

With the machine functional again, you can use the workaround procedure described here to get a working FreeBSD installation.

1. Download `boot1` and `boot2` from http://people.FreeBSD.org/~bmah/ThinkPad/. Put these files somewhere you will be able to retrieve them later.

2. Install FreeBSD as normal on to the ThinkPad. Do not use `Dangerously Dedicated` mode. Do not reboot when the install has finished.

3. Either switch to the “Emergency Holographic Shell” (Alt+F4) or start a “fixit” shell.

4. Use fdisk(8) to change the FreeBSD partition ID from `165` to `166` (this is the type used by OpenBSD).

5. Bring the `boot1` and `boot2` files to the local file system.

6. Use disklabel(8) to write `boot1` and `boot2` to your FreeBSD slice.

       # disklabel -B -b boot1 -s boot2 ad0sn

   `n` is the number of the slice where you installed FreeBSD.

7. Reboot. At the boot prompt you will be given the option of booting `OpenBSD`. This will actually boot FreeBSD.

Getting this to work in the case where you want to dual boot OpenBSD and FreeBSD on the same laptop is left as an exercise for the reader.

3.10. Can I install on a disk with bad blocks?

You can, but it is a bad idea.

If you are seeing bad block errors with a modern IDE drive, chances are the drive is going to die very soon (the drive's internal remapping functions are no longer sufficient to fix the bad blocks, which means the disk is heavily corrupted); we suggest you buy a new hard drive.

If you have a SCSI drive with bad blocks, see this answer.

3.11. Strange things happen when I boot the install floppy! What is happening?

If you are seeing things like the machine grinding to a halt or spontaneously rebooting when you try to boot the install floppy, here are three questions to ask yourself:

1. Did you use a new, freshly-formatted, error-free floppy (preferably a brand-new one straight out of the box, as opposed to the magazine cover disk that has been lying under the bed for the last three years)?

2. Did you download the floppy image in binary (or image) mode? (do not be embarrassed, even the best of us have accidentally downloaded a binary file in ASCII mode at least once!)

3. If you are using Windows 95 or Windows 98 did you run `fdimage` or `rawrite` in pure DOS mode? These operating systems can interfere with programs that write directly to hardware, which the disk creation program does; even running it inside a DOS shell in the GUI can cause this problem.

There have also been reports of Netscape® causing problems when downloading the boot floppy, so it is probably best to use a different FTP client if you can.

3.12. 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.13. 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.14. Which geometry should I use for a disk drive?

Note: By the “geometry” of a disk, we mean the number of cylinders, heads and sectors/track on a disk. We will refer to this as C/H/S for convenience. This is how the PC's BIOS works out which area on a disk to read/write from.

This causes a lot of confusion among new system administrators. First of all, the physical geometry of a SCSI drive is totally irrelevant, as FreeBSD works in term of disk blocks. In fact, there is no such thing as “the” physical geometry, as the sector density varies across the disk. What manufacturers claim is the “physical geometry” is usually the geometry that they have determined wastes the least space. For IDE disks, FreeBSD does work in terms of C/H/S, but all modern drives internally convert this into block references.

All that matters is the logical geometry. This is the answer that the BIOS gets when it asks the drive “what is your geometry?” It then uses this geometry to access the disk. As FreeBSD uses the BIOS when booting, it is very important to get this right. In particular, if you have more than one operating system on a disk, they must all agree on the geometry. Otherwise you will have serious problems booting!

For SCSI disks, the geometry to use depends on whether extended translation support is turned on in your controller (this is often referred to as “support for DOS disks >1GB” or something similar). If it is turned off, then use `N` cylinders, 64 heads and 32 sectors/track, where `N` is the capacity of the disk in MB. For example, a 2 GB disk should pretend to have 2048 cylinders, 64 heads and 32 sectors/track.

If it is turned on (it is often supplied this way to get around certain limitations in MS-DOS®) and the disk capacity is more than 1 GB, use `M` cylinders, 63 sectors per track (not 64), and 255 heads, where `M` is the disk capacity in MB divided by 7.844238 (!). So our example 2 GB drive would have 261 cylinders, 63 sectors per track and 255 heads.

If you are not sure about this, or FreeBSD fails to detect the geometry correctly during installation, the simplest way around this is usually to create a small DOS partition on the disk. The BIOS should then detect the correct geometry, and you can always remove the DOS partition in the partition editor if you do not want to keep it. You might want to leave it around for programming network cards and the like, however.

Alternatively, there is a freely available utility distributed with FreeBSD called `pfdisk.exe`. You can find it in the `tools` subdirectory on the FreeBSD CD-ROM or on the various FreeBSD FTP sites. This program can be used to work out what geometry the other operating systems on the disk are using. You can then enter this geometry in the partition editor.

3.15. Are there any restrictions on how I divide the disk up?

Yes. You must make sure that your root partition is below 1024 cylinders so the BIOS can boot the kernel from it. (Note that this is a limitation in the PC's BIOS, not FreeBSD).

For a SCSI drive, this will normally imply that the root partition will be in the first 1024 MB (or in the first 4096 MB if extended translation is turned on -- see previous question). For IDE, the corresponding figure is 504 MB.

3.16. 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.

3.17. When I boot FreeBSD for the first time after install 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.

3.18. 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.

3.19. 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.

3.20. 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 much friendlier kernel configuration methods. It is very easy to configure the kernel's configuration by much more flexible “hints” which can be set at the loader prompt.

It may still be worthwhile building a new kernel containing just the drivers that you need, just to save a bit of RAM, but it is no longer necessary for most systems.

3.21. 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. FreeBSD also allows 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.

3.22. 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.

3.23. 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.24. 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.25. 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.26. 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.27. Installation crashes while booting, what can I do?

Try disabling ACPI support. When the bootloader loads, press the Space key. The system will display the following:

    OK

Type:

    unset acpi_load

And then type:

    boot

### Notes

[1] | In an email from Keith Frechette `<kfrechet@us.ibm.com>`.

Prev | Home | Next
Documentation and Support |  | Hardware Compatibility