I won’t be able to use parallel tools – so no cutting and pasting between the native Mac desktop and the virtual machine, and no Juniper Pulse Client is available I can see, so I wouldn’t be able to install FreeBSD on a laptop and use it for work. However, it is a fascinating operating system to work with and offers a very responsive GNOME desktop.
So I am downloading my FreeBSD AMD64 12 Stable ISO
So first gotcha – won’t boot from the ISO:
I have to to say that is a hilarious first gotcha. So this is a setting to make in Parallels under the boot options. It perhaps default to BIOS rather UEFI, the FreeBSD install iso must be EFI?
vm.bios.efi = 1
Boot from the EFI DVD/CDROM:
FreeBSD is pretty unique these days. It’s retro. You will end up compiling software and the kernel. You will get bogged down in places you didn’t know existed.
There is a English macbook keyboard we can select – so thats good!
We could have booted using a nework iso which would have given us a very up-to-date /usr/ports and /usr/src directory. It’s from these that we compile our software.
FreeBSD is at the heart of alot of appliances these days. It’s robust, fast and tunable with a very open license. It’s behind the Sophos Email Appliance and Juniper and Netapp appliances.
I’m just going to use the default Auto UFS GPT partition scheme.
You can’t just have a go at FreeBSD. You actually do need to read the Handbook Am just saying. Which to be honest I haven’t done in a while.
I gave it more memory 1GB and more video memory – as its going to be busy for a while. Make sure it boots off the disk and not the live CD (common Parallels gotchas).
You can put binary packages on using pkg. And you can compile them in /usr/ports and install them. I will install two packages to get us aquainted.
# <strong>pkg install screen</strong>
To update these packages later:
<strong># pkg upgrade</strong>
To check for vulnerabilities in binary packages:
<strong># pkg audit -F</strong>
Straight away I can kick off an xterm – I use on macOS the X Windows Server (XQuartz).
<strong># ssh </strong>10.211.55.16 -X -Y
<strong># xterm &</strong>
The quickest way of getting a desktop on the default console is now to use xfce:
<strong>pkg install Xorg xfce</strong>
<strong>echo "exec startxfce4" >> ~/.xinitrc</strong>
<strong>pw groupmod video -m root</strong>
<strong>startx</strong>
Actually on the FreeBSD 12.2 RELEASE I also had to change the designation of the video card from modesetting to “vesa”:
<strong>Xorg -config</strong>
<strong>cp /root/xorg.conf.new /usr/local/etc/X11/xorg.conf.d/
sed -i -e 's/modesetting/vesa/' /usr/local/etc/X11/xorg.conf.d/xorg.conf</strong>
To run that as a standard user – the user has to be in group video or wheel.
And for the better Gnome Environment, more work to be done, add to rc.conf:
sysrc gnome_enable="YES" moused_enable=YES \ dbus_enable="YES" hald_enable="YES" gdm_enable="YES"
Append to /etc/fstab
<strong>echo "proc /proc procfs rw 0 0</strong>" <strong>>> /etc/fstab</strong>
Install the binary pkg’s required
<strong>pkg install gnome-desktop gdm gnome3</strong>
You might want to make sure the RAM assigned is 2GB perhaps and the Graphics card maybe 512MB RAM. I also have option on startup to “5” the Console to “Video”.
Up until now I have used just packages, and for what I’m doing, am happy with that. But this is FreeBSD so I’m going to make notes for using /usr/ports and /usr/src.
To update /usr/ports with portsnap
# portsnap fetch # portssnap extract # portssnap update
And now to update /usr/src using svn. I’m going to compile subversion from /usr/ports (we could have used pkg ).
#
cd /usr/ports/security/ca_root_nss
#
make install clean
#
cd /usr/ports/devel/subversion
#
make install clean
BATCH=yes
We could use subverson to bring in the whole thing:
# <strong>svn checkout https://svn.freebsd.org/stable/12 /usr/src</strong>
But now and in the future we can update like so:
#
cd /usr/src
&& make update SVN_UPDATE=yes
Lets install a kernel
<strong># cd /usr/src/sys/amd64/conf
# mkdir /root/kernels
# cp GENERIC /root/kernels/MYKERNEL
# ln -s /root/kernels/MYKERNEL</strong>
Edit MYKERNEL and edit the ident line for now.
<strong># cd /usr/src
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL</strong>
<strong># shutdown -r now</strong>
On getting Juniper VPN to work I can use the underlying Macos connection when using Parallels – “Shared Network” . So technically this can be used as a desktop – no cut-and-paste between and no directory/file sharing with macOS.
The instructions for running FreeBSD on Parallels include to put the line
<strong>kern.hz=100</strong>
into /boot/loader.conf to reduce cpu utilization (and reboot).