FreeBSD/ia64 5.1-RELEASE Installation Instructions
The FreeBSD Project
Copyright © 2000, 2001, 2002, 2003 by The FreeBSD Documentation Project
This section documents the process of installing a new distribution of FreeBSD. These instructions pay particular emphasis to the process of obtaining the FreeBSD 5.1-RELEASE 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.
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.
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.
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.
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.
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 simply add the following line to the password file (using the vipw(8) command):
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.
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.1440 # disklabel -w -r fd0.1440 floppy3 # newfs -t 2 -u 18 -l 1 -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 split into chunks conveniently sized so that 5 of them will fit on a conventional 1.44MB floppy. Go through all your floppies, packing as many files as will fit on each one, until you've got all the distributions you want packed up in this fashion. 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. This is also covered in README.TXT.
Once you come to the Media screen of the install, select ``Floppy'' and you'll be prompted for the rest.
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/rsa0 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.
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.
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 I recommend that the PPP utility 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.
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.
FreeBSD supports many 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.
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 will 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.
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:
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:
In the URL above, port is the port number of the proxy FTP server.
A typical FreeBSD distribution directory looks something like this (exact details may vary depending on version, architecture, and other factors):
ERRATA.HTM README.TXT compat1x dict kernel ERRATA.TXT RELNOTES.HTM compat20 doc manpages HARDWARE.HTM RELNOTES.TXT compat21 docbook.css packages HARDWARE.TXT base compat22 filename.txt ports INSTALL.HTM boot compat3x floppies proflibs INSTALL.TXT catpages compat4x games src README.HTM cdrom.inf crypto info tools
If you want to do a CDROM, FTP or NFS installation from this distribution directory, all you need to do is make the 1.44MB boot floppies from the floppies directory (see Section 1.3 for instructions on how to do this), boot them and follow the instructions. The rest of the data needed during the installation will be obtained automatically based on your selections. If you've never installed FreeBSD before, you also want to read the entirety of this document (the installation instructions) file.
If you're trying to do some other type of installation or are merely curious about how a distribution is organized, what follows is a more thorough description of some of these items in more detail:
The *.TXT and *.HTM files contain documentation (for example, this document is contained in both INSTALL.TXT and INSTALL.HTM) and should be read before starting an installation. The *.TXT files are plain text, while the *.HTM files are HTML files that can be read by almost any Web browser. Some distributions may contain documentation in other formats as well, such as PDF or PostScript.
docbook.css is a Cascading Style Sheet (CSS) file used by some Web browsers for formatting the HTML documentation.
The base, catpages, crypto, dict, doc, games, info, manpages, proflibs, and src directories contain the primary distribution components of FreeBSD itself and are split into smaller files for easy packing onto floppies (should that be necessary).
The compat1x, compat20, compat21, compat22, compat3x, and compat4x directories contain distributions for compatibility with older releases and are distributed as single gzip'd tar files - they can be installed during release time or later by running their install.sh scripts.
The floppies/ subdirectory contains the floppy installation images; further information on using them can be found in Section 1.3.
The packages and ports directories contain the FreeBSD Packages and Ports Collections. Packages may be installed from the packages directory by running the command:
Packages can also be installed by feeding individual filenames in packages/ to the pkg_add(1) command.
The Ports Collection may be installed like any other distribution and requires about 100MB unpacked. More information on the ports collection may be obtained from http://www.FreeBSD.org/ports/ or locally from /usr/share/doc/handbook if you've installed the doc distribution.
Last of all, the tools directory contains various DOS tools for discovering disk geometries, installing boot managers and the like. It is purely optional and provided only for user convenience.
A typical distribution directory (for example, the info distribution) looks like this internally:
CHECKSUM.MD5 info.ab info.ad info.inf install.sh info.aa info.ac info.ae info.mtree
The CHECKSUM.MD5 file contains MD5 signatures for each file, should data corruption be suspected, and is purely for reference. It is not used by the actual installation and does not need to be copied with the rest of the distribution files. The info.a* files are split, gzip'd tar files, the contents of which can be viewed by doing:
# cat info.a* | tar tvzf -
During installation, they are automatically concatenated and extracted by the installation procedure.
The info.inf file is also necessary since it is read by the installation program in order to figure out how many pieces to look for when fetching and concatenating the distribution. When putting distributions onto floppies, the .inf file must occupy the first floppy of each distribution set!
The info.mtree file is another non-essential file which is provided for user reference. It contains the MD5 signatures of the unpacked distribution files and can be later used with the mtree(8) program to verify the installation permissions and checksums against any possible modifications to the file. When used with the base distribution, this can be an excellent way of detecting trojan horse attacks on your system.
Finally, the install.sh file is for use by those who want to install the distribution after installation time. To install the info distribution from CDROM after a system was installed, for example, you'd do:
# cd /cdrom/info # sh install.sh
These instructions describe a procedure for doing a binary upgrade from an older version of FreeBSD.
Warning: While the FreeBSD upgrade procedure does its best to safeguard against accidental loss of data, it is still more than possible to wipe out your entire disk with this installation! Please do not accept the final confirmation request unless you have adequately backed up any important data files.
Important: These notes assume that you are using the version of sysinstall(8) supplied with the version of FreeBSD to which you intend to upgrade. Using a mismatched version of sysinstall(8) is almost guaranteed to cause problems and has been known to leave systems in an unusable state. The most commonly made mistake in this regard is the use of an old copy of sysinstall(8) from an existing installation to upgrade to a newer version of FreeBSD. This is not recommended.
Warning: Binary upgrades to FreeBSD 5.1-RELEASE from FreeBSD 4-STABLE are not supported at this time. There are some files present in a FreeBSD 4-STABLE whose presence can be disruptive, but are not removed by a binary upgrade. One notable example is that an old /usr/include/g++ directory will cause C++ programs to compile incorrectly (or not at all).
These upgrade instructions are provided for the use of users upgrading from relatively recent FreeBSD 5-CURRENT snapshots.
The upgrade procedure replaces distributions selected by the user with those corresponding to the new FreeBSD release. It preserves standard system configuration data, as well as user data, installed packages and other software.
Administrators contemplating an upgrade are encouraged to study this section in its entirety before commencing an upgrade. Failure to do so may result in a failed upgrade or loss of data.
Upgrading of a distribution is performed by extracting the new version of the component over the top of the previous version. Files belonging to the old distribution are not deleted.
System configuration is preserved by retaining and restoring the previous version of the following files:
Xaccel.ini, XF86Config, adduser.conf, aliases, aliases.db, amd.map, crontab, csh.cshrc, csh.login, csh.logout, cvsupfile, dhclient.conf, disktab, dm.conf, dumpdates, exports, fbtab, fstab, ftpusers, gettytab, gnats, group, hosts, hosts.allow, hosts.equiv, hosts.lpd, inetd.conf, localtime, login.access, login.conf, mail, mail.rc, make.conf, manpath.config, master.passwd, motd, namedb, networks, newsyslog.conf, nsmb.conf, nsswitch.conf, pam.conf, passwd, periodic, ppp, printcap, profile, pwd.db, rc.conf, rc.conf.local, rc.firewall, rc.local, remote, resolv.conf, rmt, sendmail.cf, sendmail.cw, services, shells, skeykeys, spwd.db, ssh, syslog.conf, ttys, uucp
The versions of these files which correspond to the new version are moved to /etc/upgrade/. The system administrator may peruse these new versions and merge components as desired. Note that many of these files are interdependent, and the best merge procedure is to copy all site-specific data from the current files into the new.
During the upgrade procedure, the administrator is prompted for a location into which all files from /etc/ are saved. In the event that local modifications have been made to other files, they may be subsequently retrieved from this location.
This section details the upgrade procedure. Particular attention is given to items which substantially differ from a normal installation.
User data and system configuration should be backed up before upgrading. While the upgrade procedure does its best to prevent accidental mistakes, it is possible to partially or completely destroy data and configuration information.
The disklabel editor is entered with the nominated disk's filesystem devices listed. Prior to commencing the upgrade, the administrator should make a note of the device names and corresponding mountpoints. These mountpoints should be entered here. Do not set the ``newfs flag'' for any filesystems, as this will cause data loss.
When selecting distributions, there are no constraints on which must be selected. As a general rule, the base distribution should be selected for an update, and the man distribution if manpages are already installed. Other distributions may be selected beyond those originally installed if the administrator wishes to add additional functionality.
Once the installation procedure has completed, the administrator is prompted to examine the new configuration files. At this point, checks should be made to ensure that the system configuration is valid. In particular, the /etc/rc.conf and /etc/fstab files should be checked.
Those interested in an upgrade method that allows more flexibility and sophistication should take a look at The Cutting Edge in the FreeBSD Handbook. This procedure involves rebuilding all of FreeBSD from source code. It requires reliable network connectivity, extra disk space, and time, but has advantages for networks and other more complex installations. This is roughly the same procedure as is used for track the -STABLE or -CURRENT development branches.
/usr/src/UPDATING contains important information on updating a FreeBSD system from source code. It lists various issues resulting from changes in FreeBSD that may affect an upgrade.
FreeBSD features a ``Fixit'' option in the top menu of the boot floppy. To use it, you will also need either a fixit.flp image floppy, generated in the same fashion as the boot floppy, or the ``live filesystem'' CDROM; typically the second CDROM in a multi-disc FreeBSD distribution.
To invoke fixit, simply boot the kern.flp floppy, choose the ``Fixit'' item and insert the fixit floppy or CDROM when asked. You will then be placed into a shell with a wide variety of commands available (in the /stand and /mnt2/stand directories) for checking, repairing and examining filesystems and their contents. Some UNIX administration experience is required to use the fixit option.
This file, and other release-related documents, can be downloaded from ftp://ftp.FreeBSD.org/.
All users of FreeBSD 5-CURRENT should subscribe to the <current@FreeBSD.org> mailing list.
For questions about this documentation, e-mail <doc@FreeBSD.org>.