NetBSD Part 1

So with all the years of FreeBSD and Linux would I play with NetBSD?? Pretty simple explanation. I have an OLD Cobalt Cube2 mips station that I want to revive for fun. No real valid reason OTHER than I want to say I did. The machine seems to NOT have a working OS on it anymore, so I have very few options when it comes to O/S to put on it. NetBSD being the only viable one I know. NetBSD has always had the motto "of course it will run NetBSD!" and they mean it. So here I am going to document my journey into NetBSD for the first real time of using it. Wish me luck!

Downloaded the img file of the latest NetBSD version (9.3 for me now) and burned it to a flash drive. I have an old HP Pavillion All-in-one computer with an old AMD Athalon X2 in it. Perfect. Test machine picked. On the install I picked all the basics, told it to use the entire drive, told it to set default partitions, etc. The last screen I did tell it to setup the network and to start xdm for me, This allowing me to have a network at boot time and to have it boot to Xwindows for me. Xdm is very plain display manager, no options, just name and password and log in. No place to choose what window manager to run. You get CTWM as your window manager in your first login. Very, very old school WM. Below is a pick of CTWM as it is booted.

First thing was figuring out how to install packages. Debian is apt, FreeBSD is pkg, but NetBSD is pkg_add then use that to install pkgin and that will install the precompiled packages. I had to figure out how to set that up. Googling I found a couple of different writeups, but had to tweak them all to get them to work. First thing is, you have to tell NetBSD where to get packages. This is accomplished by exporting a variable called PKG_PATH. Below is what worked for me. Adjust to suite your setup.

export PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.3/All/
Obviously you can open that site in your browser to check. Change the amd64 and the 9.3 to match what you are doing. Once that took and I could type "echo $PKG_PATH" and it spit back out what I put in, then I ran;
# pkg_add -v pkgin
With this in place pkgin search allows you to search packages and pkgin install PKGNAME ( or pkgin in PKGNAME ) will install packages. So I ran "# pkgin in i3" and got i3wm. "# pkgin in vim" to get vim, etc.

Now, while CTWM works, not my cup of tea, nor my poison of choice. I am an i3wm fanboy. So how do you modify what wm is started?? Through a little investigation it turns out the file is:

  • # /etc/X11/xinit
  • and edit the file xinitrc in that direcdtory. The last line is:
  • exec /usr/X11R7/bin/ctwm -W
  • I replaced it with: exec /usr/pkg/bin/i3
So now I rebooted and bam, I have i3. Installed firefox with pkgin and then went to this site to the i3wm configuration post and downloaded all the needed files to run my custom "riced" as they call it, i3 window manager. So wm of choice, on internet browser installed, sucessful first foray into NetBSD