Posts about linux (old posts, page 5)

2006-09-14 10:52

The bad side of Arch Linux

I posted yesterday that I liked Arch but I called it "not too good". So, Mark Kretschmann posted a comment asking what I didn't like.

It's not too much, but here it goes:

  1. The upgrades sometimes are a bit painful (switching to udev was a bit hard).
  2. The policy of deleting the package documentation is evil. Really.
  3. The startup system is too simplistic. No default order of startup scripts means sometimes it takes trial and error to figure out what goes first. Hal or dbus? hwd?
  4. The package selection (without unsupported) is somewhat skimpy (no perl-net-server? no perl-html-template?) but that's probably my POV because I am a bit server-oriented.
  5. Some basic packages make scary assumptions. For example, if you have a user with UID 89 when you install mysql server, weird things may happen. Same for UID 40 and named.

On the other hand, the good side (at least for an amateur like me) is a bazillion times bigger.

2006-08-17 15:52

Linux Installation Kung Fu

I decided to try Arch Linux on my notebook. The reasons don't matter.

However, there was this problem about the CD drive being broken, and the lack of a floppy drive.

So, how did I do it?

I had a partition I could destroy (/dev/hda3)

I installed qemu.

Then, I started qemu using the whole HD and a CD ISO image (booting from the CD!):

qemu -hda /dev/hda -cdrom arch-0.7.1.iso -boot d

Then, very carefully I installed it on hda3 and did not install GRUB.

Copied the kernel and initrd images to /boot on the other linux installation.

Edited grub.conf, adding the Arch entry...

And it worked.

Keep in mind that if you make a mistake, this will completely destroy all your data. But if you are careful, and have enough space, you can install your next Linux while you use your current one.

Now, is that cool or what? :-)

2006-08-03 15:54

Linux and a TrendNet TEW-PC16

So, I am trying to use this ancient card with Linux and all I get when I plug it is a message in the logs:

Aug  3 13:11:28 monty cardmgr[12752]: unsupported card in socket 0
Aug  3 13:11:28 monty cardmgr[12752]:   product info: "PCMCIA", "11M WLAN Card", "", ""
Aug  3 13:11:28 monty cardmgr[12752]:   manfid: 0x0274, 0x1601  function: 6 (network)
Aug  3 13:11:44 monty cardmgr[12752]: exiting

A little digging showed me the following:

  1. This card is supposed to work with the hostap driver
  2. It has never been a popular card.
  3. Noone seems to have used the thing on Linux. Or if they did, they never documented it.

So... all you have to do is inform the PCMCIA thing in Linux that this card works with hostap.

After you installed hostap correctly for your kernel, edit /etc/pcmcia/hostap_cs.conf and add this:

card "TrendNet TEW PC16"
   manfid 0x0274, 0x1601
   bind "hostap_cs"

Reboot (or restart the pcmcia service, unplug, plug, etc), and that's it.

2006-08-02 16:48

Fixing windows the unixy way

A while ago, I wrote about my misery trying to use a HP PSC 1410 printer attached to a XP box as a network printer.


  • The Linux driver freezes the printer if you print remotely (but works locally)
  • The basic windows driver will not even install on a WindowsMe notebook with 32MB of RAM (says it requires 128MB and closes)
  • The full featured driver requires the printer to be locally connected to install succesfully. And if you do that, you can't later tell it that the printer is remote (plus it installs about 600MB of garbage)

Since attaching the printer to the linux box and using PS drivers was not practical (because it has to be used as a scanner too...whatever), I thought... wait a second. Why not do that on windows?

And what the hell, it worked.

If you have a rebel can't be networked printer, do this and be sorta happy. It explains how to create a Ghostscript-based virtual printer that you can share.

And of course, the client PS drivers works just fine on any OS. Which means you can use printers that, for example, have no Linux drivers. Or no Windows9x/Me/NT drivers.

Only problem really is that it's a bit sluggish (it may wait a minute or two before it prints) because the XP box is slow... but it beats copying files.

2006-05-14 09:39

Booting with runit / runit RPM - updated

I have updated my Booting with runit story for the commands in runit 1.5.1 and included a mention for my easy runit RPM (which is now also up to 1.5.1).

If you are looking for an alternative way to boot your linux machines, or for a reliable way to run and control your services, please take a look. Runit is cool.

2006-05-11 16:22

I am **so** not a guru.

I got this nice multifunction printer+scanner+copier, called HP PSC 1410.

Cheap, too!

Works nice, even!

Except... it can't be networked. You simply can't, using HP's software, print on that thing from any other computer on your network.

Except, that is, if they are both running windows XP. Not even other versions of windows will work. And HP says so. (Correction, maybe not even with XP?)

On Linux? Well, it shoulda kinda work, says

And then I suppose I could export a postscript queue and let the linux driver do the job, and get some printing done from the must-be-windows-98 notebook running the legal case management software.

But you know what? I am so tired of this crap. It doesn't work right on Linux. It's crippled on windows. What exactly are we supposed to run for this piece of engineering to work?

Why does this, a rather new model, lack a feature every godforsaken printer has had since the dawn on Windows For Workgroups 3.11?????

I know my page is read by no windows printing guru, but I really can use a hand here.

2006-05-02 15:44

FaxWeb is done

FaxWeb, a web frontend for mgetty+sendfax is finished. It works. It's probably close to bugfree ;-)

The missing piece is a nicer reimplementation of respond (and this one will be cross-platform, too) using PyQt, which is 50% done.

I am only missing how to implement portable systray icons. On Mac they make no sense, on Linux I have it working, on Windows I have no idea.

Here's the simple interface for faxweb:

It even has a little AJAXy "the page doesn't reload" niceties courtesy of MochiKit!

Also from MochiKit, the nicer, rounded look&feel. Compare to this older, uglier one:

I know the new one is not good, either, but I have decided that since I can't aim for awesome, I should aim for adequate, and settle for boring and harmless.

Of course, if any CSS/XHTML guru volunteers for a makeover, I'd be very happy, since I use the same CSS everywhere (even on parts of this blog ;-).

All in all, a pleasure to write this thing, thanks to CherryPy!

2006-04-29 12:51

The state of simple Linux fax server software

A customer asked me to implement for him a simple fax serving solution.

Here's what he wanted:

  • A central received fax repository.
  • A way to send, as simple as possible (the classic fax-printer scenario).

I vaguely remembered knowing that Linux could do that, so I said yes. Then I started trying to figure out how to do it.

The 500lb gorilla of linux fax software is of course Hylafax. And it's just about as pretty and cuddly as a 500lb gorilla, too!

Put it simply: waaaaaay too much software for the goal.

Hylafax is a very complex software package, and while it does have some tools to make management simple, it would probably have forced me to support this thing forever. And that's not mi idea of fun.

Not to mention that I couldn't find CentOS/RHEL4 packages (not too big a problem, but annoying).

Then I spent 10 hours trying to make it pick up the phone. And I started being annoyed.

So, I started looking for simpler stuff, and the second gorilla seems to be mgetty+sendfax.

The more I read about it, the more I liked it, and I finally implemented using it.

The good news:

  • It's really simple. I was receiving faxes in 5 minutes.
  • It was way less fidgety about modem setup than Hylafax.
  • The fax quality was very good (probably not their merit, but it was nice).

Now, the bad news:

  • It's old software. Check the webpage and look at the broken links and ancient releases.
  • The windows client support was pathetic.

How pathetic: ok, here is how you make it work:

  • Setup mgetty+sendfax enough that you can make it send from the CLI.
  • Setup samba enough that you can do a shared printer from the windows side.
  • The shared printer should print to (look at the germglish page).
  • On the windows side, start respond and then when you print to the fax, the fax server hooks to the client's port 5555, and respond show a huge popup asking for the number, recipient, and sender.
  • Explain to your client that where it says "name" he should put his email address. There is no way to save that address so it's not asked again.
  • After the fax is sent, the user gets an email (if he filled the form correctly) with the report.
  • The alternative notification mechanism is winpopup. Which isn't there in XP anymore anyway.

Amazingly, it does work fairly well, and the client is not terribly annoyed. I would be, though.

So, what can be done:

  1. Now that there is a PyQt4/Win32 I may write a respond replacement.
  2. Maybe can be extended/replaced to give report information to that respond replacement.

Sounds like a nice fun project... NOT! But it is a fairly simple, necessary one.

So I will probably do it. Or else, I may have to learn how to properly use HylaFax.

2006-04-07 11:38

Things that should exist.

One of my greatest frustrations as an adequate programmer is that I think of things I believe should exist, yet I am not able to implement them myself.

Today I will mention one (or two) of them.

There should be a Xen-based distro.

Xen is a very good virtualization package, which gives you multiple simultaneous virtual linux installations with very little overhead.

Sadly, to make it work, right now, you have to get a linux working, then install Xen, then install one or more extra linuxes as xen machines.

Which is not terribly hard, but could be done much easier.

I am thinking of something like this:

Installing Xen-Linux installs a very simple basic setup as the supervisor partition, sets up Xen properly, and sets you with a single Xen virtual machine.

Also, in another part of the disk, it has a gzipped file with a simple, basic linux setup which you use as a template for further virtual machine initializations.

So, whenever you want a new machine, you run a script, it sets it up, starts it, you get something like firstboot asking you the usual network/language/whatever questions.

Then, you are dropped into a nice package selection tool, where you choose what you want installed in this virtual instance.

And that's it.

This would encourage the administrator to always set up his servers as virtual machines, which except in cases of real hardcore performance requirements is a good idea (you can implement HA as full-image fallback. You can migrate to a new box in minutes!)

I could do most of this. However, that leads me to another thing that should exist...

A simple installer

Wait, you may say "Linux installers are simple already!!!" and youa re right.

I mean a simple installer for a guy trying to make his own distro!

I actually like anaconda a lot. But I would like it even better if I could just get some sort of tool that, given a list of packages, would create an anaconda-based CD with customizable install scripts.

And that is the piece I am not sure I can implement.

So, if anyone knows of any such thing, I would love to hear about it.

And as a preemptive message: No, I don't want to do it with Gentoo, or Debian, or Ubuntu, or Suse, or kickstart. I want to create a RPM-based, CentOS-based, anaconda-based installer that works just like a regular CentOS/RHEL installer CD.

2006-01-11 12:36

2006 resolution

I will make some of my work public.

The best candidate is one that will probably not appeal to anyone: my personal linux distro.

I have it, I use it all the time. It's not published yet, though, since it consists of a base CentOS + a lot of work.

So, I will try to make it systematic, call it an installer, and drop it on the unsuspecting audience.

Don't hold your breath, though.

Here are some of the features:

  • Server oriented. I use it for my clients' servers.
  • Qmail+courier+vpopmail+roundcube+spamassassin+clamav mail system.
  • Squid proxy+fwbuilder firewall
  • Smart for package management
  • runit-based boot/services.
  • KDE as a GUI. Accssible via FreeNX/secure VNC.
  • OpenVPN for simple VPN management.
  • Custom cherrypy-based admin tools
  • No SeLinux (sorry, it's a pain in the butt. Secure, but a pain).
  • Bacula for backups
  • Custom tool to back the whole disk to a bootable DVD (System Rescue DVD)
  • /etc in SVN+Trac (yes, really, and the admin tools force you to use it)
  • Probably djbdns for DNS.

All in all, it's a pretty ordinary CentOS-based thing, except that the switch to runit makes service management way simpler and regular ( you can do things like having a non-root user that can manage some services, yay!)

On the other hand, the cherrypy-based tools would probably need a bit of a rewrite, since some are pretty cruddy.

Mostly, I have been gathering these pieces over the last 6 years as I really don't like the way any of the Linux server distros are built.

I based it on CentOS because doing the whole distro by hand is way too much work.

I can probably show it around June, if I don't get too sidetracked. Hopefully, someone will read this list and tell me "but graxzst linux already does all that!" ;-)

Contents © 2000-2018 Roberto Alsina