Tuesday, June 7, 2011

Windows killed my laptop, again

I mentioned last week that my office is moving to Active Directory. All our Windows PCs needed to get reconfigured to authenticate through AD. At the same time, I asked that we apply encryption to every desktop.

As the central IT office, my group went first. I'm one of 3 people in our office that dual-boots Windows and Linux, and I was not alone as we witnessed Windows break because it was not the only operating system to control the hard drive.

Here's the process:
  1. We configured TPM in the BIOS, then booted into Windows. As usual to start Windows, I selected "Windows" from the Grub boot loader.
  2. Configured Windows to use the built-in BitLocker disk encryption. Interestingly, Windows doesn't actually complete this step, instead it needs to reboot for the change to take effect. Okay fine, it's a filesystem change.
  3. When I reboot, and  select Windows from the Grub boot loader, Windows complains it cannot find the BOOTMGR. Unable to go on, it only lets me "Ctrl-Alt-Del" to reboot - but after rebooting, selecting Linux from the Grub boot loader still worked fine.
Not sure how Windows kills itself, but Linux continues to work fine. I'm reminded how Windows killed my laptop, under different circumstances.

We mucked with it for a while, trying various Grub boot options, whatever. After about 10 minutes, we gave up, and booted from a Windows 7 recovery bootable CD. That let us run some commands from a terminal window (bootrec /fixmbr, and bootrec /fixboot) in the recovery environment, to reset the boot sector and the master boot record.

Of course, Windows seems to assume that Windows will ever be the only operating system, so the tool doesn't take any precautions for a multi-boot environment. My Linux environment was no longer usable, but at least we got Windows to boot back up.

After letting BitLocker fully encrypt my Windows data, I looked into the damage to my Linux installation. The partitions were still there, but the Grub boot selector was gone. I could have restored my Grub boot selector - I've done that before (thanks again, Windows.) But today, I thought it might be easier to just re-install Fedora 15 on my laptop, and restore my data.

Thank goodness that backup and restore is so easy in Linux. Déjà Dup has been part of Fedora for about a year. Installing Fedora 15 took about 15 minutes, then I just needed restore my data. It was easy!

And yes, re-installing Fedora also put Grub back as the boot selector. And Grub now lets me dual-boot (again) into Windows + AD + BitLocker, or into Linux.

I lost my morning to a mess caused by Windows, but regained my afternoon thanks to Linux!

But I guess my "lesson learned" is that Windows really wants to be the only operating system on the computer. Be warned.


  1. Makes sense that you wouldnt be able to boot into linux after those commands. That reset you MBR, which is where linux keeps grub. So those commands wiped grub and installed a plain vanilla Windoze boot loader.

  2. You might want to try to run Windows in a Virtual Box. That won't save you from Windows malice but it makes recovery a little easier and leaves you free to get your work done while Windows fails. My guess is that Microsoft makes this difficult to do because some of their EULA forbid it. Other people have reported problems with Vista/Vista 7 and bootloaders and Microsoft has a long history of boot malice. Putting the mess in a box might help. As a bonus, you don't have to use bit locker if you already use whole drive encryption in Fedora.

  3. In my case, Windows just refused to run. Four month old computer, single boot, and Windows wouldn't run. That was the last straw. I'd run every version of Windows from 3.0 on, and had gotten one of the last machines with XP (I'd learned never to buy the first release of a new Microsoft OS, and Vista had just been released). I was on vacation at the time, had intended to do some work, and needless to say this happened on the second day, and I had a brick for the entire vacation.

    Furious, when I got home I swore I would never, ever, run Windows again, and I haven't. Instead I fought with Ubuntu for a week (took that long to get the Wireless working) and have had no problems since using a combination of Linux and Max OS X.


  4. As a perfectionist, I am shocked! :) that you would re-install the whole OS for the sake of the boot loader :))

    Unless you have an unusual setup, chrooting into your linux from a cd and running
    'grub-install /dev/[s|h]da' would have helped you without the need to re-install linux.

    1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
    2. Get a root shell and make a folder (mkdir linux)
    3. mount the root (/) partition of the OS (e.g. mount /dev/sdbX linux if you have two disks)
    4. chroot the mounted partition (chroot linux)
    5. grub-install /dev/hda [1]
    5. Exit the shell
    6. Reboot

    Best of luck,

  5. Alex,

    That would have been a much better method, and I just plain forgot about that. But installing Fedora 15 only took about 15 minutes, and I always have recent backups, so it wasn't a big deal to get back to work.

    I even have a fully bootable Linux on a USB flash drive, so this would have been pretty easy.

  6. Beware, it might be against M$'s License Agreement, to virtualise their OS.
    If that isn't retarded, I don't know what is.

  7. No need to muck about with chroot. Boot your installed OS with Super Grub Disk, then

    grub-install /dev/sda

  8. When you're going to dual boot you're safer off by using the Windows bootloader as the primary one. Could have saved you a lot of trouble. You Linux guys are actually no better than Windows guys in terms of fanboyism. It doesn't work, Windows broke down in a couple of days or messed up my Linux! Why don't you first try to figure out what you're actually doing before messing with something. Sure, it would be much better and simpler if things always just work nice together but face it: they don't.

  9. "You Linux guys are actually no better than Windows guys in terms of fanboyism. "
    Windows installs a bootloader by default which borks your chance of booting anything else on the drive. Every Linux install I've tried asks you where to put the bootloader, gives you an option not to install anything, and intelligently sets up other operating systems for boot if they are installed. That's a big difference.

    Windows wants to be alone on the drive and does what it can to make sure that happens. There's a serious difference in attitude there.

  10. Daeng Bo is right. I much prefer the Linux way, where it "plays well with others." In 2011, I think it's safe for Microsoft to assume there might be a different operating system out there. Linux has been around since 1991, after all.

  11. @Dann: That would be interesting, I'll have to look into that. I agree it would be really dumb for a company to not allow virtualization of its operating system. Linux doesn't care, for example. Why should Windows be licensed differently for physical devices, than virtual machines?

  12. Ok, looks like Microsoft did update its licensing (docx) for Windows desktop, to allow virtualization. But you must first assign a Windows license to the hardware (laptop, desktop). I kind of get that, since if you have 1000 PCs in your organization, Microsoft should expect you to have 1000 Windows licenses.

    Most interestingly, you may not reassign licenses from a desktop PC within the same organization. That makes no sense to me at all.

    I think I sense a future blog post.

  13. At the office, sure by all means abide by the rules, for your sake and your employers. But at home; I do as I wish. Windows get virtualized a lot! not to mention you could encrypt your linux part, then double protect your windows vm by encrypting that as well. Takes a split second to snap shot your windows Vm then to image it.

    I just feel more protected by having my linux host os locked up and layering it around to protect my widows VM.

  14. arsshaw, I agree. It's a great way to run 2 operating systems on the same laptop, to just virtualize one of them. I used to be a big fan of Virtualbox, to run Windows inside Linux. It worked well. Although I don't know that you gain that much by encrypting your Linux partition, then encrypting the (virtual) Windows volume. You're doing software encryption twice for every I/O.

    BTW, I just spotted poor wording in my other comment: "I kind of get that, since if you have 1000 PCs in your organization, Microsoft should expect you to have 1000 Windows licenses." I should say "1000 PCs running Windows, you should have 1000 Windows licenses." Maybe people read it that way anyway.

  15. yeah but if a company is running 1000 pcs they buy one site license instead of 1000 individual licenses, cheaper that way ya know, but the original story being about how windows tries to be the only operating system on the computer, well, that's microsoft for ya

  16. On an unrelated note, I finally figured out who likes reboots as much as Microsoft: Hollywood and DC Comics.

  17. small solution for that...boot with window's 98 then press 9 number option then type a command fdisk /mbr it will fix mb issue...

  18. Two quick comments: The "linux way" of running multiple systems is routine, and by far the best way. Until recently most linux installs on personal computers were routinely multi-system machines run by computer science students or others with this need. This is not a matter of fanboyism, it is a matter of Windows is Broke.

    I would like someone to explain to me how a system running on a typical computer is fundamentally different than a system running in a virtual box. I know what a virtulizer is .... but how is running any system on an arbitrary hardware platform not in some way the same thing as running any system on any arbitrary virtual hardware platform. Both are virtualized to some degree. Perhaps this is a case where we need a philosopher. Ancient greek, preferably.


Note: Only a member of this blog may post a comment.