FreeBSD Challenge: Day 08 of 30
The morning rapport
Today I wanted to focus on getting a few things done for future test purposes. If you are using a Virtual Machine hypervisor, it is paramount to take snapshots if you wish to revert backwards for any issues. Me, like a great scholar again, did not take a snapshot and had a few issues that I really wished I had avoided. So, in order to do this, I removed my existing Installation of FreeBSD x64, and reinstalled, aiming to capture a “base install” which is always a great idea for a starting snapshot of course.
Problem was, for me, a few things were not working quite right, even having followed the Wiki for VirtualBox. When installing things, it is not always apparent what is going on until you read things again and try different scenarios. In my previous installation a default ‘Xorg -confugre’, vesa video drivers, Xorg, and gnome2 worked fantastically. This time around however, it did not work so well. I did try my hand at installing xfce4, but I had a few issues with compiling the port, and even using the “xfce” pkgng package. Later today I am going to give that a shot again.
A solid guide to a FreeBSD Guest VirtualBox
I wanted to detail what went well for me in getting FreeBSD x64 fully working under VirtualBox, so it can hopefully help a few other folks out. I will give a few screens to illustrate the settings, and then go on to detail what I had to change in FreeBSD x64 itself.
First, you will want to head into your virtual machines settings > General. Ensure you are using the “FreeBSD (64bit)” version if applicable, not the “FreeBSD” version, as suggested if you accepted the default version when setting up your VM the first time.
Next, into Settings > System. Here we will want to modify the Chipset to match “PIIX3” with our pointing device as “PS/2 Mouse.” In the Processor tab, increasing the CPU beyond 1 will help you if you plan on doing a lot of ports compiling rather than binary pacakges. On the acceleration tab, Ensure Enabled VT-x/AMD-V, and Nested Paging is on.
Settings > Display > No need to change
Settings > Storage. Be sure to change you IDE controller type to “PIIX4”, and ensure “Use Host I/O Cache” is turned on as such:
Settings > Audio > nothing here of note
Settings > Network > nothing necessary to change. Should be defaulted to NAT
Settings > Serial Ports > nothing of note here
Settings > USB > nothing necessary to change unless needed.
Settings > Shared Folders > nothing necessary to change unless needed.
Setting up FreeBSD x64 for VirtualBox guest usage
Now, to setup FreeBSD x64 as a guest virtual machine on your system. There are a few key areas I had to configure. Install the needed package with the following command below. You don not need the entire virtualbox-ose package, just the virtualbox-ose-additions for this portion.
Using the ports system
# cd /usr/ports/emulators/virtualbox-ose-additions && make install clean
Or, using the binary package:
pkg install virtualbox-ose-additions
Either should work fine, and I tested on both. Next, you will want to ensure /etc/rc.conf contains the following:
In my particular case, I had trouble getting the video resolution fully scalable with a default ‘Xorg -configure’ command. If, in your case, this does not work, make sure to add/alter your /etc/X11/xorg.conf file to contain the following:
Section "Device" ### Available Driver options are:- ### Values: <i>: integer, <f>: float, <bool>: "True"/"False", ### <string>: "String", <freq>: "<f> Hz/kHz/MHz" ### [arg]: arg optional Identifier "Card0" Driver "vboxvideo" VendorName "InnoTek Systemberatung GmbH" BoardName "VirtualBox Graphics Adapter" BusID "PCI:0:2:0" EndSection
And add the following line to the same file above, if you wish to have virtualbox control the mouse driver as well. For me, I had no isssue with this:
Section "InputDevice" Identifier "Mouse0" Driver "vboxmouse" EndSection
My goal today was to get a stable snapshot of the base system, and then with a full set of programs on it, which was very successful today, given the snow storm today. With other things to attend to tonight, you know…things responsible “adults” do, that will be all for today. I will edit this post if I did in fact miss anything.
Up for tomorrow? I want to focus on drilling down the handbook and choosing a few more topics over the next few days, any pitfalls, highlights, and whatever else I can find before doing anything too complicated here.
Than you for reading,