Sunday, August 12, 2007

FreeBSD Tip: beastie boot menu

After installing FreeBSD 5.5 I like to change the beastie in the boot menu to colour instead of white. I think this adds a nice touch to the boot, plus it is really easy to do.

To add a splash of colour to beastie type the following:
# echo 'loader_color="YES"' >> /boot/loader.conf

By default the delay, before autobooting is 10 seconds. You can change this by adding the following:
# echo 'autoboot_delay="n"' >> /boot/loader.conf
Where "n" is the number of seconds before autobooting.

Note: you can set the autoboot to -1; if you don't want user to be allowed to interrupt autoboot process and escape to the loader prompt.

If you don't like the beastie menu you can disable it like this:
# echo 'beastie_disable="YES"' >> /boot/loader.conf

Have fun :)

Friday, August 10, 2007


Our network has been down for the past few days, therefore no Internet.
I'm not 100% sure exactly what the problem was. It seems that it was partly our ISP's DNS server, partly a dodgy phone line, and partly an operating system which kept changing my settings back to it's settings (it knew what I "really" wanted :s).

Also as a separate issue; our firewall's hardware is dying.
I don't know what I'm going to do with it, I guess I'll have to find the money to buy another computer. That should be fun, what with the thousands of dollars we have coming in right now... (not)

I hate being offline, I forget how hooked I am till I can't get out...
I think at times we rely to much on technology. It kinda makes me wonder what we did before computers, before plastic...

Gee I feel cynical and sarcastic tonight, it must be all the fun I've been having...
Life what an interesting little mind fuck... ;)

Thursday, August 02, 2007

Zero Comes First

When I'm flicking through terminals (ttys), I find it frustrating that the keys start with the number 1 (F1), and not 0.
I use a simple trick remind myself where they are.

1. First I get some self adhesive labels, you can buy them from most newsagents.
2. Then I write out the numbers 0-9 and a-b, fairly neatly and about 5mm x 5mm big. (You could always print them out if you want them to be neater).
3. Cut them out, like in the image to the right.
4. Now place them on the keys.

Done, now next time you need to go to tty4 you can press F5 with out even thinking about it.

Adding OpenBSD to Grub

I added OpenBSD to my GRUB menu.lst config file today. After a bit of messing around, it still didn't boot. So I did a Google search and came across this file: GRUB's menu.lst config file, with examples for various OSes.

This file details where I was going wrong, and how to boot OpenBSD using GRUB. I have placed the relative information here for future reference:
# The OpenBSD section of the menu.lst config file, for GRUB.
## You would like to use:
# root (hd1,1,a)
# kernel --type=openbsd /bsd
# But OpenBSD passes bios & kernel parameters with its own bootloader,
# the first stage of which is installed in the partition boot record,
# and in turn calls /boot, which in turn loads kernel /bsd. So just
# use the GRUB chainloader instead:
## OpenBSD
title OpenBSD
root (hd1,1)
chainloader +1

Wednesday, August 01, 2007

OpenBSD: From Release to Stable

Upon installing OpenBSD I like to update it from a release to a stable, which gives me all of the security patches since the release.
There are a number of ways of updating, yet I personally like to rebuild the system from source. That way I don't have to go through each patch and apply it. For more information please see: Building the System from Source

There are a number of different "flavours" of OpenBSD:

  • -release -- The version which is released on CD every 6 months
  • -stable -- Release plus security patches
  • -current -- The development branch
There are three steps we need to take to update the system:
  1. Download the latest Source code
  2. Compiling and installing a GENERIC kernel
  3. Rebuilding the system
Download the latest Source code
There are a number of ways to get the latest source, yet I use cvs.
First I need to find a anoncvs mirror: Available Anonymous CVS Servers
Once I've decided on a server I export the mirror path to CVSROOT and download the source, e.g.:
# export
# cd /usr; cvs checkout -P -rOPENBSD_4_1 src

Note: the CVSROOT variable will not be kept after next boot. To keep this setting add it to your /root/.profile file, e.g.:
# vi /root/.profile

Compiling and installing a GENERIC kernel
First backing up current kernel
# cp /bsd /bsd.old

Then configure the kernel
# cd /usr/src/sys/arch/i386/conf
# config GENERIC

Now Compile and Install the new Kernel
# cd /usr/src/sys/arch/i386/compile/GENERIC
# make clean && make depend && make && make install

Lastly reboot and test the new kernel
# reboot

Rebuilding the system
Now I just rebuild the system:
# rm -rf /usr/obj/*
# cd /usr/src; make obj
# cd /usr/src; make build

Now reboot
# reboot
When I first log back in the first thing I notice that my system name now says OpenBSD4.1-stable.

Now I have a stable system with all of the important security updates on it.