Previously, it was discussed how to install FreeBSD with the installer. In the Question 4, The installer allows administrators to select what distribution to be installed – 32-bit compatibility libraries, source code, debug symbols, etc.
Sometimes, maybe due to a mistaken omission, or maybe due to a new purpose, more distribution files have to be added. In the good old days of FreeBSD 4.x, I could easily run the “/stand/install” again and let it be reconfigured. The new installer since 9.x becomes unknown to me and I get to do it myself.
Thankfully, it is much easier than one could have thought of.
Downloading the Files
Downloading the distribution file is relatively simple with FTP. There is an FTP client coming with the default minimal FreeBSD installation. From there, we can download the distributions files. For simplicity, I have skipped the directory listing messages. The filenames will be self-explanatory as you encounter them.
# ftp -a ftp.freebsd.org Connected to ftp.geo.freebsd.org. (Output truncated) 220 This is ftp.geo.freebsd.org - hosted at ISC.org 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd pub/FreeBSD/releases ftp> ls 150 Here comes the directory listing. (Output truncated) 226 Directory send OK. ftp> cd amd64 ftp> ls 150 Here comes the directory listing. (Output truncated) 226 Directory send OK. ftp> cd 11.0-RELEASE ftp> ls 150 Here comes the directory listing. (Output truncated) 226 Directory send OK. ftp> mget kernel-dbg.txz base-dbg.txz mget kernel-dbg.txz [anpqy?]? a Prompting off for duration of mget 229 Entering Extended Passive Mode 150 Opening BINARY mode data connection for kernel-dbg.txz 226 Transfer complete 229 Entering Extended Passive Mode for base-dbg.txz 226 Transfer complete ftp> exit 221 Goodbye
Installing the Files
If you want to preview what files are inside, you can use “tar tf” command directly, such as…
# tar tf kernel-dbg.tgz # tar tf base-dbg.tgz
Installing the files is a simple Bzip2 tarball decompression to the root directory. For example…
# tar jxf kernel-dbg.txz -C / # tar jxf base-dbg.txz -C /
Here, the “j” stands for Bzip2, “x” stands for decompress, “f” stands for filename, and “C” stands for changing to a given directory (which is the root in our case).
It is likely the system has been patched since the “release” installation. To make sure the files you installed match with your updated system, you can consider running the FreeBSD update once. Please note the commands have to be run on interactive terminals. Make backups if the system holds files that you cannot lose.
# freebsd-update fetch # freebsd-update install
Installing without Installer?
Replying questions of the FreeBSD Installer can be boring. Technically, installing a minimal FreeBSD can be as simple as:
- Boot a temporary operating system environment (like live CD)
- Partition the drives and install the boot loader (like Question 8 of here)
- Download and decompress the distribution files “kernel.txz” and “base.txz”
- Configure the essential config files, “/etc/fstab” and “/etc/rc.conf”
- Remove any temporary boot media and reboot
Will it work? Well…