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.

I installed ubuntu 12.04 after installing windows 7. I have 2 hard disks, one SSD and another HDD. Windows was installed in the HDD, and I wanted ubuntu on my SSD. I chose to have boot files in the SSD where I had installed ubuntu. Initially after the installation it didn't show the dual boot option and directly booted to ubuntu. But after going through some suggestions I used boot-repair and got GRUB repaired/installed. But when I restarted again in the boot options I didn't find the Windows 7 option. I fear that I have accidentally deleted the windows boot files. This is the link I got after boot-repair: http://paste.ubuntu.com/1615740/

share|improve this question
    
I don't think you have deleted anything. For some reason os-prober is detecting your windows installation on /dev/sdb1. From the log file "Windows not detected by os-prober on sdb1." –  Paul van Schayck Feb 6 '13 at 10:08

2 Answers 2

Looking at it a bit more, I suspect that running the following command in the Windows 7 installation CD repair console will allow os-prober to find your windows installation.

bootrec /fixboot

After running the command. Reboot, you will most likely still only boot into Ubuntu. So then rerun the boot-repair script. If you've got any trouble please submit the new pastebin.

share|improve this answer
    
I saw this answer after I wrote the longer answer below, but I think this might provide the real and permanent solution provided that Windows setup/recovery CD is available and that it doesn't override Grub (dual-boot menu). –  Sadi Feb 6 '13 at 10:25

You can try rebooting after manually modifying your grub menu very, very carefully by opening Terminal and entering sudo gedit /boot/grub/grub.cfg, and inserting the following text at the end of the /etc/grub.d/40_custom section, immediately above the last line containing "END /etc/grub.d/40_custom":

menuentry 'Windows 7' --class windows --class os $menuentry_id_option 'osprober-chain-9E8A1E4F8A1E2475' {
insmod part_msdos
insmod ntfs
set root='hd1,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 9E8A1E4F8A1E2475
else
search --no-floppy --fs-uuid --set=root 9E8A1E4F8A1E2475
fi
chainloader +1
}

If this works, you can make this menu entry permanent by performing the same insertion on the file "/etc/grub.d/40_custom" with this Terminal command: sudo gedit /etc/grub.d/40_custom

This might serve as a workaround if this is because your Ubuntu/Grub somehow cannot detect Windows.

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.