Ubuntu Live CD comes handy this case, just follow the following steps, you will be back in business.
- Boot from Ubuntu Live CD
- Then you need to download the ms-sys, you can find that from - http://packages.ubuntu.com/dapper/i386/ms-sys/download
- Once downloaded it will ask for auto install, click that
- Next type “sudo fdisk -l” , from that you can find the main partition you want to fix
- Then type “sudo ms-sys -m /dev/sda”
- Next restart, everything should work fine.