Project

General

Profile

Support #766

Updated by Daniel Curtis almost 9 years ago

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: 
 <pre> 
 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  
 </pre>  

 * Create a new file system on the new UFS partition: 
 <pre> 
 newfs -U /dev/ada0p3 
 </pre> 

 * Mount the UFS partition to the temporary mount directory: 
 <pre> 
 mkdir /tmp/mnt 
 mount /dev/ada0p3 /tmp/mnt 
 </pre> 

 * Extract the base.txz and kernel.txz to the ufs zfs root to install the base system: 
 <pre> 
 cat /usr/freebsd-dist/base.txz | tar --unlink -xpJf - -C /tmp/mnt 
 cat /usr/freebsd-dist/kernel.txz | tar --unlink -xpJf - -C /tmp/mnt 
 </pre>  

 * Add the initial system configuration: 
 <pre> 
 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 
 </pre>  

 * Install the bootcode: 
 <pre> 
 gpart bootcode -b /tmp/mnt/boot/pmbr -p /tmp/mnt/boot/gptboot -i 1 ada0 
 </pre> 

 * Create an /etc/fstab file: 
 <pre> 
 vi /tmp/mnt/etc/fstab 
 </pre> 
 #* And add the following: 
 <pre> 
 /dev/ada0p2      none      swap      sw      0      0 
 /dev/ada0p3      /      ufs      rw      2      2 
 </pre> 

 * Reboot the system and eject the FreeBSD install disc: 
 <pre> 
 reboot 
 </pre> 

 h2. Resources 

 * https://forums.freebsd.org/threads/42773/ 
 * http://www.wonkity.com/~wblock/docs/html/disksetup.html

Back