Support #766
Install FreeBSD With UFS Root The Hard Way
Description
This is a guide on how I manually setup FreeBSD with a UFS root, without the help of a GUI or bsdinstall. This guide is intended to install FreeBSD using the installation DVD and will work offline.
- When the FreeBSD Installer Welcome message appears, choose Shell.
- Create the slices:
gpart create -s gpt ada0 gpart add -b 40 -s 512K -l gpboot -t freebsd-boot ada0 gpart add -s 4G -t freebsd-swap -a 1M -l swap0 ada0 gpart add -t freebsd-ufs -a 1M -l disk0 ada0
- Create a new file system on the new UFS partition:
newfs -U /dev/ada0p3
- Mount the UFS partition to the temporary mount directory:
mkdir /tmp/mnt mount /dev/ada0p3 /tmp/mnt
- Extract the base.txz and kernel.txz to the ufs root to install the base system:
cat /usr/freebsd-dist/base.txz | tar --unlink -xpJf - -C /tmp/mnt cat /usr/freebsd-dist/kernel.txz | tar --unlink -xpJf - -C /tmp/mnt
- Add the initial system configuration:
echo 'if_em_load="YES"' >> /tmp/mnt/boot/loader.conf echo 'sshd_enable="YES"' >> /tmp/mnt/etc/rc.conf echo 'ifconfig_em0="inet 192.168.10.70 netmask 255.255.255.0 broadcast 198.100.10.255"' >> /tmp/mnt/etc/rc.conf echo 'defaultrouter="192.168.10.1"' >> /tmp/mnt/etc/rc.conf echo 'hostname="freebsd.example.com"' >> /tmp/mnt/etc/rc.conf echo 'nameserver 192.168.10.1' >> /tmp/mnt/etc/resolv.conf
- Install the bootcode:
gpart bootcode -b /tmp/mnt/boot/pmbr -p /tmp/mnt/boot/gptboot -i 1 ada0
- Create an /etc/fstab file:
vi /tmp/mnt/etc/fstab
- And add the following:
/dev/ada0p2 none swap sw 0 0 /dev/ada0p3 / ufs rw 2 2
- And add the following:
- Reboot the system and eject the FreeBSD install disc:
reboot