Sunday, August 19, 2018

windows 7 - boot-repair Does not add Widnows 7 to the grub menu



I have a laptop with Debian 7, Windows 7 and Ubuntu 13.04. I have decided to upgrade to Ubuntu 13.10, and installed the Ubuntu partition afresh.



After the re-installation, Windows 7 disappeared from the grub menu. I booted the machine with a live cd and started boot-repair.




Boot-repair seemed to have identified the installed OS's well, including the Windows partition:



...
sda5: __________________________________________________________________________

File system: ext4
Boot sector type: Grub2 (v1.99-2.00)
Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of
sda5 and looks at sector 817082808 of the same hard
drive for core.img, but core.img can not be found at

this location.
Operating System: Ubuntu 13.10
Boot files: /boot/grub/grub.cfg /etc/fstab
/boot/grub/i386-pc/core.img
...


And the installation went well without errors:



grub-install (GRUB) 2.00-19ubuntu2.1,grub-install (GRUB) 2.


Reinstall the GRUB of sda5 into the MBR of sda
Installation finished. No error reported.
grub-install /dev/sda: exit code of grub-install /dev/sda:0

chroot /mnt/boot-sav/sda5 update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found linux image: /boot/vmlinuz-3.11.0-12-generic

Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found Debian GNU/Linux (7.0) on /dev/sda6
Unhide GRUB boot menu in sda5/boot/grub/grub.cfg

Boot successfully repaired.

You can now reboot your computer.


The full report is available here.




Still, after reboot I only see the Ubuntu and Debian records in grub, without the Windows 7 section:



enter image description here



Any idea what's wrong with the boot-repair fix attempt?



Oddly enough, update-grub did the trick:



$ sudo update-grub

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found linux image: /boot/vmlinuz-3.11.0-12-generic
Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found Windows 8 (loader) on /dev/sda1
Found Windows 8 (loader) on /dev/sda2
Found Windows Recovery Environment (loader) on /dev/sda4
Found Debian GNU/Linux (7.0) on /dev/sda6
done


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...