It is bound to happen at some point. You’ve installed the latest kernel or you’re attempting an upgrade and now your system just won’t boot. The screen shows nothing more than GRUB. If your system isn’t able to get past the GRUB prompt and it isn’t because of a hard drive failure then chances are very good that you can rescue your system. This routine will work best if you created a non LVM boot partition or if your rescue cd includes the LVM tools.

This post assumes you are running a RedHat or Fedora based system but the concepts apply to all systems that use grub to boot. It also assumes you have a relatively recent install cd.

To get started, insert your install cd. In my rescue scenario I used a CentOS install cd. When the install has loaded to the initial screen enter ‘linux rescue’ and press enter. The cd will boot like normal and ask about your preferred language and keyboard layout. Continue until you are asked if the rescue routine should find any installed systems. If your root directory exists in LVM you should say no, unless you the rescue cd you using includes LVM tools. It isn’t important to mount root anyway, just your boot partition.

When you are at a prompt, create a boot directory at / and mount your boot partition there. In a typical RedHat/Fedora setup it will be on /dev/[h|s]da1. Next, rename the current device.map files to some other name. We’re now ready to reinstall grub.

Type grub and press enter. You’ll now be in the grub interface. Type ‘root (hd0,0)’ and press enter. Next, type ‘setup (hd0)’ and press enter. Some text will flash by with, hopefully a success message. If you see success you should now be able to reboot into your Linux system.

I want to take a small detour from the usual content and talk about the auto bailout that has been in the news. I have really mixed feelings about this bailout. On one hand I understand that there are indeed some jobs at stake but on the other hand, I really hate that nobody is talking about how these companies should have seen it coming.

Lets take GM as an example. A couple years ago they released all new SUV’s and trucks as well as the Acadia crossover (one of the heaviest ever produced) at a time when gas prices were clearly on the rise. Of course, in a classic case of brand engineering all of the GM divisions released their own versions of each. Since then we’ve seen little to nothing in the way of affordable, efficient cars that can compete with what other companies are producing. GM for too long has concentrated on the once lucrative SUV business and their smaller cars are suffering. Meanwhile companies like Toyota, Honda and even Kia (owned by Hyundai) are surviving just fine in the the current economic situation.

Lately I’ve been talking a lot of talk about how great the Mac platform is. At work I go back and forth with a coworker on the merits of Linux and OS X. Of course he claims that Linux is all you need and I’m confident that the Mac is where it’s at. The reality is that OS X suffers its own set of issues which I have talked about in the past. No OS is perfect, just a matter of which one best fits your needs.

Anyway, through no fault of my own I managed to royally screw up my iTunes library to the point where some of the files were pointing to random objects in my backup drive. I have no idea how. At the same time my iPod Touch would simply not cooperate. Many files that I normally sync were listed as missing including over half of my largest play list which is still just a small subset of my entire collection.

So anyway, what’s my point right? My point is that I was able to save myself a ton of work simply because I turned on Time Machine.

Everybody says, “make sure you make a backup” but lets be serious, who actually does? This is one of the many reasons I claim OS X to be one of the best operating systems available for “normal” people. No other system that I am aware of provides such a simple, easy to use and surprisingly robust backup AND restore system. It is so easy you might actually forget it is there.

Restoring my iTunes library to normality was as easy as entering the Time Machine interface, going to the previous point in time, clicking the iTunes library files in my Music folder and clicking the restore button. Done deal. I plugged my iPod in and all of my files were copied back to it as if nothing had happened.

I’m watching the election results on msnbc.com and they’re actually putting the full 16:9 aspect ratio to proper use. Most of the time they shoot things in widescreen but virtually all shots are framed to fit the older 4:3 format. Along with election results msnbc is showing poll closing data on either side of the screen. While the data isn’t extremely useful it is nice to see the space is getting put to use.

If you’ve spent any time at all on this site then you know that VIM is my preferred text editor. Even though I’ve been using it for years I still learn something new about the editor from time to time. Here is something that I just figured out a couple of weeks ago. It turns out VIM provides a simple way to repeat exactly what you last did. By simply pressing the period key, VIM will repeat whatever command -or- text you last entered.

For example, lets say you’re editing an HTML file that has a list of links. Before each link you want to add a generic image. You could do this a few ways; type in the text each time, use a search and replace or copy and paste. Using period is just one more method to add to your toolbox. To use this trick, enter INSERT mode by pressing i. Enter in the text you want to enter before each link (or whatever it is you need to repeat a few times) and when you’re done press ESC. Move to the next line and press the period key. Whatever you typed previously will be inserted to the right of the cursor. You can do this as often as you like but as soon as you delete a letter, line, insert different text or whatever the “period key” shortcut will begin to do that action instead.

Another way to use this is if you’re deleting lines of text over and over. Say you want to delete 10 rows of text at a time until you’ve deleted what ever it is you need to delete. You could press d 10 down arrow and then each time you press the period key you’ll repeat the same action.

I don’t typically blog about where I work but I will say that I’ve changed where I work. With this change may come a small shift in focus on what I write about. My new job brings me back into the Linux world whereas my previous one saw me doing Windows 90% of the time (though you wouldn’t have known it from what I wrote about). This does mean however that I won’t be writing about OpenSolaris as much unless something changes with how my home setup is done.

Some comments I made on the an apple discussion website has made the geek news. http://tinyurl.com/4ueslk The comments by miniconvert are from me.

A number of people have pointed out that newer camcorders don’t use firewire anymore. That’s cool, but the issue isn’t just camcorders (though for me it primarily is). Others have pointed out that Apple likes to lead the way, they dropped the floppy first as well as PS2. At the time, very viable solutions existed, it was time for these interfaces to go away. When Apple introduced the iMac it lacked PS2 ports (or really, the Apple keyboard/mouse ports) but it didn’t really matter. That new computer came with a USB keyboard and mouse. By removing firewire they’ve left a lot of potential customers in a bit of a conundrum. What to do with those peripherals that are based on firewire?

How Apple reacts to this backlash will be very interesting. I’ve always understood why people dislike Apple products, this is one of those reasons but in this case I think they’ve gone too far too fast. I do of course realize nobody is forcing anybody into buying a Macbook. It’s just that, when you want to live in the Apple world you choices are already limited.