Blog Fiasco

July 3, 2009

The simple games

Filed under: Uncategorized — Tags: , , , , , , — bcotton @ 9:54 am

Last weekend, I let myself get talked into buying Guitar Hero.  Granted, it didn’t take a lot of convincing.  My wife and I spent about 10 hours playing that first day and a half.  While it was fun, it was also really frustrating.  You see, I have no musical talent.  At all.  I have no concept of rhythm and I can’t carry a tune in a bucket.  So the whole time I’m playing, I’m getting a constant reminder of how awful I am.

It doesn’t help that the “Easy” mode on the drums is total crap.  With the guitars on Easy, you only have three of five notes that you have to play.  On the drums, even with Easy, all six notes are presented.  Granted, the speed is generally slower, but it is still a lot less Easy than it would have you believe.  After a bit of trial and error, we determined that playing the bass on Easy is within the range of my abilities.  When I know the words, I can do okay on the singing parts though, as long as you don’t listen to me.

When we weren’t rocking out with the Guitar Heroes, I got out my old Sega Genesis.  In the past week, I’ve played about 10 games of World Series Baseball.  Man oh man, do I love that game.  Really, its the simple games that I enjoy the most.  The games I play the most often on the computer I have to play via DOSBoxCommand HQ and Sub Battle Simulator are games that I’ve played since before the Windows 3.1 days.  My Sim Citying hasn’t gone past Sim City 2000 (okay, I did play Sim City 3000 for a while, but it got complicated.  I hear Sim City 4 is the best of all worlds, but I’ve never tried it).

Sub Battle Simulator was probably the first computer game I got into.  It cost $5 at Target and came on a 3.5″ floppy.   I spent hours playing it when I got home from school.  When I went off to college many years later, I found a newer submarine game:  Tom Clancy’s SSN.  It was a fun game, but it was a lot more realistic than Sub Battle Simulator.  Too realistic, in fact.  I couldn’t do everything fast enough to keep up with the game.

Kids these days with their crazy, complicated games.

July 1, 2009

Making a bootable USB drive for Linux

Filed under: Linux — Tags: , , , — bcotton @ 10:00 am

There may be no such thing as a free lunch, but I am a firm believer that there is such thing as a free thumb drive.  The other day, a vendor rep showed up unexpectedly at my office for a quick chat.  He gave me his business card and a USB drive with some information about his company, Silicon Mechanics.   The thumb drive was only 512 MB, so I copied the information he gave me and decided to create a disk that I could use to boot several different OSes on.

I generally use Knoppix as repair/investigation platform, but the default size was a little big and I didn’t feel like re-packaging my own (perhaps down the road I’ll play with that and write a post about it).  Instead I opted for Damn Small Linux (DSL), which is Knoppix-based (thus Debian-based) and weighs in at a mere 50 MB.  In addition, I also wanted to be able to boot the installer for Red Hat Enterprise Linux so that I wouldn’t have to burn a new CD every time I lost my old one.

The first step is to make the USB drive ready to rumble.  There are several different ways you can go about this, but I’m going to pick using SYSLINUX, which requires a FAT (DOS) partition.  One reason for using this method is that a pre-packaged DSL bundle is available for it, and the Red Hat media includes SYSLINUX config.  The other reason is that FAT partitions are pretty widely supported.  I can use the drive on Linux, Solaris, Mac OS X, and Windows without having to install any extra drivers. Using FAT also gives you another choice to make:  FAT-16 or FAT-32.  I chose 16 because I like rocking it old school.  Anyway, since the drive is already a single partition, I create the new file system like so:

/sbin/mkfs.msdos -i bootUSB /dev/sda1

I should point out that if you’re using this as a guide, please make sure you’re using the right device.  If /dev/sda1 is your hard drive, life is about to get very unpleasant for you.

Once the file system is created, you’re ready to rock.  Now you’ll need to mount it.   Wherever you’d like is okay, I generally go with /mnt.  The next step is to download DSL.  You can get it from the DSL home page (www.damnsmalllinux.org).  You’re looking for a filename like dsl-4.4.10-embedded.zip.

Once you’ve got the file downloaded, you need to extract it.  Assuming you mounted your thumb drive to /mnt, this command will do the trick:

unzip dsl-4.4.10-embedded.zip -d /mnt

The last step is to make the drive bootable.  This is where SYSLINUX comes in.  To make the drive bootable, all you need to do is:

syslinux /dev/sda1

Now you can use your thumb drive to boot any machine that supports it in the BIOS.  Most machines made in the past few years appear to.  With older machines, it’s a bit more hit-and-miss.

Now, having DSL on a thumb drive is helpful to me, but not as helpful as it would be if I also had some Red Hat boot images.  Since I do Linux installs at work off an HTTP server, I only need the initial boot image, not the full installation media.  So I created a directory on the root of the USB drive called ‘rhel’ to keep the necessary files in.  All you need are the kernel (vmlinuz) file and the initial ramdisk (initrd.img).  By adding a few lines to the ’syslinux.cfg’ file on the USB drive, I could now boot to the Red Hat versions I needed:

LABEL rh53c
KERNEL rhel/rh53cik
APPEND initrd=rhel/rh53cird.img
LABEL rh53c-64
KERNEL rhel/rh53cxk
APPEND initrd=rhel/rh53cxrd.img

(note that I renamed files so that they would peacefully coexist.  ‘rh’ for Red Hat, ‘53′ for version 5.3, ‘c’ for Client (there is also a “Server” version of RHEL 5), ‘i’ for i386 and ‘x’ for x86_64 architectures, and then ‘k’ for kernel and ‘rd’ for ramdisk).

That was simple enough, and it does not require re-running the syslinux program.  If I wanted to, I could include as many different boot options as the drive would hold.  But that’s not the only thing that can be done by editing syslinux.cfg.  By default, pressing F2 or F3 gives boot options for DSL.  I wanted to make sure that if I forgot what I labeled my Red Hat boot options, they’d still be available to me, so I added another line in syslinux.cfg:

F4 f4

This simply tells the syslinux boot loader that when I’m at the boot screen, if I press F4, I want to see the contents of the file ‘f4′.  Of course I could have given it any other name, but f4 was short and sweet.  Anyway, the contents of f4 are just:

Other OS options:

  rh53c                         Red Hat 5.3 client (i386) boot image
  rh53c-64                      Red Hat 5.3 client (x86_64) boot image

It is also possible to change the picture that loads when you get to the boot screen.  Any small (I’d guess 640×480 is the maximum size) 16-bit PNG image will do.  Now I have a customized, and incredibly useful tool.  And there’s still plenty of room left on the drive to store reference files or non-standard programs I might need.  The SYSLINUX project wiki is so far not very informative, but the man page is rather helpful.  I’ll probably play with some more options as I have time to read that page and do some experiments.

syslinux also supports booting things like FreeDOS.  While this wouldn’t be all that helpful to me in most situations, there is one scenario where it would be valuable.  Dell seems to only like distributing BIOS updates for the Windows platform, unless you want to make a boot floppy.  Since many systems no longer come with floppy disks, booting to FreeDOS and running the DOS-based BIOS update would be really handy.  Unfortunately, as of this writing I have not been able to make it work.  I think I’m getting close though, and since this post is nearly a thousand words long already, I’ll go ahead and publish it and then write a follow-up when I do get it working.

The Pen Drive Linux site was helpful in getting me going down the right path, thanks!

June 29, 2009

Market forces at work on the Internet

Filed under: The Internet — Tags: , , , — bcotton @ 9:00 am

Last week, Bloomberg reported on a historic occurence.  For the first time, the per-viewer cost of ads for popular shows on Hulu.com exceeds the cost of the same ad on a traditional TV broadcast.  The article explains why this has happened, so I won’t rehash it.  What I will do is say that this goes to show how intelligent the folks at NBC, News Corp., and Providence Equity Partners are.  For years, the industry fought against the proliferation of TV shows on sites like You Tube.  With Hulu and similar sites, finally the demands of the consumer are being listened to.  Hulu has found that some people will continue to “pirate” whatever shows they desire, but a significant number will happily trade a small amount of ads in exchange for the convenience of being able to watch a show on their own schedule.

Some of the same people who argue that the free market is the solution to everything argue the strongest for the heavy-handed punishment of piracy.  Yet, here we see that the free market is pushing for making content more readily available online.  Apple’s iTunes store marked a shift from getting music from places like Napster and Audiogalaxy, to paying for music downloads.  Now iTunes revenue is in excess of a billion dollars per year.

Also last week, there was a story on Ars Technica had a story about how gaming giant EA no longer minds piracy.  Video game piracy (not to mention OS) piracy is a long-standing tradtion in gaming.  Now that the role of the Internet in the playing of games (see the popularity of World of Warcraft, Second Life, etc) has become key, the game itself is just a portal.  It makes sense for EA to ignore piracy so they can get more people paying for the online experience.  In a few years, I think we’ll see more games given away for nearly free in order to maximize the subscriptions.

It is encouraging to see the entertainment industry beginning to understand that in order to survive, they need to meet the changing demands of the consumers.  By adapting their business model to the technology available, they can continue to make money.  And who doesn’t want to make money?

June 25, 2009

Thank you, Akismet

Filed under: The Internet — Tags: , — bcotton @ 6:39 pm

I’d just like to take a moment to recognize the efforts of Matt Mullenweg and gang at Akismet.  When I first set this blog up, I started getting a lot of spam comments, so I set it such that each comment had to be manually approved.  What happened is that sometimes a comment would sit for a few days, making people feel unloved.  A few months ago, I installed the Akismet WordPress plug-in and trusted that I could let comments post automatically.  As it turns out, I was right.  After almost 5,000 comments have been filtered, the detection has been nearly perfect.  I’ve been amazed at how well it has done, not only with filtering spam, but also with not filtering legitimate comments (when I actually get them).  If you run your own WordPress instance, or anything else that gets input from the webosphere, I highly recommend it.

I’m a nerd

Filed under: Uncategorized — bcotton @ 8:47 am

It’s true, I can’t deny my nerdiness.  How do I know this?  So yesterday I developed a fever.  When it kept going up despite taking Tylenol and using cold washcloths, I had my wife take me to the Urgent Care center.  On the way back, with my fever approaching 103 degrees, she hit the brakes a little harder than I expected.  I grabbed the handle above the door.  “Are you okay?” Angie asked.  “I’m fine, there was just more delta-p than I was expecting.”

That’s right.  Instead of saying something like “you braked too hard”, I commented about how the change in momentum was more than I expected.  What a nerd.

Fortunately, my fever has dropped considerably since last night when it peaked at 104 degrees.  Maybe later today or tomorrow I’ll be coherent enough to write the post I’ve been wanting to write about creating USB boot disks.

June 24, 2009

Belated Nugget Night update

Filed under: Funnel Fiasco — Tags: — bcotton @ 12:31 pm

Finally, I’ve gotten around to updating the Nugget Night page with both of this month’s trips.  Sadly, the streak comes to an end now.  I lucked out on the first one, since there is no Nugget Night on July 4, but I’ll be out of town again on the 18th.  After 47 in a row, we reset the counter.

June 11, 2009

Upgrading to Fedora 11

Filed under: Linux — Tags: , , , — bcotton @ 11:21 am

All of the cool kids know that Fedora 11 was released on Tuesday.  I’d played with the Beta a bit and didn’t notice a whole lot of major differences (certainly not the big changes I found when I previously upgraded) so I figured release day was a good a time as any to upgrade.  I started with my weather data server and the process wasn’t as smooth as I’d hoped.

Before I got started, I removed some packages that I don’t need.  This machine only needs to run NFS, SSH, and LDM, so anything else is a waste of resources.  It turns out I probably wasn’t very careful with my initial install of this machine, because in addition to removing a few packages, I ended up removing several groups: “KDE (K Desktop Environment)”, “MySQL Database”, “Web Server”, “Authoring and Publishing”, “Dial-up Networking Support”, and “Graphical Internet”.

The cleanup completed, it was time to upgrade.  Once again, I followed the rather helpful guidance of the Fedora Project wiki.  The first step is to update the package lists.  For whatever reason, rpm and/or the ftp server didn’t seem happy about the * in the URL, so I had to run them separately:

# rpm -Uvh ftp://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-11-1.noarch.rpm
# rpm -Uvh ftp://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/Packages/fedora-release-notes-11.0.0-2.fc11.noarch.rpm

With that done, the next step was to do the upgrade.  Except it didn’t work.  I kept getting “Error: Cannot find a valid baseurl for repo: fedora”.  Afer a bit of Googling, I found the answer.  In /etc/yum.repos.d/fedora*repo, I had to uncomment the baseurl line.  So then I think I’m on my way, but now when I try the upgrade, ntp complains about libcrypto.  So I remove the ntp package (I didn’t really need that either, so long as I keep ntpdate installed).  Okay, now we’re good right?  No!  Now yum complains “YumRepo Error: All mirror URLs are not using ftp, http[s] or file.”

I couldn’t find much help in a Google search, so I started poking around.  The .repo file in /etc/yum.repos.d/ has a mirrorlist setting, which tells yum what the mirrors are.  I copied and pasted the URL into my web browser to verify that I could get it.  I could, and it is just a plain text listing of mirrors.  That’s when I noticed that the mirrorlist.txt in /var/cache/yum/{fedora,updates}/ was not in plain text but in XML.  So I removed the two mirrorlist files and replaced them with what I had grabbed off the web.

Finally, yum was happy to perform the upgrade.  It took a while because of all the packages that needed to be downloaded.  I actually had to run `yum upgrade` a few times because some of the packages couldn’t be downloaded.  I presume it’s because there were a lot of other people pounding on the servers.  After a reboot, everything came back happy and it was time to move on to my main desktop.

Having done this once before, I was armed with the knowledge of what to do when things didn’t go well.  And things went about as not-well as they had on the first machine.  I was able to get myself to the upgrade stage very quickly this time around, but that’s where I started having problems.  Because this machine is used as a desktop, it has a lot more stuff installed.  Doing a straight `yum upgrade` ended up requiring more space in /var than I had available.  Of course, I didn’t think to check first and it was about 90% of the way through downloading packages before it ran out of space.  So after cleaning up the last attempt, I ran `yum groupupdate Base` to get the core packages, and when that was done `yum upgrade` was small enough to work within the limits of my disk space.

So I’ve done this a few times now, and it’s never worked perfectly, but it’s always been quite manageable.  Considering that upgrading via yum is not officially supported, it works fairly reliably.  The advantages are that there’s little downtime required, and you don’t need to waste a DVD.  Upgrading via yum will continue to be my preferred method, and I’ll dink around after the rush of downloads have settled down and see if that fixes some of the issues.  If not, that’s what Bugzilla is for.

So what do I think of Fedora 11?  It’s hard to say so far.  My desktop is old enough that it can be a bit sluggish to use, and since I haven’t had much spare time lately, I’ve opted to use my MacBook Pro when I need to accomplish things.  If nothing else, KDE 4 has grown on me to the point where I actually like it.

June 9, 2009

Comcast DNS rumors

Filed under: The Internet — Tags: , , — bcotton @ 9:41 pm

Rumors are flying around the intertubes about Comcast intercepting DNS traffic and returning replies from their own servers.  The Domain Name Service (DNS) is the Internet service that allows us to use names like “www.google.com” instead of remembering that if you want to do a search, you have to go to 74.125.67.100.  Most people use the DNS servers provided by their Internet Service Provider, but there are a number of reasons you might want to use a third-party service.  Regardless, an ISP intercepting DNS traffic and forcing people to use their own servers is considered shady by many people.

As a Comcast customer who happens to use Open DNS, I naturally took an interest in these rumors.  It took only a few seconds to check to see that I was not, in face, a victim of Comcast’s alleged abuses.  If the discussion on /. and Fark.com is any indication, nobody else is either.  It has been suggested that only Earthlink customers who get service indirectly from Comcast are affected.  The evidence for that is scant, too.  Basically, it seems like a load of crap at the moment.

May 31, 2009

The joys of making budget cuts

Filed under: Uncategorized — Tags: , — bcotton @ 10:57 pm

It was over two years ago that my department’s Computer Support Manager left, leaving me as the de facto leader of the IT staff in my department.  With one professional and four student staff members, I don’t have a great deal of administrative duties.  Most of my leadership is directed toward mentoring and coordinating daily tasks.  The department head doesn’t even feel the need to meet with me regularly (I take that as a sign that we’re doing a good job).

I don’t even get a budget to work with.  Our IT purchases come out of the department’s general funds, so I just spend money when we need something, and if the department runs out of money, they’ll tell me to stop.  Fortunately, this hasn’t been a problem to date, but the University has asked our department to make a 2-3% cut in our budget for the fiscal year that begins July 1.  All of a sudden, I find myself having to make big important-type decisions.

Being a state institution, jobs are fairly safe.  I don’t foresee myself or our Windows person being axed or asked to stay home more often.  The students have less inherent job security, but the department seems to have accepted how useful they are (and students are CHEAP!), not to mention the fact that I’d work in the dark before I got rid of my students.  On the other hand, we do have an annual agreement with the central computing group on campus that gets us access to some extra resources and also some personnel contribution.  Two of the three people we get have already been cut to part-time by their department.  Unfortunately, the only way to save in that agreement is to reduce one of them further.  It is hard to make that recommendation, but few choices exist.

As I watched “Meet the Press” this morning, I tried to come up with ways to cut costs.  The first thing that came to mind was to reduce the speed of some of our network connections.  The networking group charges $120 annually for 100 Mbps connections, but only $60 for 10 Mbps.  It has been the standard in our department to pay for 1-2 connections in each office and lab (depending on which subnets are needed).  As a result, networking costs are the single largest non-salary IT expense.  Large data users would have a hard time getting by on “just” 10 Mbps (some even pay for 1 Gbps connections!), but there’s no reason a secretary, for example, can’t be happy with 10 Mbps.

The other big cost in my department is printing.  In the centrally-managed labs on campus, print quotas are used.  Faculty and staff get $40 per semester, and students get $20 per semester.  Each page of black and white printing costs 4 cents, and color pages cost 12 cents.  Departmentally-managed printers work however the deparment decides.  My department decided that the “public” printers are free.  Research groups can have their own printers that they pay for, but there’s no cost to use the departmental printers.  This includes our 42″ poster printer, with paper that costs about a dollar per foot.  One of the side effects of this policy is that the color printer is sometimes used for jobs that contain no or little color.  In the past, I’ve tried to convince the department head that we need to implement a policy to encourage the reduction of printing.  It fell on deaf ears, but we’ll see if current conditions give that suggestion a more receptive audience.

One thing I have managed to accomplish is to change the way we charge researchers for space on our file server.  When the file server was first set up, the hardware cost was divided by the available space, and the end result is that there’s a one-time charge of $400 per 96 GB slice.  That worked initially, but 5 years into the server’s life, it’s obvious that it isn’t a sustainable model.  We pay a vendor $1700 per year for hardware and software support, not to mention the $1/GB we pay for backups.  Not only that,  but the way the funding rules work, this space can’t be charged to research grants.  If a research is out of startup funds, they can’t purchase more space.  After over a year of gentle prodding to our overworked Business Manager, we’re finally in a position to begin charging for this as a cost center.  Research groups will pay a smaller annual fee that can be charged to federal grants.

Of course, our state has yet to pass a budget, so that complicates matters as well.  I guess we’ll see how things go.  With any luck, the economy will rebound later this year, and the budget will return to a more normal state (and maybe salaries will be unfrozen!)

May 29, 2009

SOCKS it to me

Filed under: Linux, The Internet — Tags: , , , — bcotton @ 10:49 pm

(This is the first in a series of “there’s already a thousand other articles about this out there, but I’m writing my own so that I’ll have something to put on my blog” articles).

For security’s sake, some of the services I run in my department aren’t accessible off-campus, or even outside of my department’s subnets.  This is normally a good thing, but it can be a bit of a hassle sometimes.  If I’m at home and I want to check my Exchange e-mail with Entourage, or if I need to access my Samba server, I can always just fire up a VPN connection.  But if I need to play around with CUPS, and I’m not wired in to my department (say, for example, I’m sitting in a meeting and I want to get actual work done instead), then I’m just up a creek.  The VPN is at the University level, and I don’t really feel like letting the whole campus print to my printers.  We spend too much on printing anyway.

This is where SOCKS comes in.  SOCKS is a proxy protocol — instead of traffic going directly from a server to you, it goes through the proxy first.  SOCKS can be used to pass all kinds of traffic, but probably the most common use is to encrypt, hide, or otherwise mangle web traffic.

Some uses of SOCKS are completely honest, like my example above to access restriced resources when I’m away from my office.  Another reason to use SOCKS is if you’re on an untrusted network, like at a coffee house, and you don’t want anyone who is trying to snoop your network traffic to see what web pages you’re viewing.  A less noble case is tunneling your web traffic through somewhere else while you’re at work, thus allowing you to visit sites your boss would not approve of.  I suppose you could also use a SOCKS proxy to visit sites that the law would not approve of, but you’ll still get caught.

So I’ve gone on for over three hundred words so far, and I still haven’t said how you can actually do this.  As it turns out, it is surprisingly simple.  All you need is an SSH server, and SSH client, and a web browser.  The SSH server runs on whatever you want to use as a proxy, in this case my Linux desktop at work.  The SSH client and web browser run on the computer you’re using to surf ye olde intertubes.  (If you’re using Linux or Mac OS X, you’ve probably already got the SSH client and SSH server available, but you might have to get it started.  Windows users will need Cygwin or something similar.  In any case, Google is your friend).

To get started, just make an SSH connection to your proxy host.  Something like

   ssh -ND 8120 bcotton@host.department.employer.edu

will do quite nicely.  The “-ND” option does not mean to root for Notre Dame.  Do not do that under any circumstances.  “N” tells SSH not to run a command, so you won’t get a command line, which in this case is fine.  “D” specifies the local port to use.  I chose 8120, but you can choose pretty much whatever you want between 1025 and 65535.  The important thing is to remember it.  The rest is your username and then the server you want to connect to.

Okay, so now you’ve got the connection set up.  The next thing to do is to tell your browser to use it.  Firefox users, go to Preferences and select the “Advanced” tab.  Next, select the “Network” section.  You’ll see a line that reads “Configure how Firefox connects to the internet.”  Click on the “Settings” button next to that.  Select the “Manual Proxy Configuration.”  In the box labeled “SOCKS Host” enter “localhost” and in the “Port” box next to that, enter the port you chose when you set up your SSH connection.  Click “OK” and then you’re done.

If you did it right, you’re now sending all of your web traffic through the proxy.  Well done!

Older Posts »

Powered by WordPress