View RSS Feed



Rate this Entry
by , 23rd May 2009 at 04:16 PM (9297 Views)
I've been playing around with this for a while. I must say as an OS - I like it! It feels somewhat uncomplicated compared to other *nix's.

Today I'm going for a fresh install of NetBSD 5 and see what I can get out of it. Wish me luck!

The Platform
Nice and simple - VMWare Fusion 2.x (whatever the latest is). 1 Core (from a 2.16Ghz Core Duo) and 768mb Ram. Hard Drive is 15Gb pre allocated.

A word on the hard drive. I've noticed with previous install attempts that NetBSD does not like expanding hard drives so you must pre-allocate the space. The other thing NetBSD doesn't like is Sun's VirtualBox.

Fairly straight forward process. The .iso maps to Fusions virtual CD drive and is auto booting. NetBSD, as with most 'real *nix's' (sorry Linux guys) uses a simple text based installation.

The first choice is the intallation type. I always opt for the 'Custom Installation' Option. I typically chose the following options:

  • Kernel (GENERIC)
  • Base
  • System (/etc)
  • Compiler Tools
  • Online Manual Pages
  • X11 Sets - ALL

The rest is not installed. Anything I need I can grab from the package collection later.

Going through the menus NetBSD detects most things just fine. Drive geometry, use entire disk, etc. Just remember to 'set partitions' rather than 'use default' as the default seems to be no partitions(?). From the 'set partitions' screen I tend to just leave the defaults as displayed and continue the installation.

v5 Installation seems a lot lot quicker than v4. It appears that the developers have combined all the elements of each package (Kernel, System, Base, etc) in to their own single archive (eg. kernel.tgz, system.tgz, etc) rather than have separate archives for each individual program that makes up a given package (gcc.tgz, xorg.tgz, etc).

The result is fewer files to copy from CD to hard drive and fewer files to unpack and thus a much quicker install.

Welcome to NetBSD
That was simple! Login in as root and I get a friendly message suggesting I set up a standard user account and 'su' for root access.

A good suggestion, so lets do it!

useradd -m <username>
passwd <username>
also use 'vi' to edit the '/etc/group' file to give your new user 'su' permissions.
Now we can

and logon as our new standard user.

The next step is to set up your networking. I use DHCP (VMWare Fusion is using a 'bridged' connection) so again this is not to painful.

The first stage is to find the name of your NIC...

ifconfig -a
It appears my NIC is called 'pcn0'.

So it's a simple case of using 'vi' to add a couple of lines to (or create) '/etc/rc.conf'

change 'pcn0' to the name of your NIC

A quick reboot and we have internet!!!

pkgsrc (Package Source) is the NetBSD equivalent to 'ports' on FreeBSD , 'fink' on OSX or 'apt' on Linux. It's our software repository of tested NetBSD *nix apps.

So I need to grab the latest directory tree from CVS which will allow me to easily compile the programs I want to use in my OS.

First set the environment viariables
export CVSROOT=""
export CVS_RSH="ssh"
Next use 'vi' to add the following to '~/.cvsrc'
checkout -P
update -dP
release -d
diff -upN
cvs -q -z3
rdiff -u
and then connect to cvs to get the latest package data

cd /usr
cvs checkout -P pkgsrc
and finally bootstrap...
cd /usr/pkgsrc/bootstrap
Look under '/usr/pkgsrc' and you'll find a large directory tree of various packages you can install. Installation of any program is simply a matter of 'cd'ing to the appropriate directory and running the following commands...

make install
make clean
make clean-depends
pkgsrc take care of all dependencies for you!

For a easy web view of packages you will find within the newly installed pkgsrc directory take a look at

The first package that *must* be installed is 'pico'. 'vi' is a usable text editor, I know the basics to get in and get the job done, but it's not something you want to use long term. It lacks finesse.

'pico' (or 'nano') is an alternative command line text editor to 'vi'. It's much simpler to use on a day to day basis. Think of 'edit' under MS-Dos and your not a million miles away.

'pico' can be found in the following location...

Now a word on licenses. The are numerous licenses running around the open source world and not all are compatible with each other. Because of this pkgsrc makes you explicitly accept any new licenses you encounter before it will agree to install your chosen software.

'pico' requires the 'pine-license'. To accept a license edit the '/etc/mk.conf' file (again with 'vi' - grrr.)

The last thing I want to do this time round is setup X. Usually I'd set up X first and then install my Window Manager of choice. This time I'm doing it the other way round!

Why? Have you seen 'twm'? Even booting into it once to check has set up correctly is more than I can bare! So, I'll install Fluxbox now and when I configure I'll get a lovely GUI immediately - sweet!

Unlike Windows or OS-X (at least officially) X can have any GUI front end your hear desires (and then some). These are called Window Managers. The most popular tend to copy Explorer (Windows) or Finder (OSX) - see Gnome, KDE and Enlightenment. But if you prefer the look and feel of the Amiga, GEM (early Mac/Atari ST), BeOS or Arthur (Acorn) then you can have that look and feel.

Fluxbox is a very, very basic Window Manager. No desktop icons or menu bars. There's a small bar for running apps and a 'start menu' you access by right-clicking anywhere on the desktop. It's fast and it's simple, and that's what I like. I can add my own file manager and/or icon manager later (if I so desire).

Fluxbox can be found here...
Finally set fluxbox to start with X...(
 echo "exec startfluxbox" > ~/.xinitrc
Finally, it's time to start up X. Before I get going a small gripe if you will. I liked XFree86! With release v5 NetBSD have jumped on the band wagon with everyone else. It's a shame, I actually knew where I was with XFree86 and find harder to configure.

Not fair, it's probably more the combination of NetBSD and VMWare that causes the 'difficulties' otherwhys is supposed to configure itself, Oh-hum.

Okay, as you might have gathered. Do not blindly run 'startx' or get to completely configure itself. Atleast not under VMWare as it doesn't work.

First job is to create a '' file in your home directory. This is done by...
Xorg -configure
Next job is to edit that file and set up to run properly...
pico ~/
Yay - 'pico'

Add [CTRL]-[ALT]-[BACKSPACE] support to dump out of X if something is wrong...
Section "Server Layout"
    Option "DontZap" "Off"
and replace the entire screen section...
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport  0 0
                Depth     24
                Modes     "1024x768"
cp xorg.conf
and you will see...(attached image)...

Well that's it for this time. It was a long one! Next time I pick up NetBSD (whenever that may be) I'll be looking at some important apps - pcmanfm, wbar (or another desktop icon manager), Opera (or maybe Chrome?) and eventually OpenOffice, Wine + iTunes?
Attached Thumbnails Attached Thumbnails blogs/tmcd35/attachments/6714-netbsd-fluxbox.jpg  

Updated 25th May 2009 at 05:13 PM by tmcd35



  1. powdarrmonkey's Avatar
    Strictly speaking, apt is only the package system on Debian-type distributions. Redhat has rpm, gentoo has portage, etc.
  2. localzuk's Avatar
    Hmmm... So NetBSD doesn't go for 'ease of use' then
  3. epsicot's Avatar
    Just can't type '@'


Total Trackbacks 0
Trackback URL: