Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was having a multiboot setup with Windows 7 Home Premium and Ubuntu 11.04. I upgraded Windows to Windows 7 Ultimate. To restore the boot loader, I used something like the following command from terminal of Ubuntu live CD.

sudo grub-install --boot-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444/boot /dev/sda

Now I can boot into Ubuntu. But when I try to select Windows 7, it is throwing an error that /dev/sda2 cannot be found.

How can I make Windows 7 boot from grub?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Your partition layout probably changed such that Windows is no longer on the /dev/sda2 partition. Try running this command under Ubuntu that will scan your drives and build a new GRUB configuration:

sudo update-grub
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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