Archive for the 'Unix / Linux / *BSD' CategoryPage 2 of 2

Geek humor: from the OpenBSD mailing list

Original post:

OpenBSD 3.8:

dd if=/dev/zero of=/dev/sd0c bs=1024k

6MB/s

Linux 2.4:

dd if=/dev/zero of=/dev/sda bs=1024k

53MB/S

Any clue about the difference? Of course I’m also interested in different ways to do this but the difference is what puzzles me.

And one of the replies:

They have a superior /dev/zero
:D

More on SUSE 10.0

I’ve been using it for a while now, here at work. As I said before, it “feels” faster than 9.1, on the same hardware.

A couple of problems, though:

  1. no MP3 support by default. Not a huge problem, since I always transfer my CDs to Oggs instead of MP3s, but most internet streams, such as Magnatune, are encoded as MP3. Stupid patents. :(
  2. OpenOffice.org 2.0 crashes if I close it using the “X” at the top right, instead of using “File -> Exit”. No data loss, since it happens after it asks you whether you want to save, but it’s still annoying to have a KDE dialog box saying that an application crashed.
  3. Amarok, the media player, had some problems, which were bypassed by changing the audio engine to Xine. It used to stop playing (but without any error messages or complaints) after playing a few files.

On the other hand, the bluetooth support was great. I was able to easily transfer files to and from both my phones (an N-Gage QD and a 6630), without having to install anything extra - it simply detected both the bluetooth USB dongle and the phones.

SUSE 10.0 at work

Since a few hours ago, I’ve moved from SUSE 9.1 to SUSE 10.0 at work. Didn’t have much time to “get my hands dirty” with it, but so far so good - the installation is simple and easy, everything looks and feels “polished”, and the default KDE theme is beautiful.

Also, I don’t know if it’s just me - I don’t think so… - but everything feels “faster”. And no, it isn’t because the system doesn’t have a lot of installed software yet - it does. It’s just that some fraction-of-a-second pauses that I’ve got used to in the last year using that same computer (with SUSE 9.1)… simply aren’t there. New versions of some software? A kernel better tuned to interactive usage? Maybe it’s several things at the same time.

Oh well, more to explore tomorrow. I’ll also post a screen capture here, hopefully.

Unix tip of the day

This happened originally with an AIX box, but I’ve just tried it on Linux and it works the same. It’s not rocket science (but then again, which is rocket science, except actually working in rocketry?), but it can be useful.

A colleague had, by mistake, created a file beginning with a “-”, due to a badly placed redirect (”>”). And, now, the file was hard to delete, because the system assumed that I was giving parameters to the “rm” command.

rm -file didn’t work, of course.

rm "-file" … nope.

rm \-file … nah.

rm "\-file" … no way.

rm -i * , intending to say “yes” to that file and “no” to everything else… nope.

Of course, I could have moved all the other files somewhere else, then delete the directory. But that was a production system, and you know how that is.

A little googling gave me the answer: you can use “--” to say that there are no more parameters after that.

rm -- -file . Simple as that.

OpenBSD’s 10th birthday

OpenBSD is 10 years old today!

Puffy 3.7

OpenBSD is my favorite Unix variant, although due to laziness I use Linux on my work desktop. But for servers… it’s a dream. Fast, secure by default (instead of closing stuff after installation, everything is already closed down, and you open what you need), lightweight, with the best man pages of any Unix in the world (which other Unixes almost never update, or simply forget about)… it just works. pf, the firewall, is incredibly easy to configure (makes Linux’s iptables look like a sadistic joke, if you ask me… yuck!) yet powerful. It doesn’t include everything but the kitchen sink as part of the OS, just mostly the OS itself - the rest can be installed as packages, ports, or from source.

All my sites, along with my internal proxy server, mail server, DNS server, etc. run on a single OpenBSD box. I’ve tried other server OSes, but I always come back to OpenBSD - it’s everything I want, and perhaps as important, it’s no more than what I want.

So… Happy birthday, OpenBSD! :)

An Anti-Spam gateway #2: A note about compiling on Linux

(NOTE: this is part of the “An Anti-Spam gateway” series)

These days, most Linux distributions, especially the RPM-based ones like Fedora, Red Hat or SUSE, increasingly assume that “nobody compiles stuff anymore”. Due to that, they don’t install, by default, the development parts of most libraries and applications.

An example: by default, a distro will install OpenSSL, with the openssl package. But that’s the library files only. It “gives” OpenSSL to other RPMs that need it, but, when you try to compile any program to use OpenSSL, it will fail (or, possibly worse - it will compile, but without OpenSSL support, and you may fail to notice it), because you are missing the header files.

They’re in the openssl-devel package.

So, from now on, through the rest of this series, pay attention when compiling (mostly in the ./configure part). If it fails, or if it passes but says that you are missing an important library, the thing to do is probably to look for the missing *-devel package, and install it.

Incidentally, this is not a problem in the BSDs.

SUSE 10.0

Novell/SUSE Linux 10.0 OSS is out. Another one to try out when I return from holidays - I’ll finally update my ancient 9.1 version.

Highlights: gcc 4.0.2, Linux kernel 2.6.13, KDE 3.4.2, GNOME 2.12, X.org 6.8.2, OpenOffice.org 1.9.125.

Thunderbird 1.5b1

Shortly after Firefox 1.5b1, the new beta of Mozilla Thunderbird is also out.

I don’t use an email client at home (I use GMail), but I’ve just updated Thunderbird from 1.0.6 to 1.5b1 at work (Linux). So far, so good. No crashes (these betas have been at least as stable as the latest stable versions, which is impressive). New preferences look, just like Firefox. Spell checking as you type (may be of interest to many people, but I turned it off in less than a minute :)).

Not a lot of “wow” stuff here, but then again, it’s a mail client. :)

Firefox 1.5 beta 1

Yep, it’s out. I’m posting with it (on Linux) right now.

Looks faster, and so far hasn’t crashed yet, except when I opened the file browser: it crashed every time, then. But I was using development (2.7.x) versions of GTK, compiled a month or so ago; since 2.8.3 is out, which is a stable version, I compiled and installed it, and presto! Problem solved!

(to those who say “see, Linux is too complicated, some library versions make programs crash, and you have to compile stuff”, I was using the development libraries because I wanted to! I didn’t need them for anything in particular, and I could have stayed with RPM versions, but I’m a “bleeding edge” maniac (less so than years ago, but still a bit :)).

EDIT: It’s not “faster”, it’s way faster. It’s when you browse familiar pages and you are, unconsciously, expecting them to take a little time to draw themselves, and they appear instantly, that you notice it. I recommend you try it. :) I’ll install it on my home Windows PC later today, too.

EDIT #2: Using it on my XP home PC as well. Zero crashes, zero problems so far. Also, in less than 24 hours, I’ve found that about half of the extensions I use have been updated and are now compatible. I’d guess that most or all of them will be, in a day or two.

Linux and usability

(NOTE: this is translated and a bit expanded from a comment I originally posted, in Portuguese, on Carlos Rodrigues’ blog.)

Many people (including geeks, and including Linux users) often say that “Linux isn’t ready for the desktop”. Yet, I’m using it on mine (at work), so it must be ready for at least some desktops, right?

Continue reading ‘Linux and usability’

IPsec woes

OpenSwan, ipsec.conf man page:

CONN PARAMETERS: MANUAL KEYING
The following parameters are relevant only to manual keying, and are ignored in automatic keying.

and, still in that section:

esp ESP encryption/authentication algorithm to be used for the connection, e.g. 3des-md5-96 (must be suitable as a value of ipsec_spi(8)'s --esp option); default is not to use ESP

Note that that option (”esp”) doesn’t appear in the AUTOMATIC KEYING options list. From the above, one would guess that it’s only for manual keying, and that for automatic keying that option is ignored - that, indeed, it’s not necessary.

Right? Unfortunately, that’s not true, from what I’ve seen.

Until I added:

esp=3des-sha1-96

to a particular automatic keyed connection, it simply wouldn’t work, because the default is to use md5 instead of sha1, and the other side used sha1.

Oh well… things like this end up making us sysadmins not trust documentation. Unless it’s OpenBSD, of course. :)




Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal