3.13. Preparing Custom Installation Media

Some situations may require a customized FreeBSD installation media and/or source. This might be physical media or a source that sysinstall(8) can use to retrieve the installation files. Some example situations include:

3.13.1. Creating an Installation ISO

As part of each release, the FreeBSD Project provides ISO images for each supported architecture. These images can be written (burned) to CD or DVD media using a burning application, and then used to install FreeBSD. If a CD/DVD writer is available, this is the easiest way to install FreeBSD.

  1. Download the Correct ISO Images

    The ISO images for each release can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/ISO-IMAGES-arch/version or the closest mirror. Substitute arch and version as appropriate.

    An image directory normally contains the following images:

    Table 3.4. FreeBSD ISO Image Names and Meanings
    FilenameContents
    FreeBSD-version-RELEASE-arch-bootonly.isoThis CD image starts the installation process by booting from a CD-ROM drive but it does not contain the support for installing FreeBSD from the CD itself. Perform a network based install, such as from an FTP server, after booting from this CD.
    FreeBSD-version-RELEASE-arch-dvd1.iso.gzThis DVD image contains everything necessary to install the base FreeBSD operating system, a collection of pre-built packages, and the documentation. It also supports booting into a livefs based rescue mode.
    FreeBSD-version-RELEASE-arch-memstick.imgThis image can be written to a USB memory stick in order to install machines capable of booting from USB drives. It also supports booting into a livefs based rescue mode. The only included package is the documentation package.
    FreeBSD-version-RELEASE-arch-disc1.isoThis image can be written to a USB memory stick in order to install machines capable of booting from USB drives. Similar to the bootonly.iso image, it does not contain the distribution sets on the medium itself, but does support network-based installations (for example, via ftp).
    FreeBSD-version-RELEASE-arch-disc1.isoThis CD image contains the base FreeBSD operating system and the documentation package but no other packages.
    FreeBSD-version-RELEASE-arch-disc2.isoA CD image with as many third-party packages as would fit on the disc. This image is not available for FreeBSD 9.X.
    FreeBSD-version-RELEASE-arch-disc3.isoAnother CD image with as many third-party packages as would fit on the disc. This image is not available for FreeBSD 9.X.
    FreeBSD-version-RELEASE-arch-livefs.isoThis CD image contains support for booting into a livefs based rescue mode but does not support doing an install from the CD itself.

    When performing a CD installation, download either the bootonly ISO image or disc1. Do not download both, since disc1 contains everything that the bootonly ISO image contains.

    Use the bootonly ISO to perform a network install over the Internet. Additional software can be installed as needed using the Ports Collection as described in Chapter 5, Installing Applications: Packages and Ports.

    Use dvd1 to install FreeBSD and a selection of third-party packages from the disc.

  2. Burn the Media

    Next, write the downloaded image(s) to disc. If using another FreeBSD system, refer to Section 18.5.2, “Burning a CD for instructions.

    If using another platform, use any burning utility that exists for that platform. The images are in the standard ISO format which most CD writing applications support.

Note:

To build a customized release of FreeBSD, refer to the Release Engineering Article.

3.13.2. Creating a Local FTP Site with a FreeBSD Disc

FreeBSD discs are laid out in the same way as the FTP site. This makes it easy to create a local FTP site that can be used by other machines on a network to install FreeBSD.

  1. On the FreeBSD computer that will host the FTP site, ensure that the CD/DVD is in the drive and mounted:

    # mount /cdrom
  2. Create an account for anonymous FTP. Use vipw(8) to insert this line:

    ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent
  3. Ensure that the FTP service is enabled in /etc/inetd.conf.

Anyone with network connectivity to the machine can now chose a media type of FTP and type in ftp://your machine after picking Other in the FTP sites menu during the install.

Note:

If the boot media for the FTP clients is not precisely the same version as that provided by the local FTP site, sysinstall(8) will not complete the installation. To override this, go into the Options menu and change the distribution name to any.

Warning:

This approach is acceptable for a machine on the local network which is protected by a firewall. Offering anonymous FTP services to other machines over the Internet exposes the computer to increased security risks. It is strongly recommended to follow good security practices when providing services over the Internet.

3.13.3. Installing from an Windows® Partition

To prepare for an installation from a Windows® partition, copy the files from the distribution into a directory in the root directory of the partition, such as c:\freebsd. Since the directory structure must be reproduced, it is recommended to use robocopy when copying from a CD/DVD. For example, to prepare for a minimal installation of FreeBSD:

C:\> md c:\freebsd
C:\> robocopy e:\bin c:\freebsd\bin\ /s
C:\> robocopy e:\manpages c:\freebsd\manpages\ /s

This example assumes that C: has enough free space and E: is where the CD/DVD is mounted.

Alternatively, download the distribution from ftp.FreeBSD.org. Each distribution is in its own directory; for example, the base distribution can be found in the 9.3/base/ directory.

Copy the distributions to install from a Windows® partition to c:\freebsd. Both the base and kernel distributions are needed for the most minimal installation.

3.13.4. Before Installing over a Network

There are three types of network installations available: Ethernet, PPP, and PLIP.

For the fastest possible network installation, use an Ethernet adapter. FreeBSD supports most common Ethernet cards. A list of supported cards is provided in the Hardware Notes for each release of FreeBSD. If using a supported PCMCIA Ethernet card, be sure that it is plugged in before the system is powered on as FreeBSD does not support hot insertion of PCMCIA cards during installation.

Make note of the system's IP address, subnet mask, hostname, default gateway address, and DNS server addresses if these values are statically assigned. If installing by FTP through a HTTP proxy, make note of the proxy's address. If you do not know these values, ask the system administrator or ISP before trying this type of installation.

If using a dialup modem, have the service provider's PPP information handy as it is needed early in the installation process.

If PAP or CHAP are used to connect to the ISP without using a script, type dial at the FreeBSD ppp prompt. Otherwise, know how to dial the ISP using the AT commands specific to the modem, as the PPP dialer provides only a simple terminal emulator. Refer to Section 27.2, “Configuring PPP and ../../../../doc/en_US.ISO8859-1/books/faq/ppp.html for further information. Logging can be directed to the screen using set log local ....

If a hard-wired connection to another FreeBSD machine is available, the installation can occur over a null-modem parallel port cable. The data rate over the parallel port is higher than what is typically possible over a serial line.

3.13.4.1. Before Installing via NFS

To perform an NFS installation, copy the needed FreeBSD distribution files to an NFS server and then point the installer's NFS media selection to it.

If the server supports only a privileged port, set the option NFS Secure in the Options menu so that the installation can proceed.

If using a poor quality Ethernet card which suffers from slow transfer rates, toggle the NFS Slow flag to on.

In order for an NFS installation to work, the server must support subdir mounts. For example, if the FreeBSD 10.2 distribution lives on: ziggy:/usr/archive/stuff/FreeBSD, ziggy will have to allow the direct mounting of /usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff.

In FreeBSD, this is controlled by using -alldirs in /etc/exports. Other NFS servers may have different conventions. If the server is displaying permission denied messages, it is likely that this is not enabled properly.

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <[email protected]>.
Send questions about this document to <[email protected]>.