FreeBSD/amd64 6.2-STABLE Installation Instructions

The FreeBSD Project


This article gives some brief instructions on installing FreeBSD/amd64 6.2-STABLE, with particular emphasis given to obtaining a FreeBSD distribution. Some notes on troubleshooting and frequently-asked questions are also given.

1 Installing FreeBSD

This section documents the process of installing a new distribution of FreeBSD. These instructions pay particular emphasis to the process of obtaining the FreeBSD 6.2-STABLE distribution and to beginning the installation procedure. The “Installing FreeBSD” chapter of the FreeBSD Handbook provides more in-depth information about the installation program itself, including a guided walkthrough with screenshots.

If you are upgrading from a previous release of FreeBSD, please see Section 3 for instructions on upgrading.

1.1 Getting Started

Probably the most important pre-installation step that can be taken is that of reading the various instruction documents provided with FreeBSD. A roadmap of documents pertaining to this release of FreeBSD can be found in README.TXT, which can usually be found in the same location as this file; most of these documents, such as the release notes and the hardware compatibility list, are also accessible in the Documentation menu of the installer.

Note that on-line versions of the FreeBSD FAQ and Handbook are also available from the FreeBSD Project Web site, if you have an Internet connection.

This collection of documents may seem daunting, but the time spent reading them will likely be saved many times over. Being familiar with what resources are available can also be helpful in the event of problems during installation.

The best laid plans sometimes go awry, so if you run into trouble take a look at Section 4, which contains valuable troubleshooting information. You should also read an updated copy of ERRATA.TXT before installing, since this will alert you to any problems which have reported in the interim for your particular release.

Important: While FreeBSD does its best to safeguard against accidental loss of data, it's still more than possible to wipe out your entire disk with this installation if you make a mistake. Please do not proceed to the final FreeBSD installation menu unless you've adequately backed up any important data first.

1.2 Hardware Requirements

FreeBSD for the AMD64 requires an Athlon64, Athlon64-FX, Opteron or better processor to run.

If you have an machine based on an nVidia nForce3 Pro-150, you MUST use the BIOS setup to disable the IO APIC. If you do not have an option to do this, you will likely have to disable ACPI instead. There are bugs in the Pro-150 chipset that we have not found a workaround for yet.

If you are not familiar with configuring hardware for FreeBSD, you should be sure to read the HARDWARE.TXT file; it contains important information on what hardware is supported by FreeBSD.

1.3 Floppy Disk Image Instructions

Floppy disk based install is not supported on FreeBSD/amd64.

1.4 Installing FreeBSD from CDROM or the Internet

The easiest type of installation is from CDROM. If you have a supported CDROM drive and a FreeBSD installation CDROM, there are 2 ways of starting the installation from it:

  • If your system supports the “CDBOOT” standard for bootable CDROM media and you have booting from CD enabled, simply put the FreeBSD installation CD in your CDROM drive and boot the system to begin installation.

  • Build a set of FreeBSD boot floppies from the floppies/ directory in every FreeBSD distribution. Read Section 1.3 for more information on creating the bootable floppies under different operating systems. Then you simply boot from the first floppy and you should soon be in the FreeBSD installation.



1.5 Detail on various installation types

Once you've gotten yourself to the initial installation screen somehow, you should be able to follow the various menu prompts and go from there. If you've never used the FreeBSD installation before, you are also encouraged to read some of the documentation in the Documentation submenu as well as the general “Usage” instructions on the first menu.

Note: If you get stuck at a screen, press the F1 key for online documentation relevant to that specific section.

If you've never installed FreeBSD before, or even if you have, the “Standard” installation mode is the most recommended since it makes sure that you'll visit all the various important checklist items along the way. If you're much more comfortable with the FreeBSD installation process and know exactly what you want to do, use the “Express” or “Custom” installation options. If you're upgrading an existing system, use the “Upgrade” option.

The FreeBSD installer supports the direct use of floppy, DOS, tape, CDROM, FTP, NFS and UFS partitions as installation media; further tips on installing from each type of media are listed below.

1.5.1 Installing from a Network CDROM

If you simply wish to install from a local CDROM drive then see Section 1.4. If you don't have a CDROM drive on your system and wish to use a FreeBSD distribution CD in the CDROM drive of another system to which you have network connectivity, there are also several ways of going about it:

  • If you would be able to FTP install FreeBSD directly from the CDROM drive in some FreeBSD machine, it's quite easy: You ensure an FTP server is running and then simply add the following line to the password file (using the vipw(8) command):

    ftp:*:99:99::0:0:FTP:/cdrom:/sbin/nologin
    

    On the machine on which you are running the install, go to the Options menu and set Release Name to any. You may then choose a Media type of FTP and type in ftp://machine after picking “URL” in the ftp sites menu.

    Warning: This may allow anyone on the local network (or Internet) to make “anonymous FTP” connections to this machine, which may not be desirable.

  • If you would rather use NFS to export the CDROM directly to the machine(s) you'll be installing from, you need to first add an entry to the /etc/exports file (on the machine with the CDROM drive). The example below allows the machine ziggy.foo.com to mount the CDROM directly via NFS during installation:

    /cdrom          -ro             ziggy.foo.com
    

    The machine with the CDROM must also be configured as an NFS server, of course, and if you're not sure how to do that then an NFS installation is probably not the best choice for you unless you're willing to read up on rc.conf(5) and configure things appropriately. Assuming that this part goes smoothly, you should be able to enter: cdrom-host:/cdrom as the path for an NFS installation when the target machine is installed, e.g. wiggy:/cdrom.

1.5.2 Installing from Floppies

If you must install from floppy disks, either due to unsupported hardware or just because you enjoy doing things the hard way, you must first prepare some floppies for the install.

First, make your boot floppies as described in Section 1.3.

Second, peruse Section 2 and pay special attention to the “Distribution Format” section since it describes which files you're going to need to put onto floppy and which you can safely skip.

Next you will need, at minimum, as many 1.44MB floppies as it takes to hold all files in the bin (binary distribution) directory. If you're preparing these floppies under DOS, then these floppies must be formatted using the MS-DOS FORMAT command. If you're using Windows, use the Windows File Manager format command.

Important: Frequently, floppy disks come “factory preformatted”. While convenient, many problems reported by users in the past have resulted from the use of improperly formatted media. Re-format them yourself, just to make sure.

If you're creating the floppies from another FreeBSD machine, a format is still not a bad idea though you don't need to put a DOS filesystem on each floppy. You can use the disklabel(8) and newfs(8) commands to put a UFS filesystem on a floppy, as the following sequence of commands illustrates:

# fdformat -f 1440 fd0
# disklabel -w fd0 floppy3
# newfs -i 65536 /dev/fd0

After you've formatted the floppies for DOS or UFS, you'll need to copy the files onto them. The distribution files are sized so that a floppy disk will hold a single file. Each distribution should go into its own subdirectory on the floppy, e.g.: a:\bin\bin.inf, a:\bin\bin.aa, a:\bin\bin.ab, ...

Important: The bin.inf file also needs to go on the first floppy of the bin set since it is read by the installation program in order to figure out how many additional pieces to look for when fetching and concatenating the distribution. When putting distributions onto floppies, the distname.inf file must occupy the first floppy of each distribution set.

Once you come to the Media screen of the install, select “Floppy” and you'll be prompted for the rest.

1.5.3 Installing from a DOS partition

To prepare for installation from an MS-DOS partition you should simply copy the files from the distribution into a directory called FREEBSD on the Primary DOS partition (C:). For example, to do a minimal installation of FreeBSD from DOS using files copied from the CDROM, you might do something like this:

C:\> MD C:\FREEBSD
C:\> XCOPY /S E:\BASE C:\FREEBSD\BASE

Assuming that E: was where your CD was mounted.

For as many distributions as you wish to install from DOS (and you have free space for), install each one in a directory under C:\FREEBSD - the BIN dist is only the minimal requirement.

Once you've copied the directories, you can simply launch the installation from floppies as normal and select “DOS” as your media type when the time comes.

1.5.4 Installing from QIC/SCSI Tape

When installing from tape, the installation program expects the files to be simply tar'ed onto it, so after fetching all of the files for the distributions you're interested in, simply use tar(1) to get them onto the tape with a command something like this:

# cd /where/you/have/your/dists
# tar cvf /dev/sa0 dist1 .. dist2

When you go to do the installation, you should also make sure that you leave enough room in some temporary directory (which you'll be allowed to choose) to accommodate the full contents of the tape you've created. Due to the non-random access nature of tapes, this method of installation requires quite a bit of temporary storage. You should expect to require as much temporary storage as you have stuff written on tape.

Note: When going to do the installation, the tape must be in the drive before booting from the boot floppies. The installation “probe” may otherwise fail to find it.

Now create a boot floppy as described in Section 1.3 and proceed with the installation.

1.5.5 Installing over a Network using FTP or NFS

After making the boot floppies as described in the first section, you can load the rest of the installation over a network using one of 3 types of connections: serial port, parallel port, or Ethernet.

1.5.5.1 Serial Port

SLIP support is rather primitive, and is limited primarily to hard-wired links, such as a serial cable running between two computers. The link must be hard-wired because the SLIP installation doesn't currently offer a dialing capability. If you need to dial out with a modem or otherwise dialog with the link before connecting to it, then the PPP utility should be used instead.

If you're using PPP, make sure that you have your Internet Service Provider's IP address and DNS information handy as you'll need to know it fairly early in the installation process. You may also need to know your own IP address, though PPP supports dynamic address negotiation and may be able to pick up this information directly from your ISP if they support it.

You will also need to know how to use the various “AT commands” for dialing out with your particular brand of modem as the PPP dialer provides only a very simple terminal emulator.

1.5.5.2 Parallel Port

If a hard-wired connection to another FreeBSD or Linux machine is available, you might also consider installing over a “laplink” style parallel port cable. The data rate over the parallel port is much higher than what is typically possible over a serial line (up to 50k/sec), thus resulting in a quicker installation. It's not typically necessary to use “real” IP addresses when using a point-to-point parallel cable in this way and you can generally just use RFC 1918 style addresses for the ends of the link (e.g. 10.0.0.1, 10.0.0.2, etc).

Important: If you use a Linux machine rather than a FreeBSD machine as your PLIP peer, you will also have to specify link0 in the TCP/IP setup screen's “extra options for ifconfig” field in order to be compatible with Linux's slightly different PLIP protocol.

1.5.5.3 Ethernet

FreeBSD supports most common Ethernet cards; a table of supported cards is provided as part of the FreeBSD Hardware Notes (see HARDWARE.TXT in the Documentation menu on the boot floppy or the top level directory of the CDROM). If you are using one of the supported PCMCIA Ethernet cards, also be sure that it's plugged in before the laptop is powered on. FreeBSD does not, unfortunately, currently support “hot insertion” of PCMCIA cards during installation.

You will also need to know your IP address on the network, the netmask value for your subnet and the name of your machine. Your system administrator can tell you which values are appropriate to your particular network setup. If you will be referring to other hosts by name rather than IP address, you'll also need a name server and possibly the address of a gateway (if you're using PPP, it's your provider's IP address) to use in talking to it. If you want to install by FTP via an HTTP proxy (see below), you will also need the proxy's address.

If you do not know the answers to these questions then you should really probably talk to your system administrator first before trying this type of installation. Using a randomly chosen IP address or netmask on a live network is almost guaranteed not to work, and will probably result in a lecture from said system administrator.

Once you have a network connection of some sort working, the installation can continue over NFS or FTP.

1.5.5.4 NFS installation tips

NFS installation is fairly straight-forward: Simply copy the FreeBSD distribution files you want onto a server somewhere and then point the NFS media selection at it.

If this server supports only “privileged port” access (this is generally the default for Sun and Linux workstations), you may need to set this option in the Options menu before installation can proceed.

If you have a poor quality Ethernet card which suffers from very slow transfer rates, you may also wish to toggle the appropriate Options flag.

In order for NFS installation to work, the server must also support “subdir mounts”, e.g. if your FreeBSD distribution directory lives on wiggy:/usr/archive/stuff/FreeBSD, then wiggy will have to allow the direct mounting of /usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff.

In FreeBSD's /etc/exports file this is controlled by the -alldirs option. Other NFS servers may have different conventions. If you are getting Permission Denied messages from the server then it's likely that you don't have this properly enabled.

1.5.5.5 FTP Installation tips

FTP installation may be done from any mirror site containing a reasonably up-to-date version of FreeBSD. A full menu of reasonable choices for almost any location in the world is provided in the FTP site menu during installation.

If you are installing from some other FTP site not listed in this menu, or you are having troubles getting your name server configured properly, you can also specify your own URL by selecting the “URL” choice in that menu. A URL can contain a hostname or an IP address, so something like the following would work in the absence of a name server:

ftp://216.66.64.162/pub/FreeBSD/releases/amd64/4.2-RELEASE

There are three FTP installation modes you can use:

  • FTP: This method uses the standard “Active” mode for transfers, in which the server initiates a connection to the client. This will not work through most firewalls but will often work best with older FTP servers that do not support passive mode. If your connection hangs with passive mode, try this one.

  • FTP Passive: This sets the FTP "Passive" mode which prevents the server from opening connections to the client. This option is best for users to pass through firewalls that do not allow incoming connections on random port addresses.

  • FTP via an HTTP proxy: This option instructs FreeBSD to use HTTP to connect to a proxy for all FTP operations. The proxy will translate the requests and send them to the FTP server. This allows the user to pass through firewalls that do not allow FTP at all, but offer an HTTP proxy. You must specify the hostname of the proxy in addition to the FTP server.

    In the rare case that you have an FTP proxy that does not go through HTTP, you can specify the URL as something like:

    ftp://foo.bar.com:port/pub/FreeBSD
    

    In the URL above, port is the port number of the proxy FTP server.

1.5.6 Tips for Serial Console Users

If you'd like to install FreeBSD on a machine using just a serial port (e.g. you don't have or wish to use a VGA card), please follow these steps:

  1. Connect some sort of ANSI (vt100) compatible terminal or terminal emulation program to the COM1 port of the PC you are installing FreeBSD onto.

  2. Unplug the keyboard (yes, that's correct!) and then try to boot from floppy or the installation CDROM, depending on the type of installation media you have, with the keyboard unplugged.

  3. If you don't get any output on your serial console, plug the keyboard in again. If you are booting from the CDROM, proceed to step 5 as soon as you hear the beep.

  4. If booting from floppies, when access to the disk stops, insert the first of the kernX.flp disks and press Enter. When access to this disk finishes, insert the next kernX.flp disk and press Enter, and repeat until all kernX.flp disks have been inserted. When disk activity finishes, reinsert the boot.flp floppy disk and press Enter.

  5. Once a beep is heard, hit the number 6, then enter

    boot -h
    

    and you should now definitely be seeing everything on the serial port. If that still doesn't work, check your serial cabling as well as the settings on your terminal emulation program or actual terminal device. It should be set for 9600 baud, 8 bits, no parity.

1.6 Question and Answer Section for AMD64 Architecture Users

1.6.1. Help! I have no space! Do I need to delete everything first?
1.6.2. Can I use compressed DOS filesystems from FreeBSD?
1.6.3. Can I mount my DOS extended partitions?
1.6.4. Can I run DOS binaries under FreeBSD?
1.6.5. Can I run Microsoft® Windows® applications under FreeBSD?
1.6.6. Can I run other Operating Systems under FreeBSD?

1.6.1. Help! I have no space! Do I need to delete everything first?

If your machine is already running DOS and has little or no free space available for FreeBSD's installation, there are several alternatives for resizing existing partitions so that you can install FreeBSD.

The FIPS utility, provided in the tools/ subdirectory on the FreeBSD CDROM or on the various FreeBSD ftp sites, can resize an existing FAT partition. It allows you to split an existing DOS partition into two pieces, preserving the original partition and allowing you to install onto the second free piece. You first “defrag” your DOS partition, using the DOS 6.xx DEFRAG utility or the Norton Disk Tools, then run FIPS. It will prompt you for the rest of the information it needs. Afterwards, you can reboot and install FreeBSD on the new partition. Also note that FIPS will create the second partition as a “clone” of the first, so you'll actually see that you now have two DOS Primary partitions where you formerly had one. Don't be alarmed! You can simply delete the extra DOS Primary partition (making sure it's the right one by examining its size).

For systems with NTFS partitions, a different tool, such as ntfsresize or the commercially-available Partition Magic, is required. ntfsresize, as well as the GParted graphical interface for partition resizing, is available on a number of Live CD Linux distributions, such as SystemRescueCD.

Problems have been reported resizing Microsoft Vista partitions. Having a Vista installation CDROM handy when attempting such an operation is recommended. As with all such disk maintenance tasks, a current set of backups is also strongly advised.

1.6.2. Can I use compressed DOS filesystems from FreeBSD?

No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm), FreeBSD will only be able to use whatever portion of the filesystem you leave uncompressed. The rest of the filesystem will show up as one large file (the stacked/dblspaced file!). Do not remove that file as you will probably regret it greatly!

It is probably better to create another uncompressed DOS extended partition and use this for communications between DOS and FreeBSD if such is your desire.

1.6.3. Can I mount my DOS extended partitions?

Yes. DOS extended partitions are mapped in at the end of the other “slices” in FreeBSD, e.g. your D: drive might be /dev/da0s5, your E: drive /dev/da0s6, and so on. This example assumes, of course, that your extended partition is on SCSI drive 0. For IDE drives, substitute ad for da appropriately. You otherwise mount extended partitions exactly like you would mount any other DOS drive, e.g.:

# mount -t msdos /dev/da0s5 /dos_d

1.6.4. Can I run DOS binaries under FreeBSD?

Ongoing work with BSDI's doscmd(1) utility will suffice in many cases, though it still has some rough edges. The emulators/doscmd port/package can be found in the FreeBSD Ports Collection. If you're interested in working on this, please send mail to the FreeBSD-emulation mailing list and indicate that you're interested in joining this ongoing effort!

The emulators/pcemu port/package in the FreeBSD Ports Collection which emulates an 8088 and enough BIOS services to run DOS text mode applications. It requires the X Window System (XFree86) to operate.

1.6.5. Can I run Microsoft® Windows® applications under FreeBSD?

There are several ports/packages in the FreeBSD Ports Collection which can enable the use of many Windows applications. The emulators/wine port/package provides a compatibility layer on top of FreeBSD which allow many Windows applications to be run within X Windows (XFree86).

1.6.6. Can I run other Operating Systems under FreeBSD?

Again, there are several ports/packages in the FreeBSD Ports Collection which simulate "virtual machines" and allow other operating systems to run on top of FreeBSD. The emulators/bochs port/package allows Microsoft Windows, Linux and even other copies of FreeBSD to be run within a window on the FreeBSD desktop. The emulators/vmware2 and emulators/vmware3 ports/packages allow the commercial VMware virtual machine software to be run on FreeBSD.

This file, and other release-related documents, can be downloaded from http://www.FreeBSD.org/snapshots/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.

All users of FreeBSD 6-STABLE should subscribe to the <stable@FreeBSD.org> mailing list.

For questions about this documentation, e-mail <doc@FreeBSD.org>.