Jan 5 2009

Steve’s Computer Adventures II

Steve

It seems that lately, my computer has been doing a lot of very scary things… frightful to the innocent user who doesn’t know how to revive Windows XP from a recovery CD after an update fails. And last night, frightful to the user who doesn’t know how to fix a failing boot-loader.

I use GRUB as my boot-loader on my computer. For those of you unfamiliar with the term, a boot-loader is a small piece of software that starts the process of “booting” your computer, or loading the operating system. The boot-loader is located on the first 512 bytes of a hard-drive, and this is the place that the computer “instinctively” knows to look when looking for an operating system. Different boot-loaders differ very much in terms of features and complexity, and as a result, some boot-loaders cannot fit in this small, 512 byte region on a hard-drive. To solve this problem, people have developed what are called multi-stage boot-loaders (GRUB being a great example). In a multi-stage bootloader, the first 512 bytes of code on the hard-drive are responsible not for starting the operating system, but instead for loading the rest of the boot-loader!

As I mentioned, I use GRUB as my boot-loader on my computer. The advantage of GRUB is that it allows me to have a dual boot system between Linux and Windows – GRUB is capable of starting either operating system, and it displays a nice pretty menu that lets me pick every time I turn my computer on. All of my GRUB configuration files, as well as the secondary stages of the boot-loader, are all located on one of my Linux partitions on my hard-drive.

So last night, while packing for my trip back to MIT, I decided to check my email.

Bad Idea!

When I turned my computer, I was immediately confronted with an ugly boot-loader error from GRUB: Could not load GRUB stage 1.5 (one of the secondary boot-loader stages). This really isn’t a good sign. If a boot-loader fails, you aren’t able to access the rest of your system. Although all of my files and settings could still have been in tact, I’d be useless to access them, since I could boot neither Linux nor Windows. Pretty scary, huh?

The best solution I could think of to get my PC working and happy again was to use an Ubuntu LiveCD. Since I just re-installed Ubuntu a few days ago (see other posts!), I had an 8.10 LiveCD quite handy. So, I popped the CD into my computer. Since computers check CD drives before hard-drives, Ubuntu 8.10 jauntily booted off of the LiveCD. From there, I noticed something strange: I couldn’t mount my root Linux partition! All of my program files and configuration files were on this parition, and it’s a bad sign if it can’t be mounted. Something must have corrupted this file system. GParted is a program designed for doing lots of administrative tasks on hard-drive, and I tried scanning and fixing the partition for errors. After this, I was able to mount the partition, but then all of my files on it were gone….??

Well, that explains why by boot-loader wasn’t working. If the secondary stages of the boot-loader and all of my configuration files were on an un-mountable partition, then my boot-loader wouldn’t be able to work! I was tired and it was late last night, and I didn’t feel like spending hours fixing my partition. So, I took the brute-force approach and just re-installed Ubuntu, which put back the default system files and created a working boot-loader. After this, everything worked fine.

I’m still kind of mystified as to why any of this happened… do you have any ideas about what could have corrupted my root Linux partition? The funny thing is, my computer was working fine earlier in the day, and I wasn’t even using Linux! I was using Windows, and the one thing I thought of that perhaps may have caused this is a program in Windows that reads ext3 files on other partitions. I was looking through my ext3 files earlier in the day from Windows, and perhaps this program corrupted my filesystem?

Who knows for sure… but thus ends another edition of Computer Adventures… for now! :-)


Jan 2 2009

The Adventures of Steve’s Computer!

Steve

blue_screen_of_death

It’s not my fault this time … I swear!

Really, I wasn’t doing anything that should have caused this… All I was doing was innocently trying to update my Windows XP installation from SP2 to SP3. The “your computer needs to be updated” pop-up that Windows XP ever-so-persistently displays has been appearing for months now on my computer, but I just kept putting it off. I knew that service pack updates certainly weren’t trivial and that they involved updating system-critical files. My machine was working fine, so I just kept putting of the update for another time. Until yesterday of course, when I finally decided, “Oh what the heck, I should probably finally do this update already.” An update installation window popped up and suggested that I back up all my documents and files before proceeding. I haughtily ignored this message, trying very hard to convince myself that “Nothing has ever gone wrong before, so surely everything will work just fine today. Right?” So, I ran the update without backing up.

Bad idea!

After installing SP3, Windows asked me to reboot, so I did. And that’s when I got this delightful blue screen of death. For those of you unfamiliar with Windows kernel panics, the affectionately-named blue screen of death essentially means that some piece of system-critical software just failed, and that the other software doesn’t really know how to respond to this. So, the computer just “panics” (hence the term “system panic” or “kernel panic”) and displays the screen shown above, which I might add is horrifying enough to send shivers down a grown programmer’s spine.

At the time, I had my new tablet (see other posts) plugged into my computer’s USB port. Thinking that this might be confusing Windows (especially after a substantial update), I unplugged the tablet and rebooted my computer, optimistically hoping for the best. However, to my dismay, I was confronted with a screen upon boot-up that said something to the effect of “Windows did not shut down properly last time. You should start it in Safe Mode!” One should always practice safe computing, so I tried starting Windows in safe mode. It didn’t work – I just got the same blue screen of death again. In fact, none of the various safe mode options worked either – all of them gave me the same, and by this point very ugly, blue screen of death.

I should note that it is at this point that, if I didn’t have Ubuntu (a Linux operating system) also installed on my computer, I would probably have been panicking. With no simple way to boot up Windows and access my files, I would have been very concerned that all of my files would be inaccessible and that I would consequently be forced to re-install Windows, which would in the process delete all of my documents and music!

Luckily enough though, I did have Ubuntu 8.04 installed on my computer! Knowing nothing about the trouble on the other side of my hard drive, Ubuntu cheerfully booted up. (On a side note, I’ve been using Ubuntu a lot lately. The more I learn about it, the more I like it. Linux truly is a well-designed operating system, and Ubuntu polishes it up and does its best to make it usable for people who are inexperienced with Linux. It can do just about anything a Windows PC or a Mac can do, and many things beyond. By forcing myself to use it throughout the past few months, I’ve become much more familiar with Linux and found a new appreciation for it!). Ubuntu has the really nice feature that it can access all my Windows files, regardless of the state of Windows. So, even though Windows wasn’t alive enough to backup my files, I could sneak around this and access them with Ubuntu. I have an old computer in my room here at home that has essentially been doing nothing, so I used it as an impromptu backup file server last night. Not only can Ubuntu access my Windows files, but it can also talk to a Windows network. So, with the help of Ubuntu, I was able to safely copy all of my files from Windows to my old computer as backup. That way, if all else failed and I was forced to reinstall Windows and delete all of my documents, I’d be able to get them back.

Phew!

Now that I knew my files were safe, I could be a little more daring in how I fixed Windows. I searched around online, and came across a Microsoft support website detailing how to uninstall a service pack installation by using a Windows recovery disk (one of which came with my computer). I wasn’t sure exactly what the recovery disk would do (like maybe overwrite my files, overwrite Ubuntu, etc.), which is why I chose to backup my files before trying to fix Windows. It turned out, luckily enough for me (and my files), that the recovery disk was indeed able to uninstall SP3 and get my computer into a bootable state again. I finished off the uninstall in safe-mode, and after that, Windows was back (in black). Hooray!


So, the morning after my glorious computer adventure had come to an end, I found myself bored, with a computer in hand, and with nothing else to do. And all of my files were backed up. So why not mess around with things?! :-P

Now that Windows was working, I decided to focus my attention on Ubuntu. There was nothing wrong at all with my Ubuntu installation; it was working like a well-greased machine. So, what do you do when there’s no problem? Fix it! I decided to install Ubuntu 8.10, 64-bit edition. I previously had 8.04 32-bit edition. This was my first time trying a 64-bit operating system on a computer. I was worried that all my device drivers perhaps wouldn’t have 64-bit counterparts in Linux, but I decided to take the risk and install anyway. And I’m glad I did! I burned a LiveCD, overwrote my old Ubuntu file parition (not my home directory though – that’s on a different partition), and it worked great. After adding a few more packages (graphics, build tools, etc.), I found myself with a 64-bit operating system that could finally take advantage of my computer’s hardware! Hooray! Here’s a screen shot of Ubuntu in all of its 64-bit glory:

ubuntu64

Ubuntu 64-bit edition is noticeably faster than the 32-bit edition, at least on my computer. Things seem to load a bit faster, and certain things seem to take less time, etc. It’s really nice!

And thus ends the Adventures of Steve’s Computer. At least for now… :-)