pythonaro.com

Pythonaro blog

05 July 2009

First impressions of OpenSolaris 2009.06, Windows Server 2008, and other various OSes

Having recently installed VMWare Server, I went on a "installfest of one": Windows Server 2008, Kubuntu 9.04, OpenBSD 4.5 and OpenSolaris 2009.06 are now happily chugging along on my server (which is apparently handling the situation without breaking a sweat -- impressive), with Arch Linux next on the list.

I have to say that I've been surprisingly impressed by the two "most commercial" offerings.

Windows 2008 feels really fast and lean. I don't like the new filemanager, but it looks like some of the infamous Windows bloat has been removed here and there. Getting asked for the Administrator password every 5 seconds is irritating, but at least the "Run as Administrator" menu item is more accessible than it used to be, so you can (mostly) preempt it. Also, it seems to work better with Samba, but this might be because Samba itself improved a lot (probably thanks to certain EU antitrust actions, but I digress).

I was even more impressed by OpenSolaris. Booting in a LiveCD before installation is always nice. The customized Gnome 2.24 (aka "Java Desktop System") is the most polished Gnome I've ever seen. The package manager makes it easy to get additional software (and to get rid of unwanted megabytes of localization files for all sorts of languages). It was a breeze to install NetBeans and its plugins (Python support!), I'll have to give it a spin. It's also curious to see in action Sun's typical "network philosophy": for example, /home folders are NFS mountpoints, which makes a lot of sense if you think about it. The drawbacks are that some things don't make sense: e.g. the Gnome utility to track free disk space goes bonkers (34 free gb when the disk is only 10...?). But these are details. I'd really like to spend some time learning permissions, ZFS, zones and all that; I hope I'll get some time at work.

In retrospect, configuring my first DNS server on OpenBSD 4.5 was almost uneventful. I'm not sure I even understand what I did, but it works :) I plan to expose this box to the Big Bad Internet at some point in the future, does anyone need a bit of space?

I guess the moral of the story is: VmWare server is very nice, when you have the right iron to run it on ;)

Labels: , , ,

posted by GiacomoL @ 7:37 PM   0 comments links to this post

26 August 2007

Notes on mod_mp3 running on OpenBSD 4.1 default apache (under chroot)

The default Apache instance on OpenBSD runs as chroot (8) in /var/www. This creates problems when trying to run mod_mp3, which needs binary modules outside the chrooted environment. To fix it:

mkdir -p /var/www/usr/local/lib /var/www/usr/local/sbin
cp /usr/local/libmod_mp3.so /var/www/usr/local/lib/
cp /usr/local/sbin/mod_mp3-enable /var/www/usr/local/sbin/ 
(not sure if mod_mp3-enable is really required, but wth)

Also consider that the directories containing MP3s must be reachable by the chrooted environment with the same path as in the original environment. So for example you want to do something like this:

mkdir /var/www/music
mkdir -p /var/www/var/www
cd /var/www/var/www
ln -s /var/www/music music
and then in /var/www/conf/mp3.conf you'll specify the directory as /var/www/music.

(And after figuring this out, I've found that I'm screwed anyway, because I'm storing the MP3 files on a different disk, which by design is not reachable inside the chrooted environment. Either I move the entire chrooted environment on that disc, or I stop worrying and learn to love samba shares.)

Technorati Tags: , , ,

Labels: , , , ,

posted by GiacomoL @ 3:32 AM   0 comments links to this post

25 August 2007

how to configure WG311v3 / Marvell Libertas 88W8335 on OpenBSD 4.1

This post is for Google (and for my future self).

The Netgear WG311v3 PCI wireless network card is listed as "supported" by OpenBSD 4.1 thanks to the malo driver. Unfortunately, you need a binary firmware blob which is not legally distributable, so it's not included by default; it's somehow available anyway and linked by the man page for the driver. The abovementioned man page also implies that you are only a pkg_add away from making it work, which is not really true. This is what you need to do:

  1. Go to the malo firmware repository and download both the 1.2 and 1.3 package.
  2. Install the 1.3 version with pkg_add (1)
  3. untar the 1.2 package
  4. copy the extracted mrv*.fw files to /etc/firmware
  5. set all your options with ifconfig, keeping the interface down (VERY IMPORTANT). In my setup, I set the nwid (aka ESSID) and nwkey (aka WEP key, which must have the "0x" suffix if expressed in hexadecimal); setting the channel or the bssid was counter-productive, better leave the interface figure it out by itself.
  6. Then bring up the interface, and do the dhclient dance if required.
NOTES: in my experience, setting a hostname.malo0 file for the interface doesn't work. Somehow, it only works if you use standard ifconfig (8) commands, making sure all the required options are set before bringing the interface up. I don't know if this depends on the network startup scripts or what, but eventually I had to add the command sequence in my rc.local.

Also, bringing the interface up & down can have unpredictable results. Sometimes the firmware won't load when you try to bring it up again, sometimes it will error out; in these cases, better to reboot. There must be a way to unload these blobs from the kernel, I just don't know it yet. Lazyweb...?

Ah, the evils of closed drivers. Unfortunately, my trusted hardware pushers didn't have any other supported PCI wifi card, and USB ones are even more evil. Anyway, I'm happy it works now. I hope this post will be helpful to somebody else as well.

Technorati Tags: ,

Labels: ,

posted by GiacomoL @ 10:21 PM   1 comments links to this post

20 August 2007

We Meet Again, Mr. BSD

Over the weekend, while weathering a cat.5 thunderstorm called "wife", I managed to finally install OpenBSD on the spare machine I got from a friend. These are my thoughts on the experience.

I had a few run-ins with *BSD flavours in the past (especially NetBSD, with which I was, for a few months, slightly obsessed when I was 19). I honestly didn't remember the "disklabel(8)" thing, which is, at the same time, quite an ingenious device and a fairly big PITA. The concept is that FFS, (the filesystem used by BSDs -- from what I understand, a variation on UFS) doesn't really need more than one primary MBR partition, and doesn't really want to deal with "classic" (DOS) logic partitions either. They take one primary partition and "slice" it in "labels", basically implementing their own logical partitioning scheme. This is all fine and dandy, but unfortunately the tools for this sort of slicing are really bare, and still force you to work with cylinders and heads and sectors; party like it's 1981!
Something slightly more intuitive, like cfdisk(8), would work wonders for adoption rates, but it's clear that the OpenBSD project doesn't really care about adoption rates(which is fine, their priorities are different).
So, the main giveaway is this: don't try to do anything clever, just get a big primary partition and leave other filesystems alone.

Once past this initial hurdle, however, installation is incredibly easy, and will leave you with a bare system in which everything is turned off, apart from (optionally) the OpenSSH server. This is perfect for a server machine, and that was exactly my aim for this box. 

OBSD's hardened version of Apache comes preinstalled, but I had to install Subversion, Python, MLDonkey and a few other apps, so had to learn a little bit about pkg_add(1) (ah, memories of Slackware here...). Apparently, you can configure it to automatically download binary packages (pkg_add -i), but somehow I missed this and ended up manually downloading the binaries, which was a bit slow. I didn't attempt to get java, I understand you have to compile it from sources and can take ages. I did setup the ports source tree, though, and successfully built a couple of utilities, just for kicks; being a predecessor to the Gentoo "portage" system, it looks like a simplified version of it, and works fine.

Samba was so easy to set up, it wasn't even funny.

The only thing I didn't manage to fix, being a newbie admin when it comes to serious stuff, is DNS. This machine will not act as DHCP server (have an integrated router for that), but I'd like it to work as nameserver for the other computers in the LAN. I read a few howtos here and there, but they either cover a dhcp+dns configuration or pure Internet-facing stuff, which is not what I want. Any pointers would be appreciated.

Now I just have to buy a wireless card for it, being careful to get a supported one (either this Netgear WG311 or the Edimax EW-7128G), and then I'll finally have an always-on box to use for downloads, mp3 streaming, svn repository etc etc. Who knows, I might even expose ssh and apache to the Internet. Scary! :)

Technorati Tags: , , , ,

Labels: ,

posted by GiacomoL @ 10:29 AM   3 comments links to this post