I am desperate to add Windows 7 to grub. I have tried sudo update-grub, I have run sudo os-prober, but I can't seem to get windows to be added to grub.

Can someone please explain how to manually add windows 7 to my grub?

share|improve this question
    
Please stop starting new questions for the same Problem. Please provide the requested information in your other question. – Pabi May 4 '15 at 21:10
    
I did, but no one answered the other questions, so I am asking a specific question: how do I manually add windows 7 to grub. – Darby Gallagher May 4 '15 at 21:18
    
I did answer suggesting boot-repair and posting its resultst. Editing grub files is not recommended, it can break your system. – Pabi May 4 '15 at 21:22
    
No worries. I have had no system for my kids for days now so Linux has to go as they need a working computer. Thanks for your help – Darby Gallagher May 4 '15 at 21:29
  1. Open a terminal and type:

sudo nano /etc/grub.d/40_custom

  1. Add the following line:
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

by appropriately modifying the location of windows 7 in your computer.

  1. Run sudo update-grub

Note If you are not careful these operations can mess up your computer.

share|improve this answer
    
I think this is the only answer at this moment that really addresses the question of adding the Windows boot entry manually. But just adding a Windows entry to the grub list will not fix problems with the Windows MBR file that may be present in the first place that may stop Windows from booting. - To fix those, run boot-repair from a live session and chose restore MBR . If that leads to directly booting to Windows, run boot-repair in a live session again and chose 'Automatic repair'. Then, in Ubuntu sudo update-grub. – cipricus Jun 28 '17 at 10:10

grub-customizer helped me. It auto-detected Windows 7 for me and I was able to add it and change position and title in the menu.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update 
sudo apt-get install grub-customizer
share|improve this answer

Better use Boot Repair

  • either from an Ubuntu live-session (boot your computer on a Ubuntu live-CD or live-USB then choose "Try Ubuntu") or from your installed Ubuntu session (if you can access it)

  • connect to the Internet

  • open a new Terminal, then type the following commands (press Enter after each line):

    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt-get update
    sudo apt-get install -y boot-repair && boot-repair

Recommended repair
1. launch Boot-Repair from either :

  • the Dash (the Ubuntu logo at the top-left of the screen)
  • or by typing 'boot-repair' in a terminal

    1. Then click the "Recommended repair" button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a paper, then reboot and check if you recovered access to your OSs.
    2. If the repair did not succeed, indicate the URL to people who help you by email or forum.
share|improve this answer

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.