|
|
### Install FreeBSD
|
|
|
|
|
|
**NOTE:** Before proceeding, ensure that the machine you will use as your ops server is properly connected to your network and that all of the required software is available either through the network or some other media.
|
|
|
|
|
|
Boot the FreeBSD installation CD on the machine you will use as your `ops` server. You will want to do an "Install" and then select your keymap and hostname. When it asks about optional components, only select "lib32" and "src", you do not want "ports" since you will be loading pre-built packages from Emulab.
|
|
|
|
|
|
Next it will ask you about disk partitioning. There are a variety of ways to partition disk space depending on how many disks the server has and whether you might want to enforce space quotas. For now, just create a single partition in which to install the base system, other partitions will be created as needed later.
|
|
|
|
|
|
From the menu choose "Auto (UFS)", and then "Entire Disk", confirm erasing the disk and then choose either MBR or GPT. If your disk is over 2TB, select GPT. At this point it will want you to review the partitioning. You will need to shrink the "/" partition to a smaller size. Move down to the entry with mountpoint "/" (probably "ada0s1a") and choose "Modify".
|
|
|
From the menu choose "Auto (UFS)", and then "Entire Disk", confirm erasing the disk and then choose either MBR or GPT. If your disk is over 2TB and the server BIOS supports UEFI boot, select GPT. Otherwise it is probably easiest to stick with MBR and a "legacy boot" BIOS setting. At this point it will want you to review the partitioning. If you are dedicating the entire disk to the OS, then just select "Finish". If you are using a single disk for everything, then you will need to manually modify the partition layout. Unfortunately, doing this requires you "Delete" the existing "freebsd-ufs" and "freebsd-swap" partitions and "Create" new ones. The "freebsd-ufs" partition should be at least 50GB and should have a mountpoint of "/". The swap partition you can make 16GB or smaller. Once this is done select "Finish".
|
|
|
|
|
|
Now it will prompt you to "Commit" the changes. After doing so, it will begin the install.
|
|
|
Near the end of the installation, you will be asked if you wish to install or configure several optional items. Apart from setting the root password, configuring your network devices, configuring DNS, setting your time and time zone, and enabling SSH logins (if desired), you should skip additional configuration.
|
|
|
|
|
|
Do **not** create any user accounts yet, and just log in as root for the time being. Our software will create user accounts later, once you get boss set up correctly. If you already created any users, delete them with the "pw" command and make sure their home directories are removed as well!
|
|
|
|
|
|
After exiting the sysinstall tool and rebooting, you should login as root and run freebsd-update to pick up security patches:
|
|
|
```
|
|
|
freebsd-update fetch
|
|
|
freebsd-update install
|
|
|
```
|
|
|
|
|
|
### Create Emulab Filesystems
|
|
|
|
|
|
An Emulab install has several directory hierarchies that it uses:
|
|
|
Now you need to create the Emulab-required directory hierarchies, which are:
|
|
|
|
|
|
* **/usr/testbed/** Space for testbed software and logs. 10-50GB should be enough.
|
|
|
|
... | ... | @@ -20,39 +35,51 @@ An Emulab install has several directory hierarchies that it uses: |
|
|
|
|
|
Often `/users`, `/proj`, and `/groups` are just subdirectories on the same filesystem. This allows you to avoid decisions about how much space to put where. Just put all remaining space in one filesystem and use it for all three.
|
|
|
|
|
|
However, you may want to enforce quotas on them. This is the main reason you'd want to keep them in separate filesystems (i.e., so one user can have different `/users` and `/proj` quotas). If you do not think you will ever use quotas in this way, then you should just put all three in one filesystem.
|
|
|
In fact, the only reasons you might want to make them separate filesystems would be to prevent one of the hierarchies from filling up the entire disk or if you want to enforce distinct quotas for a user in the `users` and `proj` filesystems.
|
|
|
|
|
|
Note that since `/share` is exported read-only, FreeBSD requires that it be on a separate filesystem from anything that is exported read-write. So while `/users, /proj` and `/groups` can be on the same filesystem, `/share` cannot.
|
|
|
|
|
|
When it asks about partitioning the disk, choose "Auto (UFS)". It will
|
|
|
identify all the disks on the machine and ask which you want to install
|
|
|
FreeBSD on. Select the first disk and "Entire Disk". Proceed with the remainder
|
|
|
of the install.
|
|
|
#### Using UFS
|
|
|
|
|
|
The traditional UFS filesystem is best used with a single redundant underlying volume, either
|
|
|
a hardware RAID provided volume, or a virtual disk provided by the VM host. While you can use `gvinum` or `graid` to implement RAID or interact with a software RAID controller, it is recommended that you use ZFS instead (below) if you need to build a multi-disk redundant configuration.
|
|
|
|
|
|
Make sure that no matter how you decide to partition things up, you make symbolic links to the appropriate places. For example, if you make one big filesystem called `/z` that has `/users, /proj,` and `/groups` in it, make sure you:
|
|
|
|
|
|
Here is an example of configuring separate partitions and filesystems for `/usr/testbed`, `/share`, and a `/z` for the remaining directory hierarchies:
|
|
|
```
|
|
|
# 50G for /usr/testbed
|
|
|
gpart add -t freebsd-ufs -s 50G ada0s1
|
|
|
# 10G for /share
|
|
|
gpart add -t freebsd-ufs -s 10G ada0s1
|
|
|
# the rest for /z (/users, /proj, /groups)
|
|
|
gpart add -t freebsd-ufs ada0s1
|
|
|
|
|
|
# create the filesystems and mountpoints
|
|
|
newfs -n -j /dev/ada0s1d
|
|
|
mkdir /usr/testbed
|
|
|
newfs -n -j /dev/ada0s1e
|
|
|
mkdir /share
|
|
|
newfs -n -j /dev/ada0s1f
|
|
|
mkdir /z
|
|
|
|
|
|
# add to fstab and mount
|
|
|
echo '/dev/ada0s1d /usr/testbed ufs rw 1 2' >> /etc/fstab
|
|
|
mount /usr/testbed
|
|
|
echo '/dev/ada0s1e /share ufs rw 1 3' >> /etc/fstab
|
|
|
mount /share
|
|
|
echo '/dev/ada0s1f /z ufs rw 1 4' >> /etc/fstab
|
|
|
mount /z
|
|
|
|
|
|
# make sure /users, /proj, and /groups exist
|
|
|
mkdir /z/users /z/proj /z/groups
|
|
|
ln -s /z/users /users
|
|
|
ln -s /z/proj /proj
|
|
|
ln -s /z/groups /groups
|
|
|
...
|
|
|
```
|
|
|
If you wanted distinct filesystems for each of `/users`, `/proj`, and `/groups`, then instead of the commands to create `/z`, you would have analogous commands for those three filesystems. You would obviously not need to create the symlinks as shown in the last command group.
|
|
|
|
|
|
In other words, we assume the existence of `/users, proj,` and `/share`.
|
|
|
|
|
|
When prompted, continue by selecting the 'Developer' distribution set - this will install full sources. When it asks if you want to install the ports collection, answer **no**. Do not install any packages at this time. You will get a chance to do so later.
|
|
|
|
|
|
Near the end of the installation, you will be asked if you wish to install or configure several optional items. Apart from setting the hostname, configuring your network devices, enabling SSH logins (if desired), and setting your time zone and root password, you should skip additional configuration.
|
|
|
#### Using ZFS
|
|
|
|
|
|
Do **not** create any user accounts yet, and just log in as root for the time being. Our software will create user accounts later, once you get boss set up correctly. If you already created any users, delete them with the "pw" command and make sure their home directories are removed as well!
|
|
|
|
|
|
After exiting the sysinstall tool and rebooting, you should login as root and run freebsd-update to pick up security patches:
|
|
|
|
|
|
```
|
|
|
freebsd-update fetch
|
|
|
freebsd-update install
|
|
|
```
|
|
|
TBD.
|
|
|
|
|
|
* [Prev](install/Creating the Definitions File)
|
|
|
* [Next](install/Installing Emulab on ops)
|
... | ... | |