This will guide you through the installation process for FreeBSD 9x or higher. The first thing you will want to do is download the software.
The minimal configuration to install FreeBSD varies with the FreeBSD version and the hardware architecture.
A summary of this information is given in the following sections. Depending on the method you choose to install FreeBSD, you may also need a supported CDROM drive, and in some cases a network adapter.
FreeBSD/i386 requires a 486 or better processor and at least 64 MB of RAM. At least 1.1 GB of free hard drive space is needed for the most minimal installation.
On old computers, increasing RAM and hard drive space is usually more effective at improving performance than installing a faster processor.
There are two classes of processors capable of running FreeBSD/amd64. The first are AMD64 processors, including the AMD Athlon™64, AMD Athlon™64-FX, AMD Opteron™ or better processors.
The second class of processors that can use FreeBSD/amd64 includes those using the Intel® EM64T architecture. Examples of these processors include the Intel® Core™ 2 Duo, Quad, Extreme processor families, the Intel® Xeon™ 3000, 5000, and 7000 sequences of processors, and the Intel® Core™ i3, i5 and i7 processors.
If you have a 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 for which we have not yet found a workaround.
FreeBSD/powerpc Apple® Macintosh®
All New World Apple® Macintosh® systems with built-in USB are supported. SMP is supported on machines with multiple CPUs.
A 32-bit kernel can only use the first 2 GB of RAM. FireWire® is not supported on the Blue & White PowerMac G3.
Systems supported by FreeBSD/sparc64 are listed at the FreeBSD/sparc64 Project.
A dedicated disk is required for FreeBSD/sparc64. It is not possible to share a disk with another operating system at this time.
Hardware architectures and devices supported by a FreeBSD release are listed in the Hardware Notes file. Usually named
HARDWARE.TXT, the file is located in the root directory of the release media. Copies of the supported hardware list are also available on the Release Information page of the FreeBSD web site.
Back Up Your Data
Back up all important data on the target computer where FreeBSD will be installed. Test the backups before continuing. The FreeBSD installer will ask before making changes to the disk, but once the process has started it cannot be undone.
Decide Where to Install FreeBSD
If FreeBSD will be the only operating system installed, and will be allowed to use the entire hard disk, the rest of this section can be skipped. But if FreeBSD will share the disk with other operating systems, an understanding of disk layout is useful during the installation.
Disk Layouts for FreeBSD/i386 and FreeBSD/amd64
Hard disks can be divided into multiple sections. These sections are called partitions.
There are two ways of dividing a disk into partitions. A traditional Master Boot Record (MBR) holds a partition table defining up to four primary partitions. (For historical reasons, FreeBSD calls primary partitions slices.) A limit of only four partitions is restrictive for large disks, so one of these primary partitions can be made into an extended partition. Multiple logical partitions may then be created inside the extended partition. This may sound a little unwieldy, and it is.
The GUID Partition Table (GPT) is a newer and simpler method of partitioning a disk. GPT is far more versatile than the traditional MBR partition table. Common GPT implementations allow up to 128 partitions per disk, eliminating the need for inconvenient workarounds like logical partitions.
Some older operating systems like Windows® XP are not compatible with the GPT partition scheme. If FreeBSD will be sharing a disk with such an operating system, MBR partitioning is required.
FreeBSD's standard boot loader requires either a primary or GPT partition.
A minimal installation of FreeBSD takes as little as 1 GB of disk space. However, that is a very minimal install, leaving almost no free space. A more realistic minimum is 3 GB without a graphical environment, and 5 GB or more if a graphical user interface will be used. Third-party application software requires more space.
A variety of free and commercial partition resizing tools are available. GParted Live is a free Live CD which includes the GParted partition editor. GParted is also included with many other Linux Live CD distributions.
Disk partition applications can destroy data. Make a full backup and verify its integrity before modifying disk partitions.
Resizing Microsoft® Vista partitions can be difficult. A Vista installation CDROM can be useful when attempting such an operation.
A Windows® computer has a single 40 GB disk that has been split into two 20 GB partitions. Windows® calls them
C: partition contains 10 GB of data, and the
D: partition contains 5 GB of data.
Moving the data from
C: frees up the second partition to be used for FreeBSD.
A Windows® computer has a single 40 GB disk and one large partition using the whole disk. Windows® shows this 40 GB partition as a single
C:. 15 GB of space is being used. The goal is to end up with Windows® in a 20 GB partition, and have another 20 GB partition for FreeBSD.
There are two ways to do this:
Back up your Windows® data. Then reinstall Windows®, creating a 20 GB partition during the install.
Use a partition resizing tool like GParted to shrink the Windows® partition and create a new partition in the freed space for FreeBSD.
Disk partitions containing different operating systems make it possible to run any one of those operating systems at a time. An alternative method that allows running multiple operating systems.
Collect Network Information
Some FreeBSD installation methods need a network connection to download files. To connect to an Ethernet network (or cable or DSL modem with an Ethernet interface), the installer will request some information about the network.
DHCP is commonly used to provide automatic network configuration. If DHCP is not available, this network information must be obtained from the local network administrator or service provider:
Default router IP address
Domain name of the local network
DNS server IP address(es)
Check for FreeBSD Errata
Although the FreeBSD Project strives to ensure that each release of FreeBSD is as stable as possible, bugs occasionally creep into the process. On very rare occasions those bugs affect the installation process. As these problems are discovered and fixed, they are noted in the FreeBSD Errata on the FreeBSD web site. Check the errata before installing to make sure that there are no problems that might affect the installation.
Prepare the Installation Media
A FreeBSD installation is started by booting the computer with a FreeBSD installation CD, DVD, or USB memory stick. The installer is not a program that can be run from within another operating system.
In addition to the standard installation media which contains copies of all the FreeBSD installation files, there is a bootonly variant. Bootonly install media does not have copies of the installation files, but downloads them from the network during an install. The bootonly install CD is consequently much smaller, and reduces bandwidth usage during the install by only downloading required files.
Copies of FreeBSD installation media are also available at the FreeBSD web site. Also download
CHECKSUM.SHA256 from the same directory as the image file, and use it to check the image file's integrity by calculating a checksum. FreeBSD provides sha256(1) for this, while other operating systems have similar programs. Compare the calculated checksum with the one shown in
CHECKSUM.SHA256. The checksums must match exactly. If the checksums do not match, the file is corrupt and should be discarded.
If you already have a copy of FreeBSD on CDROM, DVD, or USB memory stick, this section can be skipped.
FreeBSD CD and DVD images are bootable ISO files. Only one CD or DVD is needed for an install. Burn the ISO image to a bootable CD or DVD using the CD recording applications available with your current operating system. On FreeBSD, recording is provided by cdrecord(1) from
sysutils/cdrtools, installed from the Ports Collection.
To create a bootable memory stick, follow these steps:
Acquire the Memory Stick Image
Memory stick images for FreeBSD 9.0-RELEASE and later can be downloaded from the
ISO-IMAGES/ directory at
version with the architecture and the version number which you want to install, respectively. For example, the memory stick images for FreeBSD/i386 9.0-RELEASE are available from
The memory stick image has a
.img extension. The
ISO-IMAGES/ directory contains a number of different images, and the one needed depends on the version of FreeBSD being installed, and in some cases, the target hardware.
Before proceeding, back up the data on the USB stick, as this procedure will erase it.
Write the Image File to the Memory Stick
Using FreeBSD to Write the Image
The example below shows
/dev/da0 as the target device where the image will be written. Be very careful that the correct device is used as the output target, or you may destroy existing data.
Writing the Image with dd(1)
.img file is not a regular file. It is an image of the complete contents of the memory stick. It cannot simply be copied like a regular file, but must be written directly to the target device with dd(1):
dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/da0 bs=64k
Be sure to give the correct drive letter as the output target, or you may overwrite and destroy existing data.
Obtaining Image Writer for Windows®
Image Writer for Windows® is a free application that can correctly write an image file to a memory stick. Download it from
https://launchpad.net/win32-image-writer/ and extract it into a folder.
Writing the Image with Image Writer
Double-click the Win32DiskImager icon to start the program. Verify that the drive letter shown under
Device is the drive with the memory stick. Click the folder icon and select the image to be written to the memory stick. Click to accept the image file name. Verify that everything is correct, and that no folders on the memory stick are open in other windows. When everything is ready, click to write the image file to the memory stick.
Installation from floppy disks is no longer supported.
You are now ready to start installing FreeBSD.
Starting the Installation
By default, the installation will not make any changes to your disk(s) until you see the following message:
Your changes will now be written to disk. If you have chosen to overwrite existing data, it will be PERMANENTLY ERASED. Are you sure you want to commit your changes?
The install can be exited at any time prior to this warning without changing the contents of the hard drive. If you are concerned that you have configured something incorrectly you can just turn the computer off before this point, and no damage will be done.
Booting on i386™ and amd64
If you prepared a “bootable” USB stick, as described in Section 2.3.5, “Prepare the Installation Media”, then plug in your USB stick before turning on the computer.
If you are booting from CDROM, then you will need to turn on the computer, and insert the CDROM at the first opportunity.
Configure your machine to boot from either the CDROM or from USB, depending on the media being used for the installation. BIOS configurations allow the selection of a specific boot device. Most systems also provide for selecting a boot device during startup, typically by pressing F10, F11, F12, or Escape.
If your computer starts up as normal and loads your existing operating system, then either:
The disks were not inserted early enough in the boot process. Leave them in, and try restarting your computer.
The BIOS changes earlier did not work correctly. You should redo that step until you get the right option.
Your particular BIOS does not support booting from the desired media. The Plop Boot Manager can be used to boot older computers from CD or USB media.
FreeBSD will start to boot. If you are booting from CDROM you will see a display similar to this (version information omitted):
Booting from CD-ROM... 645MB medium detected CD Loader 1.2 Building the boot loader arguments Looking up /BOOT/LOADER... Found Relocating the loader and the BTX Starting the BTX loader BTX loader 1.00 BTX version is 1.02 Consoles: internal video/keyboard BIOS CD is cd0 BIOS drive C: is disk0 BIOS drive D: is disk1 BIOS 636kB/261056kB available memory FreeBSD/i386 bootstrap loader, Revision 1.1 Loading /boot/defaults/loader.conf /boot/kernel/kernel text=0x64daa0 data=0xa4e80+0xa9e40 syms=[0x4+0x6cac0+0x4+0x88e9d] \
The FreeBSD boot loader is displayed:
On most machines, holding C on the keyboard during boot will boot from the CD. Otherwise, hold Command+Option+O+F, or Windows+Alt+O+F on non-Apple® keyboards. At the
0 > prompt, enter
boot cd:,\ppc\loader cd:0
For Xserves without keyboards, see Apple®'s support web site about booting into Open Firmware.
Booting for SPARC64®
Most SPARC64® systems are set up to boot automatically from disk. To install FreeBSD, you need to boot over the network or from a CDROM, which requires you to break into the PROM (OpenFirmware).
To do this, reboot the system, and wait until the boot message appears. It depends on the model, but should look about like:
Sun Blade 100 (UltraSPARC-IIe), Keyboard Present Copyright 1998-2001 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.2, 128 MB memory installed, Serial #51090132. Ethernet address 0:3:ba:b:92:d4, Host ID: 830b92d4.
If your system proceeds to boot from disk at this point, you need to press L1+A or Stop+A on the keyboard, or send a
BREAK over the serial console (using for example
~# in tip(1) or cu(1)) to get to the PROM prompt. It looks like this:
This is the prompt used on systems with just one CPU.
This is the prompt used on SMP systems, the digit indicates the number of the active CPU.
At this point, place the CDROM into your drive, and from the PROM prompt, type
Reviewing the Device Probe Results
The last few hundred lines that have been displayed on screen are stored and can be reviewed.
To review the buffer, press Scroll Lock. This turns on scrolling in the display. You can then use the arrow keys, or PageUp and PageDown to view the results. Press Scroll Lock again to stop scrolling.
Do this now, to review the text that scrolled off the screen when the kernel was carrying out the device probes. You will see text similar to Figure 2.2, “Typical Device Probe Results”, although the precise text will differ depending on the devices that you have in your computer.
Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-RELEASE #0 r225473M: Sun Sep 11 16:07:30 BST 2011 root@psi:/usr/obj/usr/src/sys/GENERIC amd64 CPU: Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz (2527.05-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x10676 Family = 6 Model = 17 Stepping = 6 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x8e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1> AMD Features=0x20100800<SYSCALL,NX,LM> AMD Features2=0x1<LAHF> TSC: P-state invariant, performance statistics real memory = 3221225472 (3072 MB) avail memory = 2926649344 (2791 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: <TOSHIB A0064 > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 <Version 2.0> irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: <TOSHIB A0064> on motherboard acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, b6690000 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xd808-0xd80b on acpi0 cpu0: <ACPI CPU> on acpi0 ACPI Warning: Incorrect checksum in table [ASF!] - 0xFE, should be 0x9A (20110527/tbutils-282) cpu1: <ACPI CPU> on acpi0 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 vgapci0: <VGA-compatible display> port 0xcff8-0xcfff mem 0xff400000-0xff7fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 agp0: <Intel GM45 SVGA controller> on vgapci0 agp0: aperture size is 256M, detected 131068k stolen memory vgapci1: <VGA-compatible display> mem 0xffc00000-0xffcfffff at device 2.1 on pci0 pci0: <simple comms> at device 3.0 (no driver attached) em0: <Intel(R) PRO/1000 Network Connection 7.2.3> port 0xcf80-0xcf9f mem 0xff9c0000-0xff9dffff,0xff9fe000-0xff9fefff irq 20 at device 25.0 on pci0 em0: Using an MSI interrupt em0: Ethernet address: 00:1c:7e:6a:ca:b0 uhci0: <Intel 82801I (ICH9) USB controller> port 0xcf60-0xcf7f irq 16 at device 26.0 on pci0 usbus0: <Intel 82801I (ICH9) USB controller> on uhci0 uhci1: <Intel 82801I (ICH9) USB controller> port 0xcf40-0xcf5f irq 21 at device 26.1 on pci0 usbus1: <Intel 82801I (ICH9) USB controller> on uhci1 uhci2: <Intel 82801I (ICH9) USB controller> port 0xcf20-0xcf3f irq 19 at device 26.2 on pci0 usbus2: <Intel 82801I (ICH9) USB controller> on uhci2 ehci0: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xff9ff800-0xff9ffbff irq 19 at device 26.7 on pci0 usbus3: EHCI version 1.0 usbus3: <Intel 82801I (ICH9) USB 2.0 controller> on ehci0 hdac0: <Intel 82801I High Definition Audio Controller> mem 0xff9f8000-0xff9fbfff irq 22 at device 27.0 on pci0 pcib1: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0 pci1: <ACPI PCI bus> on pcib1 iwn0: <Intel(R) WiFi Link 5100> mem 0xff8fe000-0xff8fffff irq 16 at device 0.0 on pci1 pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.1 on pci0 pci2: <ACPI PCI bus> on pcib2 pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0 pci4: <ACPI PCI bus> on pcib3 pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0 pci5: <ACPI PCI bus> on pcib4 cbb0: <RF5C476 PCI-CardBus Bridge> at device 11.0 on pci5 cardbus0: <CardBus bus> on cbb0 pccard0: <16-bit PCCard bus> on cbb0 isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 ahci0: <Intel ICH9M AHCI SATA controller> port 0x8f58-0x8f5f,0x8f54-0x8f57,0x8f48-0x8f4f,0x8f44-0x8f47,0x8f20-0x8f3f mem 0xff9fd800-0xff9fdfff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.20 with 4 3Gbps ports, Port Multiplier not supported ahcich0: <AHCI channel> at channel 0 on ahci0 ahcich1: <AHCI channel> at channel 1 on ahci0 ahcich2: <AHCI channel> at channel 4 on ahci0 acpi_lid0: <Control Method Lid Switch> on acpi0 battery0: <ACPI Control Method Battery> on acpi0 acpi_button0: <Power Button> on acpi0 acpi_acad0: <AC Adapter> on acpi0 acpi_toshiba0: <Toshiba HCI Extras> on acpi0 acpi_tz0: <Thermal Zone> on acpi0 attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model GlidePoint, device ID 0 atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 450 Event timer "HPET1" frequency 14318180 Hz quality 440 Event timer "HPET2" frequency 14318180 Hz quality 440 Event timer "HPET3" frequency 14318180 Hz quality 440 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: cannot reserve I/O port range est0: <Enhanced SpeedStep Frequency Control> on cpu0 p4tcc0: <CPU Frequency Thermal Control> on cpu0 est1: <Enhanced SpeedStep Frequency Control> on cpu1 p4tcc1: <CPU Frequency Thermal Control> on cpu1 Timecounters tick every 1.000 msec hdac0: HDA Codec #0: Realtek ALC268 hdac0: HDA Codec #1: Lucent/Agere Systems (Unknown) pcm0: <HDA Realtek ALC268 PCM #0 Analog> at cad 0 nid 1 on hdac0 pcm1: <HDA Realtek ALC268 PCM #1 Analog> at cad 0 nid 1 on hdac0 usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 480Mbps High Speed USB v2.0 ugen0.1: <Intel> at usbus0 uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0 ugen1.1: <Intel> at usbus1 uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1 ugen2.1: <Intel> at usbus2 uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2 ugen3.1: <Intel> at usbus3 uhub3: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3 uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub3: 6 ports with 6 removable, self powered ugen2.2: <vendor 0x0b97> at usbus2 uhub8: <vendor 0x0b97 product 0x7761, class 9/0, rev 1.10/1.10, addr 2> on usbus2 ugen1.2: <Microsoft> at usbus1 ada0 at ahcich0 bus 0 scbus1 target 0 lun 0 ada0: <Hitachi HTS543225L9SA00 FBEOC43C> ATA-8 SATA 1.x device ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 238475MB (488397168 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad4 ums0: <Microsoft Microsoft 3-Button Mouse with IntelliEyeTM, class 0/0, rev 1.10/3.00, addr 2> on usbus1 SMP: AP CPU #1 Launched! cd0 at ahcich1 bus 0 scbus2 target 0 lun 0 cd0: <TEAC DV-W28S-RT 7.0C> Removable CD-ROM SCSI-0 device cd0: 150.000MB/s transfers (SATA 1.x, ums0: 3 buttons and [XYZ] coordinates ID=0 UDMA2, ATAPI 12bytes, PIO 8192bytes) cd0: cd present [1 x 2048 byte records] ugen0.2: <Microsoft> at usbus0 ukbd0: <Microsoft Natural Ergonomic Keyboard 4000, class 0/0, rev 2.00/1.73, addr 2> on usbus0 kbd2 at ukbd0 uhid0: <Microsoft Natural Ergonomic Keyboard 4000, class 0/0, rev 2.00/1.73, addr 2> on usbus0 Trying to mount root from cd9660:/dev/iso9660/FREEBSD_INSTALL [ro]...
Check the probe results carefully to make sure that FreeBSD found all the devices you expected. If a device was not found, then it will not be listed. Kernel modules allows you to add in support for devices which are not in the
After the procedure of device probing, you will see Figure 2.3, “Selecting Installation Media Mode”. The install media can be used in three ways: to install FreeBSD, as a live CD, or to simply access a FreeBSD shell. Use the arrow keys to choose an option, and Enter to select.
Selectinghere will enter the installer.
bsdinstall is a text-based FreeBSD installer program written by Nathan Whitehorn
The bsdinstall menu system is controlled by the arrow keys, Enter, Tab, Space, and other keys.
Selecting the Keymap Menu
Depending on the system console being used, bsdinstall may initially prompt to select a non-default keyboard layout.
Ifis selected, the following keyboard selection screen will be displayed. Otherwise, this selection menu will not be displayed, and a default keyboard mapping will be used.
Select the keymap that most closely represents the mapping of the keyboard attached to the system, using the up/down arrow keys and pressing Enter.
Pressing Esc will use the default keymap. is also a safe option if the choice of keymap is not clear.
Setting the Hostname
Next, bsdinstall will prompt for the hostname to be given to the newly installed system.
The entered hostname should be a fully-qualified hostname, such as
Selecting Components to Install
Next, bsdinstall will prompt to select optional components to install.
Deciding which components to install will depend largely on the intended use of the system and the amount of disk space available. The FreeBSD Kernel and userland (collectively the “base system”) are always installed.
Depending on the type of installation, some of these components may not appear.
doc - Additional documentation, mostly of historical interest. Documentation provided by the FreeBSD Documentation Project may be installed later.
games - Several traditional BSD games, including fortune, rot13, and others.
lib32 - Compatibility libraries for running 32-bit applications on a 64-bit version of FreeBSD.
ports - The FreeBSD Ports Collection.
The ports collection is an easy and convenient way to install software. The Ports Collection does not contain the source code necessary to compile the software. Instead, it is a collection of files which automates the downloading, compiling and installation of third-party software packages. Chapter 5, Installing Applications: Packages and Ports discusses how to use the ports collection.
The installation program does not check to see if you have adequate space. Select this option only if you have adequate hard disk space. As of FreeBSD 9.0, the FreeBSD Ports Collection takes up about 500 MB of disk space. You can safely assume a larger value for more recent versions of FreeBSD.
src - System source code.
FreeBSD comes with full source code for both the kernel and the userland. Although not required for the majority of applications, it may be required to build certain software supplied as source (for example, device drivers or kernel modules), or for developing FreeBSD itself.
The full source tree requires 1 GB of disk space, and recompiling the entire FreeBSD system requires an additional 5 GB of space.
Installing from the Network
The bootonly installation media does not hold copies of the installation files. When a bootonly installation method is used, the files must be retrieved over a network connection as they are needed.
After the network connection has been configured as shown in Section 2.9.2, “Configuring Network Interfaces”, a mirror site is selected. Mirror sites cache copies of the FreeBSD files. Choose a mirror site located in the same region of the world as the computer on which FreeBSD is being installed. Files can be retrieved more quickly when the mirror is close to the target computer, and installation time will be reduced.
Installation will continue as if the installation files were located on local media.
Allocating Disk Space
There are three ways to allocate disk space for FreeBSD. Guided partitioning automatically sets up disk partitions, while Manual partitioning allows advanced users to create customized partitions. Finally, there's the option of starting a shell where command-line programs like gpart(8), fdisk(8), and bsdlabel(8) can be used directly.
If multiple disks are connected, choose the one where FreeBSD is to be installed.
The entire disk can be allocated to FreeBSD, or just a portion of it. Ifis chosen, a general partition layout filling the whole disk is created. Selecting creates a partition layout in unused space on the disk.
After the partition layout has been created, review it carefully for accuracy. If a mistake has been made, selectingwill reset the partitions as they were previously, or will recreate the automatic FreeBSD partitions. Partitions can be manually created, modified, or deleted. When the partitioning is correct, select to continue with the installation.
Manual partitioning goes straight to the partition editor.
Highlighting a drive (
ada0 in this example) and selecting displays a menu for choosing the type of partitioning scheme.
GPT partitioning is usually the most appropriate choice for PC-compatible computers. Older PC operating systems that are not compatible with GPT may require MBR partitioning instead. The other partitioning schemes are generally used for uncommon or older computer systems.
|APM||Apple Partition Map, used by PowerPC® Macintosh®.|
|BSD||BSD Labels without an MBR, sometimes called “dangerously dedicated mode”. See bsdlabel(8).|
|GPT||GUID Partition Table.|
|MBR||Master Boot Record.|
|PC98||MBR variant, used by NEC PC-98 computers.|
|VTOC8||Volume Table Of Contents, used by Sun SPARC64 and UltraSPARC computers.|
After the partitioning scheme has been selected and created, selectingagain will create new partitions.
A standard FreeBSD GPT installation uses at least three partitions:
freebsd-boot - FreeBSD boot code.
freebsd-ufs - A FreeBSD UFS filesystem.
freebsd-swap - FreeBSD swap space.
Size may be entered with common abbreviations: K for kilobytes, M for megabytes, or G for gigabytes.
Proper sector alignment provides the best performance, and making partition sizes even multiples of 4K bytes helps to ensure alignment on drives with either 512-byte or 4K-byte sectors. Generally, using partition sizes that are even multiples of 1M or 1G is the easiest way to make sure every partition starts at an even multiple of 4K. One exception: at present, the freebsd-boot partition should be no larger than 512K due to boot code limitations.
A mountpoint is needed if this partition will contain a filesystem. If only a single UFS partition will be created, the mountpoint should be
A label is also requested. A label is a name by which this partition will be known. Drive names or numbers can change if the drive is connected to a different controller or port, but the partition label does not change. Referring to labels instead of drive names and partition numbers in files like
/etc/fstab makes the system more tolerant of changing hardware. GPT labels appear in
/dev/gpt/ when a disk is attached. Other partitioning schemes have different label capabilities, and their labels appear in different directories in
Use a unique label on every filesystem to avoid conflicts from identical labels. A few letters from the computer's name, use, or location can be added to the label. For instance,
rootfs-lab for the UFS root partition on the lab's computer.
For a traditional partition layout where the
/usr directories are separate filesystems on their own partitions, create a GPT partitioning scheme, then create the partitions as shown. Partition sizes shown are typical for a 20G target disk. If more space is available on the target disk, larger swap or
/var partitions may be useful. Labels shown here are prefixed with
ex for “example”, but readers should use other unique label values as described above.
By default, FreeBSD's
gptboot expects the first UFS partition found to be the
|accept the default (remainder of the disk)|
After the custom partitions have been created, selectto continue with the installation.
Committing to the Installation
This is the last chance for aborting the installation to prevent changes to the hard drive.
Select Enter to proceed. If changes need to be made, select to return to the partition editor. will exit the installer without making any changes to the hard drive.and press
Installation time will vary depending on the distributions chosen, installation media, and speed of the computer. There will be a series of messages displayed indicating progress.
Firstly, the installer will write the partitions to the disk, and perform a
newfs to initialise the partitions.
If doing a network install, bsdinstall will then proceed to download the required distribution files.
Next, the integrity of the distribution files is verified, to ensure they have not been corrupted during download or misread from the installation media.
Finally, the verified distribution files are extracted to the disk.
Once all requested distribution files have been extracted, bsdinstall will then drop straight into the post-installation configuration tasks
Configuration of various options follows a successful installation of FreeBSD. An option can be configured by re-entering the configuration options from the final menu before booting into the newly installed FreeBSD system.
root password must be set. Note that while entering the password, the characters being typed are not displayed on the screen. After the password has been entered, it must be entered again. This helps prevent typing errors.
After the password has been successfully entered, the installation will continue.
Configuring Network Interfaces
Network configuration will be skipped if it has already been done as part of a bootonly installation.
A list of all the network interfaces found on the computer is shown next. Select one to be configured.
If a wireless network interface is chosen, wireless identification and security parameters must be entered to allow it to connect to the network.
Wireless networks are identified by a Service Set Identifier, or SSID. The SSID is a short, unique name given to each network.
Most wireless networks encrypt transmitted data to protect information from unauthorized viewing. WPA2 encryption is strongly recommended. Older encryption types, like WEP, offer very little security.
The first step in connecting to a wireless network is to scan for wireless access points.
SSIDs found during the scan are listed, followed by a description of the encryption types available for that network. If the desired SSID does not appear in the list, selectto scan again. If the desired network still does not appear, check for problems with antenna connections or try moving the computer closer to the access point. Rescan after each change is made.
The encryption information for connecting to the selected wireless network is entered after selecting the network. With WPA2, only a password (also known as the Pre-Shared Key, or PSK) is needed. Characters typed into the input box are shown as asterisks for security.
Network configuration continues after selection of the wireless network and entry of the connection information.
Configuring IPv4 Networking
Choose whether IPv4 networking is to be used. This is the most common type of network connection.
There are two methods of IPv4 configuration. DHCP will automatically configure the network interface correctly, and is the preferred method. Static configuration requires manual entry of network information.
Do not enter random network information, as it will not work. Obtain the information shown in Section 2.3.3, “Collect Network Information” from the network administrator or service provider.
IPv4 DHCP Network Configuration
If a DHCP server is available, selectto automatically configure the network interface.
Static configuration of the network interface requires entry of some IPv4 information.
IP Address - The manually-assigned IPv4 address to be assigned to this computer. This address must be unique and not already in use by another piece of equipment on the local network.
Subnet Mask - The subnet mask used for the local network. Typically, this is
Default Router - The IP address of the default router on this network. Usually this is the address of the router or other network equipment that connects the local network to the Internet. Also known as the default gateway.
Configuring IPv6 Networking
IPv6 is a newer method of network configuration. If IPv6 is available and desired, chooseto select it.
IPv6 also has two methods of configuration. SLAAC , or StateLess Address AutoConfiguration, will automatically configure the network interface correctly. Static configuration requires manual entry of network information.
IPv6 Stateless Address Autoconfiguration
SLAAC allows an IPv6 network component to request autoconfiguration information from a local router. See RFC4862 for more information.
Static configuration of the network interface requires entry of the IPv6 configuration information.
IPv6 Address - The manually-assigned IP address to be assigned to this computer. This address must be unique and not already in use by another piece of equipment on the local network.
Default Router - The IPv6 address of the default router on this network. Usually this is the address of the router or other network equipment that connects the local network to the Internet. Also known as the default gateway.\
The Domain Name System (or DNS) Resolver converts hostnames to and from network addresses. If DHCP or SLAAC was used to autoconfigure the network interface, the Resolver Configuration values may already be present. Otherwise, enter the local network's domain name in the Search field. DNS #1 and DNS #2 are the IP addresses for the local DNS servers. At least one DNS server is required.
Setting the time zone for your machine will allow it to automatically correct for any regional time changes and perform other time zone related functions properly.
The example shown is for a machine located in the Eastern time zone of the United States. Your selections will vary according to your geographical location.
Select Enter. If you do not know whether the system uses UTC or local time, select to choose the more commonly-used local time.or according to how the machine's clock is configured and press
The appropriate region is selected using the arrow keys and then pressing Enter.
Select the appropriate country using the arrow keys and press Enter
Select a Time Zone
The appropriate time zone is selected using the arrow keys and pressing Enter.
Confirm the abbreviation for the time zone is correct. If it looks okay, press Enter to continue with the post-installation configuration.
Selecting Services to Enable
Additional system services which will be started at boot can be enabled. All of these services are optional.
sshd - Secure Shell (SSH) daemon for secure remote access.
moused - Provides mouse usage within the system console.
ntpd - Network Time Protocol (NTP) daemon for automatic clock synchronization.
powerd - System power control utility for power control and energy saving.
Enabling Crash Dumps
bsdinstall will prompt if crash dumps should be enabled on the target system. Enabling crash dumps can be very useful in debugging issues with the system, so users are encouraged to enable crash dumps whenever possible. Select to enable crash dumps, or to proceed without crash dumps enabled.
Adding at least one user during the installation allows the system to be used without being logged in as
root. When logged in as
root, there are essentially no limits or protection on what can be done. Logging in as a normal user is safer and more secure.
Selectto add new users.
Enter the information for the user to be added.
Username - The name the user will enter to log in. Typically the first letter of their first name combined with their last name.
Full name - The user's full name.
Uid - User ID. Typically, this is left blank so the system will assign a value.
Login group - The user's group. Typically left blank to accept the default.
Invite user into other groups? - Additional groups to which the user will be added as a member.
Login class - Typically left blank for the default.
Shell - The interactive shell for this user. In the example, csh(1) has been chosen.
Home directory - The user's home directory. The default is usually correct.
Home directory permissions - Permissions on the user's home directory. The default is usually correct.
Use password-based authentication? - Typically "yes".
Use an empty password? - Typically "no".
Use a random password? - Typically "no".
Enter password - The actual password for this user. Characters typed will not show on the screen.
Enter password again - The password must be typed again for verification.
Lock out the account after creation? - Typically "no".
After entering everything, a summary is shown, and the system asks if it is correct. If a mistake was made during entry, enter
no and try again. If everything is correct, enter
yes to create the new user.
If there are more users to add, answer the "Add another user?" question with
no to finish adding users and continue the installation.
After everything has been installed and configured, a final chance is provided to modify settings.
Use this menu to make any changes or do any additional configuration before completing the installation.
After any final configuration is complete, selectto leave the installation.
bsdinstall will prompt if there are any additional configuration that needs to be done before rebooting into the new system. Select to exit to a shell within the new system, or to proceed to the last step of the installation.
If further configuration or special setup is needed, selectingwill boot the install media into Live CD mode.
When the installation is complete, selectto reboot the computer and start the new FreeBSD system. Do not forget to remove the FreeBSD install CD, DVD, or USB memory stick, or the computer may boot from it again.
FreeBSD Booting and Shutdown
As FreeBSD boots, many informational messages are displayed. Most will scroll off the screen; this is normal. After the system finishes booting, a login prompt is displayed. Messages that scrolled off the screen can be reviewed by pressing Scroll-Lock to turn on the scroll-back buffer. The PgUp, PgDn, and arrow keys can be used to scroll back through the messages. Pressing Scroll-Lock again unlocks the display and returns to the normal screen.
login: prompt, enter the username added during the installation,
asample in the example. Avoid logging in as
root except when necessary.
The scroll-back buffer examined above is limited in size, so not all of the messages may have been visible. After logging in, most of them can be seen from the command line by typing
dmesg | less at the prompt. Press q to return to the command line after viewing.
Typical boot messages (version information omitted):
Generating the RSA and DSA keys may take some time on slower machines. This happens only on the initial boot-up of a new installation, and only if sshd is set to start automatically. Subsequent boots will be faster.
FreeBSD does not install graphical environments by default, but many are available.
Proper shutdown of a FreeBSD computer helps protect data and even hardware from damage. Do not just turn off the power. If the user is a member of the
wheel group, become the superuser by typing
su at the command line and entering the
root password. Otherwise, log in as
root and use
shutdown -p now. The system will close down cleanly and turn itself off.
The Ctrl+Alt+Del key combination can be used to reboot the system, but is not recommended during normal operation.