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.

When I turn on the computer, I can see the GRUB and boot into Ubuntu. But I can't boot into Windows because I don't see it in the GRUB.

I have tried both boot-repair and sudo update-grub to no avail. It is probably worth mentioning that the BIOS uses UEFI to manage it's booting.

I have Ubuntu 12.10 and Windows 7 installed somewhere on the same drive.

Why is the MBR on /dev/sdb?


This is the output of bootinfoscript:

>                   Boot Info Script 0.61      [1 April 2012]
> 
> 
> ============================= Boot Info Summary: ===============================
> 
>  => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at
> sector 2048 
>     of the same hard drive for core.img. core.img is at this location and 
>     looks in partition 72 for .  => Windows is installed in the MBR of /dev/sdb.
> 
> sda1:
> __________________________________________________________________________
> 
>     File system:       BIOS Boot partition
>     Boot sector type:  Grub2's core.img
>     Boot sector info: 
> 
> sda2:
> __________________________________________________________________________
> 
>     File system:       
>     Boot sector type:  -
>     Boot sector info: 
>     Mounting failed:   mount: unknown filesystem type ''
> 
> sda3:
> __________________________________________________________________________
> 
>     File system:       ntfs
>     Boot sector type:  Windows Vista/7: NTFS
>     Boot sector info:  No errors found in the Boot Parameter Block.
>     Operating System:  Windows 7
>     Boot files:        /Windows/System32/winload.exe
> 
> sda4:
> __________________________________________________________________________
> 
>     File system:       ext4
>     Boot sector type:  -
>     Boot sector info: 
>     Operating System:  Ubuntu 12.10
>     Boot files:        /boot/grub/grub.cfg /etc/fstab
> 
> sda5:
> __________________________________________________________________________
> 
>     File system:       swap
>     Boot sector type:  -
>     Boot sector info: 
> 
> sdb1:
> __________________________________________________________________________
> 
>     File system:       ntfs
>     Boot sector type:  Windows Vista/7: NTFS
>     Boot sector info:  No errors found in the Boot Parameter Block.
>     Operating System:  
>     Boot files:        
> 
> ============================ Drive/Partition Info: =============================
> 
> Drive: sda
> _____________________________________________________________________
> 
> Disk /dev/sda: 128.0 GB, 128035676160 bytes 255 heads, 63
> sectors/track, 15566 cylinders, total 250069680 sectors Units =
> sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512
> bytes / 512 bytes
> 
> Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
> 
> /dev/sda1                   1   250,069,679   250,069,679  ee GPT
> 
> 
> GUID Partition Table detected.
> 
> Partition    Start Sector    End Sector  # of Sectors System /dev/sda1
> 2,048       206,847       204,800 BIOS Boot partition /dev/sda2       
> 206,848       468,991       262,144 Microsoft Reserved Partition
> (Windows) /dev/sda3         468,992   153,599,999   153,131,008 Data
> partition (Windows/Linux) /dev/sda4     153,600,000   235,630,591   
> 82,030,592 EFI System partition /dev/sda5     235,630,592  
> 250,068,991    14,438,400 Swap partition (Linux)
> 
> Drive: sdb
> _____________________________________________________________________
> 
> Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63
> sectors/track, 121601 cylinders, total 1953525168 sectors Units =
> sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512
> bytes / 4096 bytes
> 
> Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
> 
> /dev/sdb1    *          2,048 1,953,521,663 1,953,519,616   7 NTFS /
> exFAT / HPFS
> 
> 
> "blkid" output:
> ________________________________________________________________
> 
> Device           UUID                                   TYPE      
> LABEL
> 
> /dev/sda3        D2D6C580D6C56577                       ntfs       
> /dev/sda4        a0377dfb-e3c9-4000-972b-0e4300d38516   ext4       
> /dev/sda5        69411fce-44e7-42c5-8cfe-b6a8e03e0a89   swap       
> /dev/sdb1        844E93694E935332                       ntfs      
> andante
> 
> ================================ Mount points: =================================
> 
> Device           Mount_Point              Type       Options
> 
> /dev/sda4        /                        ext4      
> (rw,errors=remount-ro)
> 
> 
> =========================== sda4/boot/grub/grub.cfg: ===========================
> 
> --------------------------------------------------------------------------------
> #
> # DO NOT EDIT THIS FILE
> #
> # It is automatically generated by grub-mkconfig using templates
> # from /etc/grub.d and settings from /etc/default/grub
> #
> 
> ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then   set have_grubenv=true   load_env fi set default="0"
> 
> if [ x"${feature_menuentry_id}" = xy ]; then  
> menuentry_id_option="--id" else   menuentry_id_option="" fi
> 
> export menuentry_id_option
> 
> if [ "${prev_saved_entry}" ]; then   set
> saved_entry="${prev_saved_entry}"   save_env saved_entry   set
> prev_saved_entry=   save_env prev_saved_entry   set boot_once=true fi
> 
> function savedefault {   if [ -z "${boot_once}" ]; then
>     saved_entry="${chosen}"
>     save_env saved_entry   fi }
> 
> function recordfail {   set recordfail=1   if [ -n "${have_grubenv}"
> ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi }
> 
> function load_video {   if [ x$feature_all_video_module = xy ]; then
>     insmod all_video   else
>     insmod efi_gop
>     insmod efi_uga
>     insmod ieee1275_fb
>     insmod vbe
>     insmod vga
>     insmod video_bochs
>     insmod video_cirrus   fi }
> 
> if [ x$feature_default_font_path = xy ] ; then    font=unicode else
> insmod part_gpt insmod ext2 set root='hd0,gpt4' if [
> x$feature_platform_search_hint = xy ]; then   search --no-floppy
> --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516 else   search --no-floppy --fs-uuid --set=root
> a0377dfb-e3c9-4000-972b-0e4300d38516 fi
>     font="/usr/share/grub/unicode.pf2" fi
> 
> if loadfont $font ; then   set gfxmode=auto   load_video   insmod
> gfxterm   set locale_dir=$prefix/locale   set lang=en_US   insmod
> gettext fi terminal_output gfxterm if [ "${recordfail}" = 1 ]; then  
> set timeout=-1 else   set timeout=10 fi
> ### END /etc/grub.d/00_header ###
> 
> ### BEGIN /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set
> menu_color_highlight=black/light-gray if background_color 44,0,30;
> then   clear fi
> ### END /etc/grub.d/05_debian_theme ###
> 
> ### BEGIN /etc/grub.d/10_linux ### function gfxmode {     set gfxpayload="${1}"   if [ "${1}" = "keep" ]; then        set
> vt_handoff=vt.handoff=7   else        set vt_handoff=     fi } if [
> "${recordfail}" != 1 ]; then   if [ -e ${prefix}/gfxblacklist.txt ];
> then
>     if hwmatch ${prefix}/gfxblacklist.txt 3; then
>       if [ ${match} = 0 ]; then
>         set linux_gfx_mode=keep
>       else
>         set linux_gfx_mode=text
>       fi
>     else
>       set linux_gfx_mode=text
>     fi   else
>     set linux_gfx_mode=keep   fi else   set linux_gfx_mode=text fi export linux_gfx_mode if [ "${linux_gfx_mode}" != "text" ]; then
> load_video; fi menuentry 'Ubuntu' --class ubuntu --class gnu-linux
> --class gnu --class os $menuentry_id_option 'gnulinux-simple-a0377dfb-e3c9-4000-972b-0e4300d38516' { recordfail
>   gfxmode $linux_gfx_mode     insmod gzio     insmod part_gpt     insmod ext2
>   set root='hd0,gpt4'     if [ x$feature_platform_search_hint = xy ]; then
>     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4
> --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516     else      search --no-floppy
> --fs-uuid --set=root a0377dfb-e3c9-4000-972b-0e4300d38516     fi  linux   /boot/vmlinuz-3.5.0-26-generic
> root=UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 ro   quiet splash
> $vt_handoff   initrd  /boot/initrd.img-3.5.0-26-generic } submenu
> 'Advanced options for Ubuntu' $menuentry_id_option
> 'gnulinux-advanced-a0377dfb-e3c9-4000-972b-0e4300d38516' {    menuentry
> 'Ubuntu, with Linux 3.5.0-26-generic' --class ubuntu --class gnu-linux
> --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-26-generic-advanced-a0377dfb-e3c9-4000-972b-0e4300d38516'
> {     recordfail      gfxmode $linux_gfx_mode         insmod gzio         insmod
> part_gpt      insmod ext2         set root='hd0,gpt4'         if [
> x$feature_platform_search_hint = xy ]; then
>         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516        else
>         search --no-floppy --fs-uuid --set=root a0377dfb-e3c9-4000-972b-0e4300d38516      fi      echo    'Loading Linux
> 3.5.0-26-generic ...'         linux   /boot/vmlinuz-3.5.0-26-generic root=UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 ro   quiet splash
> $vt_handoff       echo    'Loading initial ramdisk ...'
>       initrd  /boot/initrd.img-3.5.0-26-generic   }   menuentry 'Ubuntu, with
> Linux 3.5.0-26-generic (recovery mode)' --class ubuntu --class
> gnu-linux --class gnu --class os $menuentry_id_option
> 'gnulinux-3.5.0-26-generic-recovery-a0377dfb-e3c9-4000-972b-0e4300d38516'
> {     recordfail      insmod gzio         insmod part_gpt         insmod ext2         set
> root='hd0,gpt4'       if [ x$feature_platform_search_hint = xy ]; then
>         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516        else
>         search --no-floppy --fs-uuid --set=root a0377dfb-e3c9-4000-972b-0e4300d38516      fi      echo    'Loading Linux
> 3.5.0-26-generic ...'         linux   /boot/vmlinuz-3.5.0-26-generic root=UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 ro recovery nomodeset 
>       echo    'Loading initial ramdisk ...'
>       initrd  /boot/initrd.img-3.5.0-26-generic   }   menuentry 'Ubuntu, with
> Linux 3.5.0-17-generic' --class ubuntu --class gnu-linux --class gnu
> --class os $menuentry_id_option 'gnulinux-3.5.0-17-generic-advanced-a0377dfb-e3c9-4000-972b-0e4300d38516'
> {     recordfail      gfxmode $linux_gfx_mode         insmod gzio         insmod
> part_gpt      insmod ext2         set root='hd0,gpt4'         if [
> x$feature_platform_search_hint = xy ]; then
>         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516        else
>         search --no-floppy --fs-uuid --set=root a0377dfb-e3c9-4000-972b-0e4300d38516      fi      echo    'Loading Linux
> 3.5.0-17-generic ...'         linux   /boot/vmlinuz-3.5.0-17-generic root=UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 ro   quiet splash
> $vt_handoff       echo    'Loading initial ramdisk ...'
>       initrd  /boot/initrd.img-3.5.0-17-generic   }   menuentry 'Ubuntu, with
> Linux 3.5.0-17-generic (recovery mode)' --class ubuntu --class
> gnu-linux --class gnu --class os $menuentry_id_option
> 'gnulinux-3.5.0-17-generic-recovery-a0377dfb-e3c9-4000-972b-0e4300d38516'
> {     recordfail      insmod gzio         insmod part_gpt         insmod ext2         set
> root='hd0,gpt4'       if [ x$feature_platform_search_hint = xy ]; then
>         search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  a0377dfb-e3c9-4000-972b-0e4300d38516        else
>         search --no-floppy --fs-uuid --set=root a0377dfb-e3c9-4000-972b-0e4300d38516      fi      echo    'Loading Linux
> 3.5.0-17-generic ...'         linux   /boot/vmlinuz-3.5.0-17-generic root=UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 ro recovery nomodeset 
>       echo    'Loading initial ramdisk ...'
>       initrd  /boot/initrd.img-3.5.0-17-generic   } }
> 
> ### END /etc/grub.d/10_linux ###
> 
> ### BEGIN /etc/grub.d/20_linux_xen ###
> 
> ### END /etc/grub.d/20_linux_xen ###
> 
> ### BEGIN /etc/grub.d/30_os-prober ###
> ### END /etc/grub.d/30_os-prober ###
> 
> ### BEGIN /etc/grub.d/30_uefi-firmware ###
> ### END /etc/grub.d/30_uefi-firmware ###
> 
> ### BEGIN /etc/grub.d/40_custom ###
> # This file provides an easy way to add custom menu entries.  Simply type the
> # menu entries you want to add after this comment.  Be careful not to change
> # the 'exec tail' line above.
> ### END /etc/grub.d/40_custom ###
> 
> ### BEGIN /etc/grub.d/41_custom ### if [ -f  ${config_directory}/custom.cfg ]; then   source
> ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f 
> $prefix/custom.cfg ]; then   source $prefix/custom.cfg; fi
> ### END /etc/grub.d/41_custom ###
> --------------------------------------------------------------------------------
> 
> =============================== sda4/etc/fstab: ================================
> 
> --------------------------------------------------------------------------------
> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a
> # device; this may be used with UUID= as a more robust way to name devices
> # that works even if disks are added and removed. See fstab(5).
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> # / was on /dev/sda4 during installation UUID=a0377dfb-e3c9-4000-972b-0e4300d38516 /               ext4   
> errors=remount-ro 0       1
> # /boot/efi was on /dev/sda1 during installation
> #UUID=04AF-A81D  /boot/efi       vfat    defaults        0       1
> # swap was on /dev/sda5 during installation UUID=69411fce-44e7-42c5-8cfe-b6a8e03e0a89 none            swap    sw  
> 0       0
> #UUID=04AF-A81D   /boot/efi   vfat    defaults    0   1
> --------------------------------------------------------------------------------
> 
> =================== sda4: Location of files loaded by Grub: ====================
> 
>            GiB - GB             File                                 Fragment(s)
> 
>   81.396614075 = 87.398948864   boot/grub/grub.cfg                             1
>   85.545436859 = 91.853713408   boot/initrd.img-3.5.0-17-generic               1
>   74.295482635 = 79.774167040   boot/initrd.img-3.5.0-26-generic               1
>   81.375942230 = 87.376752640   boot/vmlinuz-3.5.0-17-generic                  1
>   74.129776001 = 79.596240896   boot/vmlinuz-3.5.0-26-generic                  1
>   74.295482635 = 79.774167040   initrd.img                                     1
>   74.295482635 = 79.774167040   initrd.img.old                                 1
>   74.129776001 = 79.596240896   vmlinuz                                        1
>   74.129776001 = 79.596240896   vmlinuz.old                                    1

share|improve this question
    
What is the problem? And what is the main question? –  Lucio Mar 22 '13 at 19:16
    
The problem is that Windows 7 is missing from the grub menu. The main question is how to retrieve it. –  user142605 Mar 22 '13 at 19:18
    
Have you tried with the next post? How can I repair grub? –  Lucio Mar 22 '13 at 19:34
    
Also, what happen when you turn on the computer? It boot directly into Ubuntu? –  Lucio Mar 22 '13 at 19:35
    
I have reinstalled grub a few times. But my problem is that Windows has disappeared from the grub menu. When I turn on my computer the grub menu appears, but only with an ubuntu option. –  user142605 Mar 22 '13 at 19:50
show 1 more comment

2 Answers

Just execute sudo update-grub and sudo update-initramfs -u. And it should be done.
In case that your Windows is located on /dev/sda1 the sudo update-grub command should contain Windows 7 (loader) auf /dev/sda1 gefunden (German localization)

share|improve this answer
add comment

sudo update-grub

https://help.ubuntu.com/community/Boot-Repair#A2nd_option_:_install_Boot-Repair_in_Ubuntu

I had a similar problem with 12.04

share|improve this answer
    
Can you include a answer with instructions on how to do that? Leaving a half-answer as a comment can often cause more harm than good. Thanks! –  Lucio Mar 22 '13 at 19:17
    
Sorry for that, –  za3bolla Mar 22 '13 at 19:18
    
Thanks @za3bolla I did try boot-repair... think it might be what messed things up in the first place. Windows used to be listed as a UEFI boot option in the BIOS as well, now it isn't there at all. –  user142605 Mar 22 '13 at 19:20
    
Go in live Ubuntu and download the tool in the link and install it and click : Repair It should repair grub and Ubuntu can boot no problems, but if windows is not showing the grub boot menu, go to ubuntu desktop the one that is installed on you machine and and type in the terminal : sudo update-grub –  za3bolla Mar 22 '13 at 19:20
    
update-grub did not work either –  user142605 Mar 22 '13 at 19:21
show 1 more 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.