The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, June 25, 2002

But it was possible …

The other day Rob comes into my room. “I need some help,” he said. “I made a mistake on my Sun box and I'm wondering if you could help me.”

Turns out Rob renamed a critical directory (/usr) and not only were most of the commonly used programs stored under it, but so were all the runtime libraries used by these commands, so nothing would run except for a few statically compiled programs (programs that contained the libraries they needed inside themselves). Nothing but the shell, mount, umount and fdisk were available.

Now, I'm used to recovering with minimal commands but there was no way to rename a file, or change its permissions.

Heck, we were worse off than those in the classical Unix horror story. Had I known SPARC assembly and how to call the kernel for Solaris 7, then yes, we might have had a chance. Create the smallest binary to either create a directory, or to rename a directory, and we'd be set. While it seems hard to create a file without the normal commands one usually uses for such a task, echo is a shell built-in, and using that with redirection and the ability to specify arbitrary octal constants (with the “\nnn” notation supported by the shell) and you have your program.

Okay, so you can't change the permissions on it, so pick some file you no longer need with execute permissions and write over that, then you'll be able to execute the hand-written program to get back into business.

Granted, that's if either of us new SPARC assembly and the executable format.

Since neither of us did, there wasn't much that could be done.

Well, maybe mounting the drives on another Solaris box, but Rob really didn't care all that much since we was planning on reinstalling Solaris on that system anyway.

But it was possible …

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site:, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.