Archive for December, 2006

Prepping a 128 MB USB Thumb Drive to Install Debian Linux

Monday, December 25th, 2006

Some months ago, I upgraded my main workstation. I had reached the point where if I was going to upgrade one component, I had to upgrade them all. This left me with my current new machine and my old machine which was fairly complete and still reasonably powerful. Rather than have a completely assembled computer gather dust in the corner, I decided that I needed to install some kind of operating system. I chose Linux because it was freely available and, well, I like a challenge.

My only problem was that my DVD-ROM drive gave up the ghost long ago and I didn’t have a spare to replace it. It occurred to me that since my old computer supported booting from a USB device that I should be able to get the computer booted and the install process started.

This worked out so much better in my head.

I found several guides on how to create a thumb drive capable of booting, but the problem is they all require you to already have Linux installed in some fashion before you can do it, which I didn’t.

I was moderately successful with installing DSL to a thumb drive, which was neat, but that’s not what I really wanted.

I eventually settled on Debian Linux. I had used Debian for years to power this site before I switched to dedicated hosting this summer, and quite liked it. Also, it was the only distribution that I could get to work with this method.

Installing Debian Linux From a 128MB USB Drive

What you will need:

  • 1 128MB USB Drive (although if you use something bigger you will have more options)
  • 1 Debian install image
  • boot.img.gz
  • 1 Knoppix disc

Downloading the software

For this method, you will need to put some files on your thumb drive to not only start the computer, but to initiate the install process. Debian’s install manual tells you that you will need to download “hd-media/boot.img.gz”, but doesn’t tell you where to get it. I was able to find that file here,
and it will be in a similar location on your favorite mirror. You’re also going to want to download an install image so your computer will have something to do when you start it up. Since I’m working with a 128MB drive, I decided to go with the Business Card .iso. It weighs in at about 40MB and is just big enough kick off the install. If your drive is bigger, you might want to consider going with the Network Install, but it’s not strictly necessary. I saved these in the root directory of my hard drive, to make them easier to find. Both images can be found here.

Next we need a Linux environment to prepare the USB drive. I decided to go with Knoppix for this, primarily because I had already created a Knoppix CD recently to check my laptop’s Linux compatibility (but that’s another article).

Next, put the Knoppix CD in the CD/DVD drive of your computer and reboot. When the Knoppix boot menu appears, type in “knoppix 2″ so we boot into text mode. No sense in loading the entire disc when we just need the text interface.

boot: knoppix 2

Once the boot process has finished and your USB drive is plugged in, you should now find that a mount point has been created for your drive under “/mnt”

cd /mnt

The drives that Knoppix has detected and set up will be listed here. I am using serial-ATA on the machine that I was using to prep the drive, and that showed up as /mnt/sda1 while the USB drive showed up as /mnt/sdb. It is VERY IMPORTANT that you know which drive is your USB drive and which drive is your data drive. A quick test by removing the USB drive showed that /mnt/sdb disappeared, and reinserting it caused it to come back.

Next we need to mount our existing hard drive onto our file system. Replace “sda1″ with whatever your hard drive was detected as.

mount sda1

This will put your existing hard drive in the directory structure. Now we need to navigate to our downloaded images. You will need to change this path to wherever you stored the images.

cd sda1/debian

Now install the boot.img.gz file. It is VERY IMPORTANT that you replace “sdb” with whatever Knoppix detected your USB drive as. This will IRREVOCABLY ERASE EVERYTHING on the target drive. Double check it, and then check it again.

zcat boot.img.gz > /dev/sdb

This could take several minutes. I was given an error that there was not enough free space on the device. I ignored it, and suffered no ill effects.

Once that process is completed, we need to mount the USB drive into the filesystem, substituting the device for your thumb drive for “sdb”.

mount /mnt/sdb

Then copy your install image to the drive.

cp debian-31r4-i386-businesscard.iso /mnt/sdb/

Once that’s complete, unmount the USB drive before removing it from the system.

umount /mnt/sdb

You have now prepared a portable, bootable, Debian Linux Installer that you can wear around your neck.

To restart your Knoppix system just type in ‘reboot’, remove the CD when prompted, and hit Enter when prompted.


Now put your USB drive in the computer you want to install Debian on. Make sure you set in the BIOS that you want to boot from your USB device. Some motherboards (mine included) won’t boot from the USB drive unless you also turn on ‘USB Keyboard Support’, so ensure that’s turned on as well. Once you’ve verified that the settings are correct, reboot and you should be greeted with the Debian installer. Unfortunately, going through the install process is beyond the scope of this article. If you need help with that, I would suggest looking at the Install Manual or nosing around in the forums.


Friday, December 15th, 2006

It’s the Holy Grail of advertisers everywhere, a hype machine that can be started with a pittance and then will run itself, generating an enormous amount of what is known in the industry as ‘mind-share’. What could I possibly be talking about? Why, the latest way devised by marketeers to separate you from your dollars: viral marketing.

So, what exactly is viral marketing? As always, the Wikipedia has a decent writeup, but it can be pretty well summed up like this: a marketing campaign designed to take advantage of such powerful forces as word-of-mouth advertising (or other social networks), which will in turn generate ‘buzz’ and ultimately sales.

To illustrate, let’s think back to any Ron Popiel infomercial. (Incidentally, infomercials are just about the most entertaining form of television there is.) Ron will spend the majority of the show detailing what amazing things his new product can do. Toward the end of the show, Ron starts knocking down the price of the item from whatever crazy level it started out at to something that, by comparison, is ridiculously cheap. Right before he gives out the ‘final’ price, he asks the consumer (that’s you!) to do him a favor: if you promise to tell a couple of friends about the amazing deal you just got, he’ll take even more off the price.

Now, what just happened?

First, you watched the half-hour (or more) advertisement. An advertisement that probably showed some product doing something that was genuinely amazing, or that simplified some mind-numbing or labor-intensive task. That likely stuck in your mind, and even if you don’t buy the product odds are good that you’ll remember about the knife that could cut through the head of a hammer and still slice a tomato with ease. When the commercial comes on again you might even get a friend to watch it.

Next is the matter of price. Let’s be honest with ourselves here, Ron went into that studio knowing full well what the price of his Amaze-o-product was going to be. He started ridiculously high and worked his way down through all the prices that ‘you aren’t going to pay today’ until he got to his ‘final’ price to make it sound like he was giving you the deal of a lifetime. Then he makes you the deal: tell two people about the product and he’ll take off some more dollars. Ron has created the perception that he is giving you a discount in exchange for you advertising his product for him.

There are two key ideas at work here: the commercial itself, and you telling two of your friends.

The commercial itself, is not viral. It’s just a half-hour message about the product delivered directly to you. This is known as ‘Direct Response Marketing’. If, however, you tell friends that they have to watch this commercial because of some super-amazing thing that the product can do, that begins to be viral and is closely related to ‘telling two friends’.

When you agree to ‘tell two friends’, you’re using your personal social network to increase awareness of the product. If you buy the product and tell two friends, and they tell two friends, and they tell two friends, you can see how quickly the information can spread, almost like a virus, and in short order you have throngs of people that are clamoring to buy the product who may have never even seen the original ad.

So, what does this have to do with anything?

Social networking on the Internet has exploded on the Internet in recent years. Sites like Myspace, YouTube, Orkut, Friendster, and the entire Internet itself are all places where potential consumers get together and pass links, videos, games, and pretty much anything they find interesting around. This can result in some Internet phenomena becoming wildly popular and pervasive through nothing more than electronic word-of-mouth advertising.

Marketers want to harness this power.

Marketers can be a sneaky bunch when they want to be. They’ll slip in an ad when you least expect it in their attempt to part you from your dollars. They will create ads that don’t immediately look like ads. The tricky part of making something viral is making something that people are going to want to pass around. What’s likely to be passed around? Given the nature of the Internet, it’s almost impossible to know. That doesn’t mean that you can’t try and get the word of mouth started yourself.

This can be successful (see Subservient Chicken) if done well. If done poorly, however, it could actually be damaging.

Which brings me to Sony’s latest attempt at viral marketing, All I Want For Christmas is a PSP(the site has been deleted as of today). Before the site vanished, it portrayed itself as ‘your own personal psp hype machine, here to help you wage a holiday assault on ur parents, girl, granny, boss – whoever – so they know what you really want.’ The site hosted ridiculous videos, ads to print out, PSP-oriented blog entries, and the whole bit to make it seem like there were two guys who created a website just to help you tell people that you wanted a PSP for the holidays. They even had people go to the forums of popular gaming sites and plant links back to the ridiculous videos and the site. There were no indicators on the site that it was backed by a corporate entity, but suspicions abounded. It was quickly discovered that the site was indeed faked. The site has now vanished and the FTC beginning to investigate these techniques.

Which makes sense to me, really. I like knowing that what I’m seeing or hearing is an ad. In fact, I think that you and I both deserve to know what’s real and what’s manufactured. If someone tells me that Vess Black Cherry soda is delicious I need to know if they’re telling me this because they actually believe it’s delicious (which it is), or if they’re getting paid to tell me that it tastes like Carbonated Happiness (which I’m not).

I understand that advertising is integral to the longevity of many businesses in the world. No advertising would lead to decreased awareness, decreased awareness would lead to less sales, less sales would lead to less profits, less profits would lead to less development of new products or technologies, and if profits dipped low enough companies might cease to exist. I just don’t have to like how it is attempting to saturate every experience of my life.


Tuesday, December 12th, 2006

Today I’ve fixed an annoying little bug, which should make commenting on things that much easier.

I’ve also gone through and culled all the users who’ve registered for accounts but:

  • Never logged in
  • Had their registration email bounce back to me or
  • did nothing but ‘spammy’ things.

If you think that I deleted your account in error, feel free to contact me.

Grace Hopper

Sunday, December 10th, 2006

Back when I was in college I had to take two of the offered programming languages to complete my degree. Given the options, I decided to make one of them COBOL. COBOL is a high-level programming language, which means that the code that the programmer puts into the computer looks a whole lot like words and sentences rather than symbols and abbreviations that might be difficult to understand. The goal being that the programs should be easy to read, easy to write, and easy to fix.

COBOL was developed all the way back in 1960 in part by a lady named Grace Hopper who, if she were alive today, would be celebrating her 100th birthday.

In honor of her centennial, I’ve decided to pull out some of my old programming homework to share with the world. This code came from an actual program that I wrote. Since I’m fairly certain that the teacher that gave me this assignment still uses this same problem/assignment, I probably shouldn’t post the whole thing. Plagiarism, you know.


*     DETAIL LINES, AND READ THE NEXT RECORD                  *






Yep, that code up there has some flaws, but it gets the job done. Briefly:


Increments a counter.


Looks at the record currently in memory. Increments one of two counters based on the value of EMF-EMPLOYEE-PAY-TYPE-03. Why “N” is used for hourly employees and “S” for salaried, I’ll never know. I also forgot to put in what happens if something other than “N” or “S” is in there. Whoops.


Makes U100-PRINT-DETAIL-LINES print one detail line.


Reads the next employee’s record from the file.


Stops the module.

Aaah, you can just smell the geekery!