Wednesday, December 17, 2008

Tip: Updating FreeBSD with freebsd-update with full filesystem

My old 266 Mhz Celeron (soon to be replaced my an ASUS I220GC motherboard with integrated Celern 220 CPU) is installed on a 4GB HDD which leaves about 297Mb for the /var filesytem.

freebsd-update, the base tool to perform binary system updates, uses by default the /var filesystem. While updating to the recent FreeBSD 7.1-RC1 I couldn't finish the update due to a full filesystem.

Here's how solve the issue and fully update the system:
  • % su
  • # freebsd-update -d /path/to/big/path/directory/ upgrade -r 7.1-RC1
  • # freebsd-update -d /path/to/big/path/directory/ install
  • # shutdown -r now
  • # freebsd-update -d /path/to/big/path/directory/ install
  • # shutdown -r now
In other words, simply use freebsd-update's -d option. man freebsd-update and http://lists.freebsd.org/pipermail/freebsd-stable/2008-December/047014.html for more info.

Happy updating ;)

Tip: Fix freebsd-update problems

I tried to update my desktop from FreeBSD 7.1-PRERELEASE to 7.1-RC1 however I came across an error along the lines of "No mirrors remaining, giving up" .

Here's how to fix the issue:

% su
# env UNAME_r=7.1-PRERELEASE freebsd-update upgrade -r 7.1-RC1

Substitute the current and target versions according to you particular system and you should be able to update the system as usual.

Friday, December 5, 2008

Tip: Enable sound on Enemy Territory under FreeBSD

Enemy Territory is available in FreeBSD's ports system under /usr/ports/games/linux-enemyterritory. The port's Makefile makes no mention that if you install the game and run it you'll be playing without sound.
Here's a quick tip on how to enable sound on Enemy Territory under FreeBSD 7.0:
  1. % su
  2. # sysctl hw.snd.compat_linux_mmap=1
  3. # echo "hw.snd.compat_linux_mmap=1" >> /etc/sysctl.conf
  4. # exit
Step 2 enables sound immediately and with step 3 sound will be enabled at boot time.
And that's it. Now hurry and go play the world great first-person shoot ever.
d^.^b