19 Aug 2009

a word of warning for Linux users planning on installing Windows 7

I’m a desktop Linux user. However, I’m not like some Linux users who fear microsoft, and won’t ever use a microsoft product. I use Linux because I prefer it. Not because it’s not microsoft. I use gmail because it’s better than hotmail. If hotmail were better, I’d use it. I just use what I think is best for me, regardless of the company behind the product. I’ve criticized Microsoft a lot. The reason? They deserve it. Vista was beyond a disaster. Office, however, leads the field. It has no deserving rival (proprietary or open). As much as Linux users may disagree, is not as good.

Still, for most people, it is good enough. All I ever do in is write basic documents and spreadsheets, so I don’t really care. I do care about being able to use software on all platforms, which open source software tends to be really good about. For that reason I use My home Arch Linux desktop, my personal Linux laptop and my work Windows laptop all run the same basic software (, Firefox and Chrome, Pidgin, Thunderbird).

I want the same app everywhere. Anyway, back on topic. I dual boot my desktop to play games. (WINE) is not a good solution right now. Maybe in the future, but not yet. I’d been dual booting with Windows XP for a while. As a disclaimer: I never boot Windows except to play games (or do something that MUST be done in Windows).

So, back to installing Windows 7. Usually, when I get a new PC, I install Windows first choosing a partition that’s big enough for a few games (100GB is usually enough), and then install Linux. Why? Because then (GRUB) can worry about my (MBR). Anytime you reinstall Windows, Windows replaces your MBR (grub stage 1), meaning you can no longer boot into Linux. The usual way around this is to boot a Linux liveCD, load up a terminal and push GRUB back to the MBR, like this:

      $ grub<br /> $ find /boot/grub/stage1 
      $ root (hd#,#)<br /> $ setup (hd0)<br /> $ quit

What this code does is search your Linux filesystem for GRUB stage 1. You then copy GRUB (identifying your volume & partition) back to the MBR. My partition looks like this:

hd0,0 Windows NTFS
hd0,1 Linux / Ext4
hd0,2 Linux home Ext4
hd0,3 Linux Swap

The problem I encountered was that for some unknown reason (at least to me) Windows created an extra partition. The solution is to edit your grub.conf file and add one to the previous partition number (as hd0,1 is now an extra windows partition, hd0,2 is now your ‘/’. It’s easy enough, but it did have me confused for a few minutes while I figured out what Windows had done.