Monday, April 10, 2006

CRUX 2.2 - Taste matters

According to the wikipedia article CRUX is a lightweight, i686-optimized Linux distribution targeted at experienced Linux users. The primary focus of this distribution is keep it simple, which is reflected in a straightforward tar.gz-based package system, BSD-style initscripts, and a relatively small collection of trimmed packages. The secondary focus is utilization of new Linux features and recent tools and libraries. CRUX also has a ports system which makes it easy to install and upgrade applications. But here is missing something! CRUX by philosophy is similar to Gentoo Linux or NetBSD: it's users have an easy-to-distinguish taste, which is reflected by the distribution. CRUX is not the "ordinary" distro, where you install everything with next-next-next-yes. It's far from it, it has a specific style, which requires some experiences as well.

Hardware architecture

Unlike you might think after looking at the Handbook, there are several architectures supported: PPC (last version: 2.1), SPARC (last version: 2.1rc1), x86_64 (last version: 2.2test1), i586 (last version: 2.1) however there's only one official release, i686.

Installation

Packages on the official CRUX ISO image are compiled with optimization for i686 (Pentium-Pro/Celeron/Pentium-II or better) processors. Do not try to install it on an i586 (Pentium, AMD K6/K6-II/K6-III) or lower processor, since it simply will not work. I will only touch here the CD-ROM installation method, since it's the most common, but you should know that you can install CRUX from network, and with your own bootkernel too.
First, of course, you have to download crux-2.2.iso (El Torito), and check its integrity (check its MD5 checksum). If it's OK, you should then burn the images, and boot into it (set your primary boot device to CD-ROM!). Now you can login as root (no password required), and create the necessary partitions (at least a root and a swap). After making some directories and mounting the corespondent partitions you arrive to the setting of the root password (attention, this will be very important later). Edit your config files like /etc/fstab, /etc/rc.conf, /etc/rc.d/* and /etc/hosts.
Now it's time to compile your kernel.. CRUX 2.2 has linux-2.6.15.6 included, which is very new compared to the release date. After you compiled your kernel succesfully, you must set your /etc/lilo.conf (or grub.conf if you plan to use GRUB) so that you can boot to your new CRUX installation in the future. You can execute now your setup.sh script, which lets you select the packages you want.

Software

CRUX organises packages in three groups:
-core: as it's name says, these are the base, necessary packages (like gcc, cron, zlib and binutils)
-opt: optional packages, which may be installed by the user if wanted (like WMaker, cdrtools, X.Org)
-contrib: user contributed packages (there aren't such on the official release disc)

There aren't too much packages on the disc, which can be seen by its size (2.2-i686: 230 MB), but no problem, there's ports and you can install thousands of packages later if you want.

Ports

According to the CRUX 2.2 Handbook a port is a directory containing the files needed for building a package using pkgmk. This means that this directory at least has the files Pkgfile (which is the package build description) and .footprint (which is used for regression testing and contains a list of files this package is expected to contain once it is built). Further, a port directory can contain patches and/or other files needed for building the package. It is important to understand that the actual source code for the package is not necessarily present in port directory. Instead the Pkgfile contains an URL which points to a location where the source can be downloaded.
If you've used BSD before, you might know (you have to know by the way..) what are ports, and how to use them (though there are some differences at CRUX). On your first-boot you should synchronize your ports collection, so that you can install the latest available packages then. Use this:
ports -u
To see all your ports, so list them, use ports -l.To see if you should install a new port (so if there's a new port appeared) simply execute ports -d, where d mean "difference". Once you've found a port you might need, cd the directory of the respective port, and execute pkgmk -d, where d mean "download". Then you can install it with pkgadd -portname-#-portversion-, or simply executing pkgmk -d -i to install, or pkgmk -d -u to upgrade the port (note: this way you don't need the first command, but you still have to execute this in the port's directory).

Configuration

After going through the installation procedure, I think you already know that CRUX doesn't have graphic configuration tools, you have to do yourself everything, just like during the installation. As I said, CRUX is for experienced users, so if you just began, and installed it using the handbook for every little step, you have two chances: you'll spend a LOT of time learning linux, or you'll simply feel CRUX annoying and delete it. I recommend the first, since if you don't learn using linux with pain and time, you'll never be able to use a fully graphic-enabled system well. CRUX doesn't modificate software packages, so you can optimize everything for your needs. If you're an advanced user, CRUX is the ideal ditribution for you.

Conclusion

As CRUX is the absolute antonym to bloat, it's amazingly fast. If you know what you do, you'll never have any problems with it, everything is in your hands, made by your hands. You have secure packages, since the CRUX ports collection is made of the latest stable releases, nothing unstable enters it. Final sentence: CRUX is wonderful.

Later edit: This post has been criticised by DevOne. Read his thougts here

8 comments:

Anonymous said...

I agree with wonderful...
After about a year of using ubuntu I was tired. Usualy strange bug came up and I wasnt able to solve it because I havent seen inside the system. I got crux 2.2 up and running in about a day and half with all software I use (not going to name it cause it will be really long list) installed and configured. Of course before I was playing with crux 2.1 for two weeks, learning new things like how to set grub on separate partition or how to configure & compile kernel (that is tricky part) but it was worth it. I recommend CRUX for everyone who want to see inside linux and understand.
Have funn
(sorry for my late night english)

Anonymous said...

It's been more than a year since I last ran Crux but I liked it then and your review has made me anxious to install and play around with it once again. Maybe this weekend will work out and I can get it done.

Thanks for the review!

ozar

cruocitae said...

Thanks for the opinions!
Regards,
The Author!

DevOne said...

configure & compile kernel (that is tricky part)
-Why on earth is it hard? All you have to do is a make menuconfig && make && make modules_install ... If you ask me it's damn easy...

Anonymous said...

CRUX is a DIY distribution as someone said on ML.
There is noone to blame if you've done wrong. After 2 years with CRUX, i like it even more. It is the most long-living OS on my PC.

brointhemix said...

yup, CRUX rules. I was a complete n00b in terms of linux when I got CRUX (2.1 at that time) and finally gathered myself to FINALLY damn learn this OS :).
CRUX is fabulous. in about two weeks i got all the necessary knowledge about the insides of a UNIX-based OS and learned not to be afraid of it.
plainly, if I may, CRUX is THE shit! :D

regards,
brointhemix

Anonymous said...

This may rarely be seen, but it has to be said, CRUX, Gentoo and Arch Linux are my favourite

Anonymous said...

Is Crux better than arch linux? I mean, are we forced like in arch to do a complete update from time to time? Because arch being a rolling distro, if I don't update the system for one year, and then install a package that needs recent dependancies, it will partly update my system but also create big conflicts, and sometimes it will crash.