NOTE: I am using Windows Vista / Kubuntu 9.04 Dual Boot in this example.
The first thing you need to do is find a Live CD you can boot into. This can be just about any Live CD, but for optimum results use one that shares the same Linux distribution that you use. Boot into this CD and open up a prompt.
The next thing you have to do is find out what device your Linux partition is running on. This can easily be accomplished using the following commands:
xxx is equal to any of the following directly from fdisk(8) man pages:
(/dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks, /dev/ed[a-d] for ESDI disks, /dev/xd[ab] for XT disks)
You will be given a list of options and a prompt to type in your choice. Use the choice 'p' to print your partition table and hit "Enter".
The table will be printed to the screen in which you can deduce which device your Bootable Linux Partition resides in. Once you figure out the device, make a note of the device string. Mine is: "/dev/sda5"
NOTE: There will be two or more Linux Partitions on a simple partition table. One is the root partition and the other will most likely be the Linux Swap partition. Make sure you note the correct device.
Good job! Now you're ready for the meat of the process.
You will need to make a new directory to hold the mounted partition that will be your Linux partition. This will make more sense to you as we progress through the rest of the process. The command is:
sudo mkdir /mnt/system
Next, you need to mount your Linux partition to this new directory so we can access all the files on your Linux Operating System.
sudo mount /dev/xxxx /mnt/system
In my case, 'xxxx' would be 'sda5'. You're Linux partition may be different.
The next few steps involve "chroot'ing" into this new mounting partition. When you 'chroot' to a mounted device, you are literally changing the root directory of the LiveCD system to the root directory of the mounted device. What this does is it allows you to run commands directly on the Linux partition that you specify instead of running the commands on the LiveCD.
The first thing you need to do is take control of the root user.
You do this so you can run the 'chroot' command.
Now, you need to bind the /dev tree from the LiveCD file tree to the mounted Linux Partition using the following command:
mount -o bind /dev /mnt/system/dev
Now, chroot into our partition.
Finally! We are inside our Linux partition. We have one more command left. What this command does is reinstall and configure our Grub Bootloader so that we can boot into either Windows or Linux when we restart.
'xxx' refers to the three character description representing our hard-drive.
We are finally finished!
All you have to do is restart! We now have choices when we boot up our computer!
**Please note: This post is for my own reference. However, if do find yourself stuck with this little situation, I hope this helps you out!**
P.S. If you want to change the default choices in the bootloader you can edit the file "/boot/grub/menu.lst"
Thanks for reading!