Yesterday was a black Saturday in the learningcurve of FreeBSD (7). Murphy was around, and decided to take away the rest of my spare-time, by kicking my butt in lazyness.
As you might know, the underlying system of FreeBSD is somewhat different than GNU/Linux’s. Linux has (depending on the distribution) a kernel, and basic tools. Linux then has the packagemanagement, which is mainly either DEB (Debian based) or RPM (RedHat based).
FreeBSD does is the other way. It consists of a kernel, and “world”. The “world” contains tools which are needed, like “ls” and “rm (-rf)”. The kernel delivers the libraries needed for the rest of the packagemanagement, which is called “pkg”Â (Packages), which can be downloaded (binairy), or compiled (ports).
Yesterday was all about the library. I like reading a lot, but this kind of library is somewhat different. In the upgrading-process of FreeBSD, you first compile the kernel, reboot, then compile the world (so they use the new libraries), and then upgrade the whole portset. The latter can take 1 day, and I didn’t saw the need to do so, so I didn’t do the whole ports.
Yesterday I was tweaking a small bit on bandwidth-management. I host several sites, under which some galleries. Galleries tend to be bandwidth-taking. A picture says more than one thousand words, not? I tweaked some bit, restarted Apache…… NOT. “Cannot allocate red zone for initial thread”. WTF? Googling around for a bit learned that PHP was barfing. If you run PHP through the commandline-interface, it warped errors which didn’t make sence. The thread gave further that rebuilding PHP was the best option to do, so I decided to do a portupgrade -f on lang/php5. Didn’t work. What didn’t work either after some minutes was bash. That isn’t a problem, unless you tried to logon via SSH (!!!). vi didn’t work either, so editing my user to use “sh” instead of bash wasn’t an option.
I slowly get the eerie feeling that this isn’t good at all. I added a user called “nobash”, which used sh. Worked, except for the fact that su-ing to root was barfing on libcurses. Aaaaargh. When my connection dies, it means a certain death of Sunday, due to a meeting to the datacentre. That *WOULD* cost money for sure.
After some hours, I was able to rebuild necessary packages like perl (aargh), ncurses and more, so slowly I was able to login again. Currently, at the background, there is a portupgrade -faP running to do the timetaking process of rebuilding all ports.
- FreeBSD is the most stable, rocksteady, asskicking operating system I have worked with. If this would happen to Linux, I was currently in Capelle aan den IJssel for fixing this;
- Always – follow – every – step – in – the – fucking – manual. Rebuilding ports isn’t an “option”, it is simply needed. Don’t do it like me (the hard way), but take your time, and DO IT.
Have a great weekend!