Ok, so here it goes, I am following this guide: http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition I am going to improve upon it and try to make it newbie proof and not skip steps in my guide when this guide skips steps. Why am I making it newbie proof? I don’t know, you would think if you are doing ZFS you aren’t a newbie, but who knows. Better safe than sorry.

Steps for How to install FreeBSD 8.0 using only ZFS partitions?Step 1. Creating a bootable ZFS Filesystem

Download the FreeBSD 8 DVD ISO from here: http://www.freebsd.org/where.html Ok, so this isn’t exactly a download link, but it takes you to where you choose your architecture. Click on the [ISO] link next to your Architecture type. If you are a newbie and don’t know your architecture, you probably want i386. If you just bought a new 64 bit machine then you want amd64. Ok, so the actually link you want is the one that looks as follows: For amd64 – 8.0-RELEASE-amd64-dvd1.iso.gz For i386 – 8.0-RELEASE-i386-dvd1.iso.gz

Extract it as it is zipped.

Burn the ISO to DVD disk (or if you are using VMWare just point your VM’s CD-ROM at the ISO).

Boot off the FreeBSD 8 DVD and let it boot all the way up.

Choose your country/region. You should now be at the Sysinstall Main Menu. Remember, we cannot use Sysinstall because it doesn’t yet support ZFS. (I am hoping for a new installer over fixing this old one.)

Choose Fixit. You will be promted to Please choose a fixit option.

Choose CDROM/DVD. You are now at a Fixit command prompt. And if you are following the wiki guide, you are only at that guide’s step 3. Create MBR disk

Create an MBR disk by running the following command:

gpart create -s mbr ad0

However, what the guide assumes you already know is that ad0 is the name of your hard drive and can be different for each installation. I am installing on VMWare using SCSI and the name of my hard drive is da0. So I would run:

gpart create -s mbr da0

You can find out your by looking at a directory listing of /dev if you are familiar with common names, otherwise, you can start a Standard install and see what name is used when you get to the Disk label editor section of the install.

I am going to use da0 or ad0 in the rest of my document interchangeably, so you need to remember to always use the correct disk name for your drive.

Run the following command to show the information for your disk

gpart show ad0

There are two columns of numbers. The first column number is a start block for the slice and the second is the size in blocks for the slice. 63 is the start of every first slice. However, the end of a slice is variable depending on the size of your hard drive.

A slice is not exactly a partition. On FreeBSD you first create a Slice and then you create your partitions on your slice. The next steps will show you have to do both.

Create a new Slice using the entire disk.

Obviously the guy who wrote the wiki I am following already had two slices for windows, so he must have been dual booting. I am assuming that you are not dual booting and that you are installing a new server and you plan to use the entire disk.

To create a slice using the entire disk, run this command replacing the value after the -s with the value you saw when you ran the previous command.

gpart add -b 63 -s 104857515 -t freebsd da0

It will output something like “da0s1 added”. If you look at the da0s1 string, it makes sense. da0 (your disk name) s1 (slice 1 – the slice you just created).

Now lets create our slice. No, I am not sure why you have to both add the slice and create the slice, but I am sure there is a good reason.

gpart create -s BSD da0s1

Lets make our slice the active slice. Sounds like this is only sometimes needed. Better to do it and not need it than to not do it an find out you need it.

gpart set -a active -i 1 da0

You can run the gpart show da0 command again to make sure it is set as active.

Look at the slice.

gpart show da0s1

Again, you will have two rows of numbers. This time the first number is 0 and the second number is the size of the slice.

We want at least two partitions, one for / and one as a swap partition. So we need to determine how much space we want for the swap partition. I want 3 GB.

My intention is to make a more thorough and newbie proof version of this wiki. So here we go, diving into step 2.

Create the ZFS hierarchy.

Wow, this is going to be a lot of tedious typing. You know, while FreeBSD didn’t make an installer for all this, how hard would it have been to create a couple of scripts and include them on the CD so this would be easier.

Warning! There is only one line that might catch a newbie off-guard. Every other line you can type in as is but this one.

echo ‘ifconfig_em0=”DHCP”‘ >> /etc/rc.conf

On FreeBSD this is how you setup your network card to use FreeBSD. However, while my card is em0, not all cards are em0. Run the ifconfig command on FreeBSD to see your card type and replace em0 with the type for you card.

Step 3 – Finish

I followed the guide almost exactly except I had to do a cd / before unmounting. So I added that command where it needs to be, so this should be very newbie proof.

My other blogs

Entries (RSS) and Comments (RSS). Copyright ® Rhyous.com Linking to content on this site is allowed without permission and as many as ten lines of any article can be used along with such link. Any other use of the content is allowed only by permission of Rhyous.com.