This one is pretty cool – fuser identifies the process id of any processes that are using a specific file or filesystem. This is something I need frequently on Windows when debugging service or multi-user tests. Invariably there will be a race condition that is causing cleanup to not succeed because the cleanup thread has gotten ahead of the app or test thread(s). When that happens the cleanup thread is unable to move or delete log files, temp data, etc.

I’m left wondering who had the file open. There are many ways to find this but I normally use a SysInternals tool to check which process has the open handle. Problem is this isn’t easy to automate so by the time I’m looking for the file lock it’s already gone.

Using fuser I can add this functionality right into my test suites.

To test fuser I performed a more operation on a file in my home directory and left the more process blocked with the file open. That command was:

username@desktop:~$ more menu.lst

In another terminal window I then executed:

username@desktop:~$ fuser -u menu.lst
menu.lst:             5829(username)

So process 5829 being run by the user “username” has the file menu.lst open.

Now I can use ps to figure out what command that user is running (and on what tty).

username@desktop:~$ ps 5829
5829 pts/1    S+     0:00 more menu.lst

I think I need to try piping all of that together into one operation.

One goal of installing Ubuntu is to help ease my wife and kids onto it – not to create a huge problem with the family. After the Ubuntu install the default boot ed OS was Ubuntu – not Windows. That’s going to be a problem.

So I went on a mission to figure out how to change the boot order to load XP by default.

I knew that Ubuntu was using the GRUB boot loader. I wasn’t familiar with GRUB so I don’t know why I knew this – it must have been stated during the install sometime. But anyway – I knew it was GRUB.

I Googled for “change GRUB boot order” and the first hit was exactly what I needed. I needed to edit /boot/grub/menu.lst.

I copied the file into my home dir and used chmod (it’s been so long since I’ve used a *nix CLI that I had to lookup chmod – I knew it was “ch” something) so I could write to it then opened it in xemacs.

I simply copied the XP settings ahead of the Ubuntu settings in the item list and left everything else the same.

The relevant parts of the original menu.lst were:

—————————- /boot/grub/menu.lst —————————————-

default 0
timeout 10

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin


# This is a divider, added to separate the menu items below from the Debian ones.

title Other operating systems:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1

title Microsoft Windows XP Home Edition
root (hd0,0)


I referred to the online GRUB manual ( and confirmed that the “0” in default was the list item to boot by default (zero-indexed) and that if it were changed to “saved” the previously loaded item with a “savedefault” entry would be used. I didn’t want that. I want it to boot to XP by default regardless of what I used most recently.

I had two choices – change the default value to 4 (the menu divider is an option as well) or leave it at 0 and reorder the items.

I decided to reorder the items for one reason – I want the top menu item to be the default because that is how my family will expect it to work.

There are some notes about an automatically generated section that could be over-written so I did back up the file before making the change and I decided it was worth the hassle of losing the customizations I made (and possibly the Window’s item) to make it work the way we need for now. I don’t plan to change it often.

So I simply moved the XP section to the top, moved the divider below it, saved the local copy and copied it over the original.

Rebooting brought up XP after a 10 second delay – just as I had hoped.

Note – I reverted the changes and used a simplier approach that kernel updates won’t overwrite.

I will admit I am basically ignorant about Linux.

I attended a unix-centric school. We focused on BSD, Solaris and even a few NeXT boxes in the “ACM lab” (i.e. where the compsci majors hung out). I was an admin on several servers and helped keep the place running. I’m familiar with vi and xemacs, gnu development tools (make, gcc, gdb, etc) and the like. But I don’t think that this is like riding a bike. I’ve forgotten most of it.

For all intents and purposes I’m starting over.

But I know enough to know that there are lots of flavors of Linux some of which are appropriate for my needs and many of which are not.

So here’s what I need:

  • It has to look pretty. My wife and kids are going to use this and they aren’t going to accept something that looks worse than XP.
  • It needs to be from a large and stable development group that has a development timeline with concrete future milestones. I don’t want Vlad’s K-Rad Linux Distro. If I walk into B&N and don’t find at least 5 unique titles focusing on that specific flavor then it probably doesn’t not meet this bar. When I make the decision I will buy the books I need. Usenet and forums are a last resort.
  • It has to support my hardware. I’m not buying new hardware for this (ok – I might be convinced to buy a secondary hard drive).
  • It has to play friendly when dual-booted with XP. I can’t abandon Windows entirely. Smartcard authentication to the work VPN will require Windows.
  • Their official website has to give me a good vibe.

Those demands don’t seem unreasonable – in fact they seem pretty lightweight. I suspect I will have too many choices.This is my process using the filters I defined above.

Filter: Book Store Shelves.

I loaded the kids into the car and we went to a local B&N. They went into the kids section and I went into the computers section. There was roughly 40 linear feet of Linux titles so this feels like a good sampling (by comparison there was only about 20 linear feet of Windows-specific non-development titles).

There were distro-specific titles on Red Hat, Fedora, Ubuntu, SUSE, Knoppix, and Debian. The number of titles was in the order shown.

Filter: Big and Stable team

They all meet this bar. The commercially supported distros probably have a slight edge here but not enough to make a meaningful difference to me.

Filter: Dual boots well with XP

They all meet this bar.

Filter: Looks Pretty

This one is all about gut feel. I’m basing it mostly on screen-shots from the primary website and on the website itself. – A link at the top of the page links to Fedora. Apparently Fedora is the RH sponsored free Linux distro. Since Fedora is already on the list I’m removing Red Hat from contention. – Clean and simple – and a wiki (bonus points). They have a release timeline linked from their front page and the screen looks very XP-ish. Still in the running. – clearly geared towards developers. It’s a no-nonsense textual brain-dump of all-things-Debian. It has a complete lack of flair and is missing screenshots. I searched for “screenshot” using their Google-based search and found only some poor looking Chinese translation shots. Perhaps Debian is so good it stands on it’s own without screenshots but I need them. Sorry Debian, but you’re off the list. – Looking better than Debian and I see it’s a Novell project. Not sure what I think of that. What turned me off though was this – the Tasks page references Google Summer of Code 2006 and indicates that after 2006 selection is done they will update with more info. Well. It’s done. If they can’t keep their top-level pages current that is a red flag to me. It’s not off the list but it just fell to the bottom of the stack. – perhaps the most annoying all the pages. Moving the mouse brings up intrusive JavaScript tooltips and the header menu bar shows an alarming lack of English. Sorry – but if your website can’t speak in my language then you’re falling off the list. – Front page looks fine. Look – a link to “Desktop Edition” right on the front page! And one that is a screen shot. These folks get it. They talk about their release schedule. Have close-up shots to show UI behaviors and the page is in English. This one just floated way up in the stack. In fact – openSuSe just got dropped because of it.

So now it’s down to Fedora or Ubuntu.

The pluses for Fedora include corporate sponsorship, I have a good friend who I first met while he was wearing a fedora so that makes me feel warm and fuzzy, I know how to pronounce it and it is a name I was familiar with prior to today.

The pluses for Ubuntu are a slick looking website that showed me what I wanted to know, great looking screen shots and UI closeups, a unique name I don’t understand (and am not sure I am pronouncing right) and I remember thinking that the Ubuntu books looked interesting – even pulling a few off the shelf to browse. I did not touch a single Fedora book.

So after about 6 hours of total process (including drive time, lunch, typing this blog post and trying to figure out where my cell phone was when it started beeping) – the winner is Ubuntu.

If for no other reason then it seems cooler than Fedora. More hip. But still well supported.

Step 1: complete.

“When did I stop being creative?”

The words stumbled out of my mouth leaving behind an aftertaste of shame and contempt. It wasn’t that long ago that I still wrote and drew and played music for fun. It wasn’t that long ago that I always had a pet project going on. Helping on an open source project or helping a non-profit get setup on repurposed systems. But sometime in the recent past, and I really couldn’t put my finger on when, that stopped.

Lately that has been bothering me. Quite a bit, actually. Keeping me up at night wondering at what point these things that had been so meaningful to me just a few short years earlier were suddenly out of my life entirely.

The last time I played the piano was to prove the movers did not break it. The last time before that was almost 2 years earlier. I can’t even tell you the last time I drew anything that was not on a whiteboard, or wrote something that did not contain the word “specification.”

When did my life become so devoid of passion that my only pet projects involved lawn care and programming the DVR?

My wife paused. Lifting her head she stared at me from across the table and in a sympathetic tone, without a trace of condensation or sarcasm, she said “About six years ago.”

My gut reaction was to ask what happened six years ago? What emotional trauma had been inflicted upon my psyche that I abandoned those things that made life special and settled into this tomb of stagnation?

But to even ask would be an obvious defensive mechanism. Denial.

It must have been a slow bleed because I did not notice until about 6 months ago. I was unpacking a box and found a collection of old stories and drawings. Hundreds of pages of stories and poorly drawn pictures. Scores of decidedly amateurish music. Stacks of demo tapes recorded before I realized that my lack of raw talent really would prevent me from going big time. Code snippets from a diku patch I had done for a friend’s mud. Folded print outs of man pages and DNS configuration information for a local church whose token ting network I helped deploy just because they needed the help. Stacks of books I had once treasured. K&R. Stevens. Aho. Stroustrup.

How had I gone from being a hyper-prolific creator of mediocre compositions and altruistic deeds to this? This life where the thought of writing code after hours sounds like punishment and where personal time not spent producing product for my employer seemed wasted.

What was able to drain the marrow of life from my body and leave only hollowed-out shell of the man who once occupied this space?

Six years ago I began working for Microsoft.

The ways I thought about my time changed. How I thought about my career changed. How I thought about my place in the world changed.

Not all for the worse. Microsoft truly is a great place to work if you find the right people and projects. Contrary to popular belief – my day is not filled with meetings where we brainstorm the various new ways to thwart open source development or scare customers. It’s filled with thousands of people who truly believe that they are doing the right thing for the customer and who want nothing more than to deliver the absolute best they can (within the limits of time, resources and politics). Good pay. Great benefits. Smart people.

But there is another side to Microsoft. The side that has held my hand, shielded my eyes and who I allowed to slowly lead me down this path.

The side where you aren’t given time to be creative or perform research that does not address an immediate work item on your schedule. Where you are discouraged from thinking about things other than what is right in front of you at that moment. Where you have 6 weeks to do 16 weeks of work. Where months of hard work can be thrown away because the lawyers won’t let you ship it even though the customers are screaming for it (talk about getting punched in the gut).

The good must outweigh the bad. I don’t want to quit. I want to fix my little corner of the world and teach others to do the same. But I need to start with myself.

Today I am reclaiming a small part of who I once was.

Today I’m starting a pet project. The first of what I hope is many to come.

Moving my family computer from Windows XP to some form of Linux. A symbolic gesture more than anything – but one that will force me to do those things I so sorely miss.

Perform research.



Take action.



Enjoy the results.



[I have added a few additional thoughts on this post]