Project

General

Profile

Support #766

Install FreeBSD With UFS Root The Hard Way

Added by Daniel Curtis over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Installation
Target version:
Start date:
03/03/2016
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:

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
      
  • Reboot the system and eject the FreeBSD install disc:
    reboot
    

Resources

History

#1 Updated by Daniel Curtis over 4 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#2 Updated by Daniel Curtis over 4 years ago

  • Category set to Installation
  • Status changed from Resolved to Closed

Also available in: Atom PDF