How to repair partition table?

view story

http://askubuntu.com – I have a dual boot computer with Windows 7 and Ubuntu on it. Recently, i was working in Windows7 and my flash had crashed, the computer rebooted to Error: Partition not found. Grub Rescue> I had made a Ubuntu Live CD and attempted at fixing it with lilo, I managed to get Grub to work, but I wasn't able to boot up windows. I went back into Live and did sudo apt-get install syslinux; sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda. I did the same again after rebooting into Windows7 had failed since it was complaining about not being able to load the kernel. I had done it on sda2 and (HowTos)