Microsoft Windows has an incredibly irritating penchant for messing up Linux installations. When you install Windows on another partition, your Linux boot loader will be wiped out, and you’ll need to restore it manually.
If you’re using an encrypted drive (sometimes known as a crypto disk,) you’ll find you have problems with the standard recovering after a Windows install instructions.
The Problem
The problem lays in the difference in the way the partitions are laid out between a standard Ubuntu install, and an install that uses crypto disks.
By default Ubuntu installs your boot loader in the /boot/ directory on your root partition. However this way if your disk is encrypted, your computer can’t load the bootloader because it’s locked behind the complex encryption scheme.
The alternative installer for Ubuntu solves this problem by setting up a separate unencrypted partition for your /boot/ files.
The Solution
This solution can be administered pretty easily if you have an Ubuntu live CD handy.
- Open the terminal.
- Start the grub utility by typing sudo grub.
- Find your boot partition by typing
find /grub/stage1. This will show which partition your boot loader resides on, in a format similar to (hd0,0). If this command doesn’t work, you may have to manually find the partition with your grub files. These files are usually in /boot/grub or just /grub. - Type the command
root (hd0,0)substituting for whichever partition the previous command revealed your boot loader is on. - Type the command
setup (hd0). It’s important to set up on (hd0) because this is where windows installs itself. If you use another partition for this step, the Windows bootloader will take precedence and you won’t be able to boot Linux.
You can now type quit, and reboot your computer. If all went well, you will be able to dual boot Windows and Linux once more.
More on Encrypted Partitions
For help mounting an encrypted partition, you can find detailed instructions for mounting and accessing your LUKS encrypted partition over at UbuntuGeek.
For extra credit, you can also find out more on LUKS (the Linux encryption scheme) and Truecrypt (a proprietary alternative) on Wikipedia.