Home arrow Guides arrow Installing FreeBSD from Rescue (variant 2)
Installing FreeBSD from Rescue (variant 2) PDF
Saturday, 04 February 2012
[ This tutorial is work in progress. Came back later... ]

This is another approach at installing FreeBSD from Rescue using partition style used by default FreeBSD 9.x installation.

That means we'll have only three partitions:

  freebsd-boot (size 64K)
  freebsd-ufs (size rest of hard drive - 4G) - /  (root partition)
  freebsd-swap (size 4G)

We will use a single partition instead of separate partitions for /, /var, /tmp and /usr. This partition will be of type journaled, soft-updates.

Let's asume our hard drive on our machine is /dev/ad4, and the drive is blank.

We will first add support for GPT to the drive:

  gpart create -s GPT ad4

If your hard drive has already partitions you must delete them first. If you want to know more about this topic read our gpart Quick Guide.

Then we will create three partitions for FreeBSD install process:

  gpart add -s 64K -t freebsd-boot ad4
  gpart add -s 2750G -t freebsd-ufs -l root ad4       # drive size is 3TB (2.78 TB in fact)
  gpart add -s 32G -t freebsd-swap ad4                   # you might want this to be way smaller

Our partition scheme look like this (gpart show -l ad3 will display partition label instead of partition type):

partition scheme example
root@rescue ~]# gpart show ad4
=>        34  5860533101  ad4  GPT  (2.7T)
          34         128    1  freebsd-boot  (64K)
         162  5767168000    2  freebsd-ufs  (2.7T)
  5767168162    67108864    3  freebsd-swap  (32G)
  5834277026    26256109       - free -  (13G)

In real world you might want swap partition to be smaller and to not waste disk space (notice we still have 13G free).

Now we will add boot code to our boot partition:

  gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad4

Previous command might differ, depending on where you have pmbr and gptboot files on your rescue system:

  gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 ad4

Now we will format our root partition:

  newfs -U /dev/ad4p2      # if your rescue is on FreeBSD 8.x
  newfs -U -j /dev/ad4p2   # if your rescue is on FreeBSD 9.x

We will now mount the partition:

  mount /dev/ad4p2 /mnt

Now we run sysinstall:

  sysinstall

We go to Custom menu -> Options, press space and then we use /mnt for Install Root option. Then press q to exist Options menu.
Then we go to Distributions menu and we choose Minimal and then Exit. Press Commit to start the installation.

After the installation is finished, we exit sysinstall and then we will have to:

Create /etc/rc.conf file:

Create /etc/fstab file:

Create /etc/resolv.conf file:

Add user and set password for user account and for root:

Last Updated ( Saturday, 04 February 2012 )
 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?