Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

My Windows 7 got infected with a seriouly bad virus, just because I disabled my anti-virus, so after I re-enabled it I tryed to fight of viruses by doing a start-up scan, but my anti-virus froze and got disabled by the viruse, and all system files also got infected. So I re-installed Windows 7 and now I don't see the Ubuntu boot loader and I don't know what to do. I don't want to have to re-install Ubuntu too.

I'm new to linux, I don't even know what grub is.

share|improve this question

marked as duplicate by Alvar, Warren Hill, Basharat Sialvi, user68186, Tom Brossman Jul 17 '13 at 14:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

You can use the Ubuntu install media to boot and use fdisk to check the partition (ID is 83). Then mount it to /mnt and try installing grub to MBR. grub-install --root-directory=/mnt /dev/sda.

When it finished without error, reboot the system and you can see grub during start and can enter Ubuntu, but not Win7. After you enter Ubuntu, you can run sudo update-grub2 to update such as:

grub.cfg ...
Found Debian background: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.31-15-generic
Found initrd image: /boot/initrd.img-2.6.31-15-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.