Day 55 of 60: Installing FreeBSD on a Sun Ultra 40

Fetching and installing FreeBSD was relatively painless. I downloaded the ISO image for FreeBSD 6.1 (AMD64 build), and wrote it to a blank CD.

When I reinstalled Solaris some weeks back I made sure to leave some space on the disk for FreeBSD. So then it was a case of booting from the CD.

This was my first time booting FreeBSD AMD64, but the process was reassuringly familiar to that on x86. FreeBSD is considerably more verbose at boot time than Solaris 10 is, being much more like earlier Solaris releases. Personally I find this to be no bad thing, at least as the default option.

It was then that I ran in to a problem -- the keyboard on the machine is USB. It works fine during the boot process, but once the kernel's started it was nonresponsive.



Some quick googling suggested that this is because the BIOS might be pretending that this was a PS/2 keyboard to support legacy operating systems. Lo and behold, I rebooted, went in to the BIOS settings and saw that the USB Control/USB BIOS Legacy Support option was set to Enabled. Toggling that to Disabled and rebooting fixed the problem.

The rest of the installation went smoothly. I gave the unallocated disk space to FreeBSD, assigned 6GB of swap space, and, for the purposes of these tests, used a single filesystem as '/'. Not necessarily the most conventional choice, but I didn't want to fiddle around assigning different partitions, and for a developer workstation it's not necessarily an unsensible choice.

First boot



I know that Solaris uses GRUB as its bootloader, so when I installed FreeBSD I deliberately did not make the FreeBSD slice active, nor did I let the FreeBSD installer install its own bootloader. Consequently, when I rebooted following the FreeBSD install the system defaults to booting Solaris, since it knows nothing of the FreeBSD slice yet.

Adding the following to /boot/grub/menu.lst is enough to get GRUB to boot FreeBSD, and after rebooting I was shown a FreeBSD menu entry, and could use it to boot into FreeBSD.

title FreeBSD
rootnoverify (hd0,2)
chainloader +1


If you care for that sort of thing, the boot log from the first boot is available.

Setting up a working environment



As part of the FreeBSD installation I'd already configured the networking (easy, just use DHCP) and created a user for myself. I'd also installed the FreeBSD ports system, to make it easy to install new software, and had opted to install X.org's X11 implementation.

A quick xorgcfg as root gave me a working /etc/X11/xorg.conf, and upon running startx I was greeted by the traditional default X display -- namely twm, three xterms of varying sizes, a clock in the top right, and a crosshatched background.

It's like greeting an old friend.

Anyway, this was enough to show that things worked, but it's no way to be productive.

First off I installed synergy, so that I could put the Sun keyboard and mouse away and go back to my central keyboard setup.

cd /usr/ports/sysutils/synergy
make install


Job done.

Next up is KDE. Ordinarily I'd compile it by hand, but I'm a little pressed for time, so:

pkg_add -r kde

One of my pet peeves about FreeBSD is the fact that the package installation tools all have an underscore in them. That's at least two extra keystrokes on a UK keyboard.


That went off and downloaded and installed pre-built packages of KDE 3.5.1. A tweak to $HOME/.xinitrc to lauch startkde, and I'm back in an X session that almost feels like home.

The only other adjustment that I make immediately is to set Alt+left mouse button to toggle raise/lower, Alt+middle mouse button to resize windows, and Alt+right mouse button to move windows. It's been a thorn in my side for the last 55 days that the GNOME installation on Solaris does not afford you that degree of control. And frankly, I wasn't looking forward to trying to get KDE working on Solaris.

And with those steps carried out, I'm done. FreeBSD's installed, and a basic environment is now ready for me to use. In fact, I've been writing the last two paragraphs on the Sun workstation under FreeBSD.

So, on to benchmarking compilers and operating systems...

No comments:

Post a Comment