Jaunder

#linux

Posts by ~mdorman
M
Michael Alan Dorman@mdorman

On becoming more mainstream...

I'm realizing that 17 years ago turns out to be a pretty pivotal time for me professionally. In addition to being the time period when I found what has been my primary programming language ever since, it is the time when I threw caution to the wind and embraced Linux as my primary desktop OS.

As out-of-the-mainstream as that decision has been--and it was far more radical back in the '90s before KDE, Gnome, Ubuntu and what-have-you--I have often constructed my desktop out of components that were considered outre even by Linux standards. I ran FVWM 2.X when people were still thinking that 1.x was the way to go. I ran IceWM when a lot of people were embracing Enlightenment or one of the NeXT-step based WMs. Even when I was using components of Gnome on a daily basis, and even trying it out from time to time, I never committed to it, figuring out how to use those components from within whatever unusual setup I was using.

For the last three years or so, I've been using the Awesome WM to construct my thoroughly idiosyncratic but highly-efficient desktop environment.

No more.

I've always run something more mainstream on my desktop machine, because Anne uses it occasionally to work with GnuCash. Which meant that I was also using it fairly regularly, since I try to keep up with our finances on a daily basis. And six weeks or so ago, I decided to "upgrade" it to Gnome 3. I knew that if it didn't work out--and I didn't really expect it to, Gnome 3 having been pretty thoroughly reviled when released--I could always fall back to Xfce, which is what it had been running.

Much to my surprise, I found I kinda liked Gnome 3. It got rid of a lot of the clutter that had annoyed me about most Gnome 2 setups. In fact, except for the fact that individual windows had titlebars, the default presentation was almost as minimalist as my Awesome setup. And I found having the ability to hit the Mod4 (AKA Windows) key and then just start typing to start an application, well, that was actually more convenient than the Mod4+F1 that I was doing with Awesome. And so forth. Basically, it seemed like with a little tweaking, I might be able to be happy and productive.

So late last week, I installed all the Gnome 3 stuff on my laptop, and started tweaking. And yesterday, I uninstalled Awesome and the things I had been using with it.

Now I'm not embracing every aspect of Gnome life. There's no way I'm going to try and manage my email in Evolution, whose interface I find awkward and slow. And I'm not likely to trade Chromium for Epiphany just yet--not until it's got equivalent JS speed, at least. And I installed a few gnome-shell extensions, and intend to install a few more. And I totally remapped the window manager keys.

But right now, I am working more within the Linux mainstream than I have, well, perhaps ever.

M
Michael Alan Dorman@mdorman

I paid only peripheral attention when it was announced on linux-kernel

But now I'm staring down the barrel of building a new box for holding a lot of media files, and suddenly, the notion of being able to expand your RAID5 array started to sound important--especially when the case I initially intend to use won't hold more than 3 drives, but I would like to be able to expand later.

As is almost always the case in the geek community, someone has documented their experiences doing just this. Its sounds extraordinarily painless. Even resizing the filesystem on-line was a no-brainer.

So, the related question is whether or not the Areca hardware-raid card I have laying around is actually capable of doing this--the data sheet suggests that it'll even convert, say, a mirrored drive pair to RAID5, but that mildly strains my credulity. I may have to actually, shudder, experiment.

M
Michael Alan Dorman@mdorman

This might be a compelling reason to really set up an asterisk box

So, I was recently in Best Buy, and noticed a Panasonic "phone system" that could interact with your Bluetooth-enabled cell phone to receive and initiate calls over your cell line transparently when it was in range of the base station.

I was deeply enamored of this idea...but they don't admit that they work with the Bluetooth implementation in Treos, and they seem to promise dire consequences if you try to use an unapproved phone. Uniden has a similar system, and it seems much more liberal, though, so all is not lost.

Except...well, then I started looking at prices. $180 for the base unit. More than $100 per handset, and we've got phones stashed all over the house.

Yeah, that's what I thought, too, no goddamn way.

And then the new Linux Journal arrived, and it's devoted to Asterisk. Now I dutifully bought the O'Reilly book on Asterisk when it came out a year and a half ago, and I read through some of it, but honestly, I haven't had the time or, really, the impetus to pursue it.

But it occurred to me a few minutes ago, "Hmmm, I wonder if Asterisk can link up with cell phones, etc., etc." Perhaps unsurprisingly, it can. I still don't know if I'm going to have time enough any time soon to monkey with it--and it would require buying some hardware (though less than one of these proprietary things would cost, at least up-front)--but it is interesting that it is at least a possibility.

And, you know, there's source code.

M
Michael Alan Dorman@mdorman

It is unreasonably fucking great

Apparently Tim Bray's Mac died. While it's in the shop, he elected to use Ubuntu on a Sun Ultra 20. His experience appears to have been positive so far, but the best line is almost certainly:

You know, this has been said a lot, but it bears repeating: Apt-get is just so unreasonably fucking great. Why aren't we using it for Solaris updates? I managed to pull together the whole witches' brew of OSS that makes ongoing go without ever leaving Synaptic. Oops, not quite true, I cruised past CPAN to get DBI and DBD::MySQL, but I'm not sure I needed to, because when I got MySQL, I saw a lot of perl-related stuff go flying by.

Which brings me to this IM conversation with Chet from early June (which I just found with Beagle, which I only just got working yesterday. It's pretty neat):

bq.. Chet Farmer: Mmmmmm, loves me some apt-get

Michael Alan Dorman: Yea, verily, it is sweet.

Michael Alan Dorman: I suspect few people know that apt, in general, was a topic of much heated debate when it was first proposed, and then later when it had hit the "it basically works" stage and was being reviewed for inclusion. Primary complaint: it was written in C__, not C.

Chet Farmer: Seriously?

Chet Farmer: I mean, C__ isn't exactly obscure.

Chet Farmer: I must admit, however, that it's been YEARS since I compiled any code I wrote.

Michael Alan Dorman: This was basically a decade ago. Hell, I will even admit that I was on the "please do it in C" side, though it was mostly because I was deeply embroiled in the early stages of the alpha port which had no reliable C__ compiler at the time.

Chet Farmer: heh. Alphas.

Michael Alan Dorman: And, indeed, the alpha port couldn't use apt for quite some time after it was available. There used to be a competing thing called...err, shit, I can't even remember.

Michael Alan Dorman: dpkg-ftp, maybe?

Chet Farmer: hell if I now

Michael Alan Dorman: I am now feeling a thousand years old.

Chet Farmer: know

Chet Farmer: not quite a thousand.

Michael Alan Dorman: The fact is, a lot of KDE people forget that back when the GNOME project was first started, using C__ wasn't just a personal taste thing, it was a "it doesn't work well on Linux" thing. Well, and there was the Qt license.

So, while you might be justified in suggesting that they should have expended effort helping with gcc development, it wasn't just a rejection of C__ on petty grounds.

Chet Farmer: "doesn't fit well with Linux?"

Michael Alan Dorman: Well, "Doesn't work anywhere but i386".

M
Michael Alan Dorman@mdorman

So, I had occasion to rebuild a 3ware RAID array under Linux

And as I had a damned hard time getting it to go, I'm noting what I did here so that it might benifit myself and others. This is using the 9.3.0.X version of the 3ware CLI software--though it says that it's for the 9500 series of controllers, it's really for any kernel after 2.6.10: the 9500 controllers introduced a new way of talking to the controller, and the driver for the 7/8000 series was retrofitted with it.

So, you had a drive fail, and you pulled it and swapped it, now you want to get things rebuilding so you feel nice and safe again.

So, all the action here is going to be within the twcli interface, which you start with something like:

william:~# ./tw_cli
//william>

If you hot-swapped the drive, you will first need to get the system to rescan and notice the new drive. If you cold swapped the drive, the act of restarting the machine will get it to rescan. To do this, you would use a command like:

//william> rescan
Rescanning controller /c0 for units and drives ...Done.
Found the following unit(s): [/c0/u1].
Found the following drive(s): [none].

So then you might look at the status of your system:

//william> /c0 show

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
----------------------------------------------------
u0    RAID-1    DEGRADED       -      -       74.5294   ON     -        -
u1    JBOD      OK             -      -       74.5304   ON     -        -

Port   Status           Unit   Size        Blocks        Serial
------------------------------------------
p0     OK               u0     74.53 GB    156301488     3JV92V3H
p1     OK               u1     74.53 GB    156301488     3JV8XXVK

So, you've got your degraded RAID-1 unit, and fook!, the stupid controller thinks you want ot use the second drive as a separate unit. What are you to do?

First, you need to delete the spurious unit. Needless to say, type carefully, and double-check everything here:

//william/c0> /c0/u1 del noscan
Deleting /c0/u1 will cause the data on the unit permanently loss.
Do you want to continue ? Y|N [N]: y
Deleting unit c0/u1 ...Done.
Now you'll see something like:
//william> /c0 show

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
----------------------------------------------------
u0    RAID-1    DEGRADED       -      -       74.5294   ON     -        -

Port   Status           Unit   Size        Blocks        Serial
------------------------------------------
p0     OK               u0     74.53 GB    156301488     3JV92V3H
p1     OK               -      74.53 GB    156301488     3JV8XXVK

Now you need to recreate that unit as a spare:

//william> /c0 add type=spare disk=1
Creating new unit on controller /c0 ...  Done. The new unit is /c0/u1.

//william> /c0 show

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
----------------------------------------------------
u0    RAID-1    DEGRADED       -      -       74.5294   ON     -        -
u1    SPARE     OK             -      -       74.5304   -      -        -

Port   Status           Unit   Size        Blocks        Serial
------------------------------------------
p0     OK               u0     74.53 GB    156301488     3JV92V3H
p1     OK               u1     74.53 GB    156301488     3JV8XXVK

Once that's done, you can tell it to attach that spare unit to your degraded RAID and start rebuilding:

//william> /c0/u0 start rebuild disk=1
Sending rebuild start request to /c0/u0 on 1 disk(s) [1] ... Done.

And, after a while, you will see something like:

//william> /c0 show

Unit  UnitType  Status         %Cmpl  Stripe  Size(GB)  Cache  AVerify  IgnECC
----------------------------------------------------
u0    RAID-1    REBUILDING     27     -       74.5294   ON     -        -

Port   Status           Unit   Size        Blocks        Serial
------------------------------------------
p0     OK               u0     74.53 GB    156301488     3JV92V3H
p1     DEGRADED         u0     74.53 GB    156301488     3JV8XXVK

Dry, boring, technical, and presented without a warranty, but I sincerely hope it helps you in rebuilding your drive.

M
Michael Alan Dorman@mdorman

Debian 3.1, "Sarge", is released

It seems obligatory that I should note this, even though I'm currently an inactive developer. Lots of people put in lots of time to make this happen, and as I sit here using a machine that is running Sarge, responsible for something on the order of 20 machines that run Sarge, I don't have much else to say than, "Thanks."

M
Michael Alan Dorman@mdorman

Brad DeLong has hypotheses about the roots of Free Software

You can read the whole thing here

In response to another article, wherein someone notes--mostly without suprise--that Linux is becoming a real contender for desktop use, Brad puts forth the following:

There are two theories about open-source. The first is that while it has always been possible for a charismatic leader to call forth immense team effort and accomplish great things by force of inspiration and example alone, such enterprises are never stable. In the long run you need either the stick of potential punishment--call it the authority of the state--or the carrot of material reward--the market--in order to maintain a large social division of labor and preserve a project across any substantial length of time. Call this process the routinization of charisma.

On this theory, those parts of open-source that will survive are those that get successfully routinized: substantial companies with big revenue flows have to say to people, "We've hired you to work on open-source, specifically Linux." Why would a company do this? Well, why was Microsoft so eager to make sure that the hardware specification for the IMB PC remained open? Anyone with a substantial market position in a neighboring segment can profit enormously from the expansion of the market that free-as-in-beer product provides. This is what IBM is doing now by supporting Linux: trying to remove or at least reduce the Windows tax on computers, and so grow the market in the business-services segment that IBM is close to dominating.

Think of it this way: Microsoft is like the late Roman Empire, IBM is like the Huns, and the Linux programmers are like the Goths. IBM's support of Linux is the analogue of the Huns driving the Goths before them to soften up the Roman Empire at the end of the fourth century.

The second theory is that it has been difficulties in communication and organization that have prevented the running of persistent, large-scale divisions of labor off of other human motives than fear and greed, but that now--thanks to the IT revolution--costs of communication and organization have dropped far enough that simple enthusiasm, curiosity, or the desire to demonstrate technical skill can attract enough part-time workers who can be coordinated enough to make meaningful contributions to an ongoing project.

It will be interesting to see what the answer is.

It is an interesting question. Despite having been on the inside of this for a long time, I have no idea what the answer is.

M
Michael Alan Dorman@mdorman

Why do they do it? (AKA avoid the Netgear WG511, Linux users)

Hardware manufacturers seem to be obsessed with rejiggering the internals of their products without putting any markings on the packaging (or hell, on the card, or even in its top-level PCI information) to indicate that something has changed. This screws Linux users on a regular basis.

The particular case in point--which I suggest you avoid--is the Netgear WG511. The original (v1) iteration of this Cardbus 802.11g card used the Intersil PrismGT/Duette chipset which is well-supported under Linux--it has a driver (prism54) that's been in the kernel for several months now and it's apparently fast and reliable.

Unfortunately, some time recently, Netgear (and apparently other manufacturers, including SMC) started using the Intersil Frisbee in these cards. This chipset, though it declares the same PCI ID (but a different "subsystem ID"), is not compatible with the GT/Duette chipset.

So, to review: the external packaging has no distinguishing markings, the card itself has no distinguishing markings, and the PCI information only indicates that it's a different "subsystem".

Avoid this card at all costs!

M
Michael Alan Dorman@mdorman

Very cool (once I figured it out)

So, I've had this Wacom tablet for a while--a couple of years now, I think. Haven't done a whole lot with it, though it's been connected into the USB hub pretty much the whole time.

Now, my desk has become a hellhole over the last few days--packaging stacked up from my new router/wireless gateway (about which more in another post), CD's waiting to be ripped, my big Thinkpad docking station--the one that has a PCI slot in it--which I think I've more or less permanently traded for the little port replicator at this point, comic books, wall-warts, you name it.

Anyway, as a result of all this other stuff being on the desk, at some point the mouse pointer that comes with the Wacom ended up getting set on the tablet--it's generally sat off to once side. I certainly didn't think anything of it.

Several hours followed in which the Trackpoint on my Thinkpad would act, um...erratically. You try and go in one direction, and it'd let you go for a bit, and then you'd be dragged back to the point you were at, or thrown off in a random direction--all sorts of flakery.

The scary part is that the only thing that really annoyed me was Firefox--tabbing through Google search results is tedious. Pretty much everything else I can (and often do) control from the keyboard anyway.

Still, the Firefox thing was a big pain in the ass, especially since I was doing a lot of googling to try and figure out why my new wireless card wasn't working (new router/gateway, remember?).

I must have rebooted thirty times, poking at various BIOS options, and trying different kernels (new wireless card, and I'd made a couple of other changes earlier in the day, and generally had too many changes in play at once) and pretty much any other possibility--however remote--that presented itself.

Finally, by this morning, I had pretty much decided that this all meant the Trackpoint was dying, which pretty much meant I was going to be getting a new notebook very soon--which is fine, I've been planning to get one since before I went to DC, and I know basically which one I want, and I should even be able to play a good game of Doom III on it.

And then I bumped the Wacom mouse, and the cursor on the screen moved. And if I moved the Wacom mouse off the tablet entirely, the Trackpoint started working again.

So I did some googling, and generally poked at things in my XF86Config-4 file--that I set up when I got the machine three and a half years ago and pretty much haven't touched since--and lo and behold, I now have the Wacom up and working when I want it, and the Trackpoint for the other 98% of the time. Just as long as I don't set any of the Wacom pointers on the tablet, I'm golden.

Now to get pressure sensitivity for the Wacom pen working in the GIMP.

M
Michael Alan Dorman@mdorman

Today is Linux's 13th birthday

Presumably this means that at some point it's going to start slamming doors, smoking dope, and shouting at us that we can't possibly understand what it's going through.

M
Michael Alan Dorman@mdorman

Careful with that axe, Eugene

So, I disabled my laptop yesterday by deleting (intentionally) the old static /dev directory--I mean, I'm using udev, which builds the thing dynamically (and really, it does a very fine job), and a comment in the /etc/init.d/udev script suggested that it could be removed.

So I did.

There was no immediate havoc, but I couldn't reboot--the moment the kernel went to hand over control to /sbin/init, init would complain that it couldn't open an initial console.

Long story short, I had to boot from a borrowed USB floppy drive (using only 1 floppy, because switching disks to load a root partition, as most rescue disks seem to do, just didn't work with the USB unit), and add /dev/null and /dev/console nodes; and that was it.

Why didn't I boot from a CD-ROM? Err, I forgot to bring it with me. I figure that if that's the only significant thing I forget, I'm doing well.

And the torrential rainstorm outside is suggesting that the CD-ROM wasn't the only thing of consequence I forgot--I have no umbrella.

Oops.

M
Michael Alan Dorman@mdorman

Updating your Treo 600 under Linux

Provided without warranty, don't blame me if it turns your Treo 600 into a pile of worthless silicon. That it didn't do it to mine is probably only happenstance.

Go to the palmOne page for the updater.

Contemplate the fact that they do not provide the .prc file you need in any format that is easily accessible to linux users.

Find a friend with a Mac to unstuff the Mac version and give you a copy of the resulting .prc file.

MAKE A BACKUP OF YOUR DATA: pilot-xfer -b ~/pilot.backup

Make sure you know what your user name (and perhaps id) is: install-user

Install the Updater: pilot-xfer -i "Sprint 1.20 Updater.prc"

Run the update utility from the application menu on your treo.

Watch all the scary warnings flash by. Quake in fear that you've just destroyed this very expensive bit of hardware. Do this for roughly ten minutes.

Once it's done, set your user name (and perhaps id): install-user -u "Your User Name"

Now, restore your backup: pilot-xfer -r ~/pilot.backup

I had the following .prc files fail to restore. Eyeballing the list, none look problematic--in fact, I like the idea that this might have lightened the load of non-native code. Only time will tell:

Net Prefs.prc
HsSysResource68K.prc
City TimeCiAa_appl_a68k.prc
Address Bookaddr_appl_a68k.prc
ActivationHsAc_appl_a68k.prc
ButtonsHsBt_panl_a68k.prc
TexterHsCh_appl_a68k.prc
DefaultAppsHsDH_panl_a68k.prc
DisplayHsDs_panl_a68k.prc
HandangoLauncherHsHL_appl_a68k.prc
KeyguardHsKg_panl_a68k.prc
PhoneHsPh_appl_a68k.prc
CalculatorHsPr_appl_a68k.prc
SoundHsRN_panl_a68k.prc
HSTraceDatabaseHead.pdb
Card Infocinf_appl_a68k.prc
BatcamBcam_appl_a68k.prc
IOTAIota_appl_a68k.prc
Date Bookdate_appl_a68k.prc
Digitizerdigi_panl_a68k.prc
Date & Timedttm_panl_a68k.prc
Formatsfrmt_panl_a68k.prc
Generalgnrl_panl_a68k.prc
Launcherlnch_appl_a68k.prc
Memo Padmemo_appl_a68k.prc
Connectionmodm_panl_a68k.prc
Networknetw_panl_a68k.prc
Ownerownr_panl_a68k.prc
Preferencespref_appl_a68k.prc
Securitysecr_appl_a68k.prc
Welcomesetp_appl_a68k.prc
ShortCutsshct_panl_a68k.prc
Get BCS7DL_appl_a68k.prc
To Do Listtodo_appla68k.prc

M
Michael Alan Dorman@mdorman

What to set on my IBM T22...

...so that I will get actual ACPI?

I played around with my laptop this morning, after I got back from dropping Anne off at work (she took her car in for service today).

I installed the HostAP driver for my wireless card, as opposed to the orinoco driver that I'd been using--it almost works, but I think the problems may not actually be driver problems--as well as an updated ALSA driver, which has shut up a cosmetic message.

I compiled a kernel with ACPI, which is supposed to be the great APM-killer/cure for bad BIOS'. Unfortunately the ACPI tables seem to give the ACPI code indigestion, so it doesn't actually enable itself properly.

That's probably why the PCMCIA slots on my laptop don't work, while those on the docking station do. Oh, well, at least the ALSA and HostAP stuff look OK. More as I know more.