Categories
Design Meta Technical Web Design

Favicon update

To keep your bookmarks and RSS feed favicons looking shiny, I changed the onpaws.com favicon again. I was getting tired of the crusty current one which I made on a whim one day:

Passable at 64×64, but it always looked crummy at the more commonly seen 16×16:

After becoming intimately reacquainted with the various ways to disable Photoshop’s on by default selections and fill anti aliasing, I started with a 16×16 canvas this time, using the pencil tool and as per usual keeping the background transparent. This was a candidate:

But I’m happy with this new one for now- it retains the motif of circle + ‘p’ descender from onpaws -> op.

What do you think?

Categories
Technical

Recovering a deleted MBR partition table (ext2/ext3)

This post is originally from April 2007 and never got published. Here’s hoping I’ll never have to use it again. ~paws

Take a deep breath and relax. This is not bad luck. This is God’s retribution for your failure to back up your data. You are a bad person and you deserve this. Fortunately, there is a way for you to spite the will of God and recover your data anyway. Unfortunately, acts of contempt in this class usually require nerves of steel, and this stunt is no exception. Here is what you do:
Make a partition that is at least as big as your first partition was. You can make it larger than the original partition by any amount. If you underestimate, there will be much wailing and gnashing of teeth.
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-23361, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-22800, default 22800): 13032

Command (m for help): w

Run dumpe2fs on the first partition and grep out the block count
Example:

% dumpe2fs /dev/sda1 | grep “Block count:”
Block count: 41270953

If you are uncertain about this value, repeat Step 1 with a bigger partition size. If the block count changes, then you underestimated the size of the original partition when you made your first guess. Repeat Step 1 until you get a stable block count.

Remove the partition you just created
Command (m for help): d
Partition number (1-4): 1

Make a new partition with the exact size you got from the block count. Since you cannot enter block size in fdisk, you need to figure out how many cylinders to request. Here is the formula:

(number of needed cylinders) = (number of blocks) / (block size)

(block size) = (unit size) / 1024

(unit size) = (number of heads) * (number of sectors/cylinder) * (number of bytes/sector)

Consider the following example, where a hard drive has been partitioned into four primary partitions of 1, 2, 4, and 8 cylinders.
disk /dev/sda: 16 heads, 63 sectors, 23361 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 2 976+ 83 Linux
/dev/sda2 3 5 1512 83 Linux
/dev/sda3 6 10 2520 83 Linux
/dev/sda4 11 19 4536 83 Linux
fdisk provides the configuration information I need in the head of the output.

The unit size is 516096 ( 16 heads * 63 sectors/cyl * 512 bytes/sector ).

The block size is 504 ( 516096 / 1024 ).

The number of needed cylinders for the second partition is therefore 3 ( 1512 blocks / 504 ).

The partition table shows that this is indeed the case: the first cylinder is 3, the second 4, and the last is 5, for a total of three cylinders.

The number of needed cylinders for the third partition is calculated similarly: 2520 blocks / 504 = 5, which corresponds to 10 – 6 (plus one, since we are counting the 6th through the 10th cylinders inclusively).

Notice that this calculation does not work for the first partition because the block count is wrong ( 976 instead of 1008 ). The plus sign indicates that not all the blocks are included in the fdisk value. When you try the calculation ( 976 / 504 ) you get 1.937. Knowing that the number of cylinders must be an integer, you can simply round up.

Run e2fsck on it to verify that you can read the new partition.

Repeat Steps 1-5 on remaining partitions.

Remount your partitions. Amazingly, all of your data will be there.

Credit for thinking of this strategy goes to Mike Vevea, jedi sys admin and MGH’s finest.

Categories
Technical

Wherein I tirade about the hardware behind onpaws.com

One of the things I haven’t mentioned before is the exciting history of onpaws.com. The progress has steadily slid from lame, slow hardware to unreliable hardware to the current oldie…not to even mention the constant drop in hosting quality. However, many things about it have been free, and even educational. The benefits significantly outweighed the cost, so I still win. :)

Someday when I get money to spend on this kind of thing, I’ll get real hosting for onpaws.com. But in the meantime, I can rest happy knowing I’ve spent a total of ~$57 on the hardware running this website, and $0 on hosting. Not too shabby for a midnight side project.

Here is your length warning; this is a really long post. Like the rest of onpaws.com, I’m writing for myself first and everyone else second.


Long ago on a cold winter late night journey in the hallways of CSH, I found a bunch of junked old hardware lying around unused. Somebody had given up on their motherboard because they couldn’t get it to recognize HDs, which I fixed by removing/replacing the CMOS battery. I found some old RAM in a pile, a discarded network card from another room, and got a new 160 GB Seagate to boot from. Everything got slapped together in an old beige case.For my toils, I ended up with a 700 MHz Pentium III with 256 MB of RAM. Not bad for a web server, eh? It ran on CSH’s network, enjoying that nice uncapped university upload speed, until I returned to school. A CSH member requested I move the server to my new apartment, which meant a significant drop in upload speed. Boo #1.This server ran the site until last October when the memory controller suddenly died a sad, slow death. onpaws.com would randomly crash, and nothing about it was reproducible. Boo #2. Thus, the hard drive moved to my roomates unused extra computer, which as I recall was an old school Pentium 4 with 512MB RAM. Sweet upgrade…but short lived. My roomates main computer chose this moment to die, which necessitated him using the one hosting onpaws.com. Boo #3!

I then started my internship with the big software company everyone loves to hate, and moving across the country meant getting settled in an entirely new place. onpaws.com was put on hold while I got moved into a new house with new roomates and circumstances. This is why there has been such a long downtime. Sorry to my dedicated readers. (Do I have any?)

Currently, sweet new hardware turns the onpaws.com gear:
Pentium 1 133 MHz
64 MB RAM
1 GB HD IDE
833 MB HD IDE
Ethernet+BNC+something weird card
SoundBlaster 16
Generic Modem

I found this hot-hot-hot piece of computer ass next to a dumpster on the day I moved out of my corporate sponsored apartment. It was running an old copy of Windows 98 with some weird assortment of dance software that didn’t work. Desperate to get any kind of working solution I sucked it up and took her home. Plus, my masochist-in-residence enjoys playing with this stuff.

Getting anything interesting installed on this speed demon proved to be an adventure. I’ve never had to install an OS on a computer from the pre El Torito days. (That means the computer couldn’t boot from a CD – it’s floppy, HD, or the highway, baby.) Since nobody had a floppy diskette in the house, and I was definitely not going to actually plunk down cash for one, I had to transplant the HD into my existing desktop.

The stupid tower has half a motherboard inside and the other half on a case door. Incredibly awkward construction, unfriendly to the enterprising sort (me). Not to even mention the sharp edges.

Anyway, I managed to switch the drive and get a Debian base going on it via my El Torito-capable desktop. While I’m a Gentoo luser this box certainly doesn’t have the oomph for compiling any source, so this is my first Debian install. I’m sorry to say I’m not a huge fan so far, but its mostly because I’m used to Gentoo’s little quirks. Packages definitely install noticeably faster on Debian though. I swapped the drive back once Debian base did its restart, crossed my fingers, and success! Surprisingly, the kernel booted; I only had to modprobe the right networking driver and we were in business.

The next part was actually getting it to serve pages. I was going to go LAMP + WordPress like before, but after all was installed, the 5-6 second front page load just wasn’t cutting it. I’m using something a lot more lightweight: lighttpd+fastcgi+php5-cgi+mysql5+Nucleus.

Page loads are down to about 3 seconds here, and while they probably won’t get any better, but they’re a ton better than they could have been.

The future of onpaws.com involves dedicated hosting, but this requires dedicated $. Things will eventually get better, so please bear with me as the changes happen.

Categories
Technical Visit This Site

One last bedtime read

This guy gets it exactly right. The complete freedom behind the Internet is exactly what makes it so appealing, and I truly hope it stays that way forever.

Categories
Design Interface Technical

that clover flower pinwheel command thing

Today the spotlight slides onto the history of early user interface design.

A certain Steve Jobs some time ago mentioned the history of fonts on the Mac at the Stanford Commencement 2005 speech. Rumors of Jobs’ insatiable egoism notwithstanding, he laid claim to the existence of font technology on all computers. Of course, he didn’t actually design the appearance of the fonts so much as facilitate their implementation on the Mac. The initial design work was left to Susan Kare.

Susan Kare certainly has carved out her place in the annals of user interface design. Fortunate enough to design the well-made icons for the original Macintosh, she probably contritubed more than anyone could truly foresee to the popularity of computers today. Icons were a daring metaphor in a 1980s world of “serious” text and terminals, but the risk was well worth the reward. Ask any computer user today how legitimate icon-based interfaces are and you’ll always get the same affirmation. Everyone simply likes pretty things, and even more so when they help them get things done in an intuitive way.

Kare’s font credits include Monaco and the nostalgic original iPod font (originally “Elefont“, now known as the demised Chicago) Command Key flower. Kare even worked for Microsoft too on early versions of Windows.

P.S. Mac still has a few cool quirks with its typography engine (checked up to 10.4.2). Try opening up TextEdit, switching to the Zapfino font, and typing…”Zapfino” of all things. Cool.