How can I make grub2 boot into Windows 7?
First, you'll need to check the config. Its in theee... thee... /etc/grub.d/
? /etc/grub/
?.. somewhere there. Config file names look like this: 00xy, 10linux, 20other ... these are just examples, but the real thing is almost the same. Check them, where is the windows one. Back it up (copy it somewhere). You'll need something like this into the file:
menuentry "Windows" {
set root=(hd0,3)
chainloader +1
}
If you haven't got any config file like this, just create one. Grub2's config reading is easy-to-understand. It goes incrementally. Like: 00* , 10*, 20*, etc. So your new file should be named 95-windowsfix if you want it to be the last entry, or give it a smaller number (to make it the first entry) than Linux configs have if you want it to be the first.)
in the 'other' config file. Modify the set root value of course. Determine the hdd by typing: sudo fdisk -l
. For example, /dev/sda1
is (hd0,0)
if its on the second HDD: /dev/sdb1 >> (hd1,0)
..and so on. You can understand the syntax from this I guess. After you made the modifications, do an update-grub
and you can try to boot it.
I'm aware that this looks like a huge mess. Sorry for that. I don't have any Ubuntu machine near to me with Grub2 so thats why I wrote this much "i guess". If you won't be able to get it work, just ask.
Try this:
grub-mkconfig -o /boot/grub/grub.cfg