How to install binary applications in NetBSD (day 5)

Today I learned how to configure the NetBSD package management system for installing precompiled binaries. I immediately installed some new console applications to my system.

After reading some good and some excellent NetBSD documentation, I was ready to export some environment variables as I had learned that it would be necessary for the package management to function. After experimenting and correcting some typos in the command line options I decided to add the tweaks to the root's .profile.

I decided to open the file:

vi .profile

It took me three seconds to realize, that I only had to uncomment a line in order to be able to install binaries from the ftp.NetBSD.org. I wonder why I bother to read the fine documentation, if everything I need to know can really be read in the comment lines of the configuration files.

Now new applications can be installed with a simple command:

pkg_add -v screen

Cool, isn't it?

NetBSD, day 4: reinstalling the system

During the weekend, I was not able to use my new NetBSD system as I was back home using my Ubuntu desktop. Now that I returned back to the town where I study economics and business administration, I am right now reinstalling the system.

Actually there was nothing really wrong in the way I had originally installed the NetBSD. I just made the mistake of trying to use the wonderful packages system that installs all the packages by compiling them from the sources. Unfortunately, the packages collection takes a huge amount of my limited disk space.

Furthermore, it takes hours to compile anything at all with this machine. So it seems that I have to use binary packages of the applications in the future. If you intend to use NetBSD on anything built during the last couple of years, you will most probably be quite happy to use the source-based packages. See the pkgsrc guide for extensive documentation of the system!

The unix way of doing the cleanup of the system would probably have been to rm some directories by hand and tweaking some configuration files. As I have nothing special installed on the system - it was just configured to be a basic but usable command line system - I figured a reinstall would be easier and faster than reading some more of the great NetBSD documentation just to make sure I have removed everything unnecessary.

Now I have again a clean system, with just a root and one ordinary user created. I'm back in the beginning - and slowly learning to use the vim.

NetBSD, day 3

Eight years ago, when I first installed Linux it was not unlike everything I had used before. I had used computers with MS-DOS and every day I read my email on an Unix system over ssh. So I was familiar with the basics of Unix and the command line. But I had a lot to learn.

In many ways, moving from Linux to NetBSD is similar to my jump from Windows 98 to SuSE. The system is familiar enough to be somehow understandable but still I don't know everything I should know.

Today I learned to make the keyboard encoding permanent. In case you are not using an English keyboard, you should add a line to /etc/wscons.conf:

encoding sv

The abbreviation sv stands for a Swedish keyboard (it is exactly the same as a Finnish keyboard, but there is no encoding fi available!). At the moment I use a console screen with 80x25 characters. It will probably take a few days before I have the courage to even consider configuring the console for 50 lines.

In NetBSD, only those users who are members of the wheel group are allowed to su into root. Thus, I added myself (as root!) to the group:

usermod -G wheel mikko

Now I can finally use su like in most Linux systems I've used during the last years.

I have not yet decided whether I should continue using vi or should I install something I am more familiar with. For years, I've known that I should learn to use vi but I have always had nano or emacs installed.

I suppose I'm too lazy to be a real geek.

One more note before returning to my books: unlike some modern Linux distributions, NetBSD's default install includes locate. The database for locate had to be created as root with /usr/libexec/locate.updatedb - unlike in Linux where the command is updatedb.

NetBSD on an old computer, day 2: configuring the system

NetBSD is not meant for those who are afraid of the command line. Unlike most of the Linux distributions, it does not install any tools for configuring the system. Well, actually there is one tool for the task: vi.

If vi is not the editor of your choice for your daily editing, you should have a cheat sheet of vi modes and shortcuts available before you install NetBSD. In addition to the cheat sheet, it would not do any harm to have the NetBSD Guide printed as well. I have printed a copy of the book two years ago, and that's what I intend to use as my reference for the configuration. And if I cannot solve some problem with it, it is good to have this debianized iBook for browsing the Internet!

The first thing to do on an just installed system is to add a user without root privileges. This is easily done with:

useradd -m mikko

Then I gave a password for Mikko:

passwd mikko

Next I changed the keyboard layout to the right one:

wsconsctl -k -w encoding=sv

And finally, I wanted to have the network up and running. I added two lines to /etc/rc.conf:

dhclient=yes
sshd=yes

The second line starts ssh daemon on the boot. Next I rebooted the system and tried to open a ssh connection to another box. Nothing happened.

I read all kinds of man pages and the NextBSD guide for about ten minutes to find out if there was yet another text file to tweak before I would have the box connected to the world.

The solution was, however, quite simple. All I had to do was to connect the network cable to the computer.

NetBSD on an old computer, day 1.

Every now and then I see bloggers testing their limits. Some of the bloggers have decided to live for a month in console, with no X installed. Some bloggers try to do their everyday computing with a Pentium 100.

I decided to try something similar. I had once or twice installed NetBSD on a P100 with 40 Mb but I had never really tried to use it for everyday tasks. A few months ago I got an old PC that would make an excellent sandbox for this experiment.

I burned the NetBSD 5.0 RC3 on a CD, put it into the cd drive of an old desktop computer with an Asus P5A-B motherboard, 256 Mb RAM and an AMD K/6 processor that runs on the extremely high speed of 450 MHz. This is more than enough for NetBSD that can be run with as little as 8 MB RAM. Furthermore, as the full installation needs about 200 Mb there was no need for tweaking the package selection.

The installation was a lot easier than I expected. As this is the first time I intend to use NetBSD for real computing I let the installer take care of the partitioning. I was quite happy to dedicate all of the 6 GB for NetBSD. I just pressed the Enter a few times and after a few minutes I had the full system installed on the hard disk drive. I was ready to reboot the system into the installed system.

After the reboot I was greeted by the command line.

The adventure was to begin.

Lightweight Linux bookstore opened

For some time, this blog has been an Amazon Associate. From now on, you can find selected Linux books in the Lightweight Linux Bookstore. If you order books from the Lightweight Linux Bookstore, you order directly from Amazon. There is no direct connection between me and your order, so it is absolutely safe to use the bookstore.

By ordering books and other products from the Lightweight Linux Bookstore you support the writing of this blog. Help me to write new articles for this blog!

Absolute Linux 12.2.2 Released

Absolute Linux is a distribution based on the venerable Slackware. It provides an easy to use desktop that has all the applications most people use in their everyday computing (Firefox, OpenOffice, Pidgin chat, GIMP image editor, WPClipart, Thunderbird mail, K3B CD/DVD burning, Frostwire P2P, Deluge BitTorrent).

From the release notes:
This release updates several major programs due to security issues. This includes Firefox, Thunderbird, Samba, Seamonkey and Pidgin. Pidgin also updated to correctly configure notification/alert sounds. Updates also enable auto-start of PTP cameras (like Canon), updated GIMP and GIMP-help (help on CD2 zip) and updated wicd (for wired and wireless connection management.) Plus a few others...

(Download Absolute Linux ISO images)

New releases

Tiny Core Linux 1.2 has been released. Tiny Core Linux is an extremely small (10 MB) and minimal desktop system that is based on Linux 2.6 kernel, Busybox, Tiny X, Fltk, and Jwm. The system runs entirely in RAM. It is not a complete desktop and only a limited selection of hardware is completely supported. The system provides only the essentials needed to boot into a minimal X desktop using wired internet access.

Zenwalk is a Slackware-based distribution. If you are not interested in configuring Slackware but want to have an easy to install and usable desktop system that does not demand a lot from the hardware you should consider installing Zenwalk. Zenwalk is designed to be lightweight, fast and rational desktop providing only one application for each task. At the same time, it is a complete desktop system with multimedia applications. The latest 6.0 version was released just a few days ago.


Recommended reading and some news

In the last two weeks, I've been too busy to blog because of my studies. The exams took all my time and I simply couldn't find time to test anything new. Fortunately, I can recommend many interesting new articles published elsewhere.

If you don't follow K. Mandla's excellent blog, you should at least read his new series of articles about how he used a P100 with 16 Mb RAM for a week. You might not want to follow his example, but at least you should read about what can be done with any old computer you most probably have somewhere collecting dust.

One week at 100Mhz: I found a desk | One week at 100Mhz: Hardware hopscotch | One week at 100Mhz: Slow is as slow does, Mrs. Blue | One week at 100Mhz: Scary power failures | One week at 100Mhz: Paradigm shifts | One week at 100Mhz: X-less and not a hiccup | One week at 100Mhz: Lessons learned

Next some new distribution releases:
* ZevenOS 1.1 has been released. Download ISO 679 MB.

* SliTaz, the amazing distro under 30 Mb download has released a new test release for version 2.0. Download the ISO image from here (28.6 Mb).

And probably the most surprising news of the last week or two has been the announcement of Desktop NetBSD project. NetBSD has been known as the hard core unix that can be run on any hardware including the toaster. Now some afficionados intend to build a user friendly desktop out of NetBSD, which so far has been known as the choice of command line aficionados.

* Desktop NetBSD

If you have old useless computers that have more exotic CPU than an ordinary Pentium or compatible processors, you most probably can run NetBSD on it. See the official documentation for more information.