2

So, I had bought a new laptop which came preinstalled with Ubuntu 14.04 but I later installed Windows 10 after removing Ubuntu, I backed up laptop vendor's Ubuntu image though which came on the laptop.

Later, I decided to have a dual boot configuration so I installed Ubuntu using the same vendor image I had backed up. Ubuntu installed succesfully but now I am unable to boot into Windows as it is not showing up as an entry in grub.

I tried boot-repair but it doesn't seem to work. Although I got the url http://paste.ubuntu.com/14429794/ It keeps repeating the message to 'unmount partitions' even in a live-usb system. I then tried bootscriptinfo which gave the output given below.

Also, I am sure that the whole windows partition is intact as I can see all the files in Ubuntu, it's just that I can't boot from it.

EDIT: I also tried the setroot method in the grub command line but it gave an error saying that the EFI path is not valid.

Any help would be greatly appreciated as I have already spent much time scouring forums and searching on Google.

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Windows is installed in the MBR of /dev/sda.
 => Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/ubuntu/grubx64.efi 
                       /efi/ubuntu/MokManager.efi /efi/ubuntu/shimx64.efi

sda2: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda3: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /efi/boot/bootx64.efi 
                       /efi/boot/grubx64.efi

sda4: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: wrong fs type, bad option, bad superblock on /dev/sda4,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


sda5: __________________________________________________________________________

    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:        /bootmgr /Windows/System32/winload.exe

sda6: __________________________________________________________________________

    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:        

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 14.04 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab 
                       /boot/extlinux/extlinux.conf

sda8: __________________________________________________________________________

    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:        

sda9: __________________________________________________________________________

    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:        

sda10: _________________________________________________________________________

    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:        

sda11: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.05 20140113
    Boot sector info:  Syslinux looks at sector 10154144 of /dev/sdb1 for 
                       its second stage. SYSLINUX is installed in the  
                       directory. No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /syslinux.cfg 
                       /efi/BOOT/bootx64.efi /efi/BOOT/grubx64.efi /bootmgr 
                       /boot/bcd /ldlinux.sys

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 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/sda1                   1 1,953,525,167 1,953,525,167  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048     1,026,047     1,024,000 EFI System partition
/dev/sda2       1,026,048     1,107,967        81,920 -
/dev/sda3       1,107,968     7,399,423     6,291,456 Data partition (Windows/Linux)
/dev/sda4       7,399,424     7,432,191        32,768 Microsoft Reserved Partition (Windows)
/dev/sda5       7,432,192   132,347,903   124,915,712 EFI System partition
/dev/sda6     132,347,904   133,269,503       921,600 Windows Recovery Environment (Windows)
/dev/sda7     133,269,504   238,127,103   104,857,600 Data partition (Windows/Linux)
/dev/sda8     238,127,104   868,321,279   630,194,176 Data partition (Windows/Linux)
/dev/sda9     868,321,280 1,393,657,855   525,336,576 Data partition (Windows/Linux)
/dev/sda10  1,393,657,856 1,918,994,431   525,336,576 Data partition (Windows/Linux)
/dev/sda11  1,918,994,432 1,953,523,711    34,529,280 Swap partition (Linux)

Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 16.2 GB, 16219373568 bytes
255 heads, 63 sectors/track, 1971 cylinders, total 31678464 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/sdb1    *             63    31,678,463    31,678,401   c W95 FAT32 (LBA)


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        008D-EE2D                              vfat       ESP
/dev/sda10       5430D21630D1FF44                       ntfs       New Volume
/dev/sda11       8b83b838-ad2b-4260-94b4-9480fd5b947d   swap       
/dev/sda2        0800-FF07                              vfat       DIAGS
/dev/sda3        A801-BD4C                              vfat       OS
/dev/sda4        7722aa47-a14c-4c99-a04e-8d5485dcbacc   ext4       
/dev/sda5        C6026F98026F8C6D                       ntfs       
/dev/sda6        BED4F2F6D4F2AFAF                       ntfs       
/dev/sda7        532c4cae-d2a5-49c8-8663-0af5e26cad1f   ext4       
/dev/sda8        16EC940EEC93E5F1                       ntfs       New Volume
/dev/sda9        9696C50A96C4EBB5                       ntfs       New Volume
/dev/sdb1        BE1A-5D9E                              vfat       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda10       /media/sachinkadyan7/New Volume1 fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda1        /boot/efi                vfat       (rw)
/dev/sda5        /media/sachinkadyan7/C6026F98026F8C6D fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda6        /media/sachinkadyan7/BED4F2F6D4F2AFAF fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda7        /                        ext4       (rw,errors=remount-ro)
/dev/sda9        /media/sachinkadyan7/New Volume fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb1        /media/sachinkadyan7/BE1A-5D9E vfat       (rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


=========================== sda3/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#########################################################
#                                                       #
# Dell Grub2 configuration file for ISO Images          #
# By: Mario Limonciello     #
#                                                       #
#########################################################

# First check for additional options on ISO image
if [ -s /factory/common.cfg ]; then
    source /factory/common.cfg
fi

#Post RTS deliverables
if [ -s /factory/post-rts-gfx.cfg ]; then
    source /factory/post-rts-gfx.cfg
fi
if [ -s /factory/post-rts-wlan.cfg ]; then
    source /factory/post-rts-wlan.cfg
fi

# If missing, load a nice basic default set
if [ -z "${options}" ]; then
    set options="boot=casper automatic-ubiquity noprompt quiet splash --"
fi

# Setup theme
set timeout=5
set gfxmode=auto
insmod gfxterm
terminal_output gfxterm
loadfont /boot/grub/dejavu-sans-12.pf2
loadfont /boot/grub/dejavu-sans-bold-14.pf2
insmod gfxmenu
insmod png
set theme=/boot/grub/dell/theme.txt

# Search for the RP (which contains grubenv in /factory)
search --file --set=new_root /factory/grubenv
if [ -s ($new_root)/factory/grubenv ]; then
    set have_grubenv=true
    load_env -f ($new_root)/factory/grubenv
    if [ -n "${install_finished}" ]; then
        set timeout=-1
        menuentry "Install Complete, remove media and reboot." {
        chainloader +1
        }
    fi
    if [ "x${install_in_progress}" = "x1" ]; then
        set root=$new_root
        configfile ($new_root)/factory/grub.cfg
    fi
fi

#Default behavior
menuentry "Dell Recovery" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi $options
    initrd  /casper/initrd.lz
}

menuentry "Dell Recovery (safe graphics mode)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi $options ubiquity/force_failsafe_graphics=true
    initrd  /casper/initrd.lz
}
--------------------------------------------------------------------------------

=================== sda3: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


=========================== sda7/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
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

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,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  532c4cae-d2a5-49c8-8663-0af5e26cad1f
else
  search --no-floppy --fs-uuid --set=root 532c4cae-d2a5-49c8-8663-0af5e26cad1f
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_IN
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
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
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-532c4cae-d2a5-49c8-8663-0af5e26cad1f' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  532c4cae-d2a5-49c8-8663-0af5e26cad1f
    else
      search --no-floppy --fs-uuid --set=root 532c4cae-d2a5-49c8-8663-0af5e26cad1f
    fi
    linux   /boot/vmlinuz-3.13.0-38-generic.efi.signed root=UUID=532c4cae-d2a5-49c8-8663-0af5e26cad1f ro  quiet splash  radeon.modeset=0 nouveau.modeset=0 $vt_handoff
    initrd  /boot/initrd.img-3.13.0-38-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-532c4cae-d2a5-49c8-8663-0af5e26cad1f' {
    menuentry 'Ubuntu, with Linux 3.13.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-38-generic-advanced-532c4cae-d2a5-49c8-8663-0af5e26cad1f' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  532c4cae-d2a5-49c8-8663-0af5e26cad1f
        else
          search --no-floppy --fs-uuid --set=root 532c4cae-d2a5-49c8-8663-0af5e26cad1f
        fi
        echo    'Loading Linux 3.13.0-38-generic ...'
        linux   /boot/vmlinuz-3.13.0-38-generic.efi.signed root=UUID=532c4cae-d2a5-49c8-8663-0af5e26cad1f ro  quiet splash  radeon.modeset=0 nouveau.modeset=0 $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-38-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-38-generic (safe mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-38-generic-recovery-532c4cae-d2a5-49c8-8663-0af5e26cad1f' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  532c4cae-d2a5-49c8-8663-0af5e26cad1f
        else
          search --no-floppy --fs-uuid --set=root 532c4cae-d2a5-49c8-8663-0af5e26cad1f
        fi
        echo    'Loading Linux 3.13.0-38-generic ...'
        linux   /boot/vmlinuz-3.13.0-38-generic.efi.signed root=UUID=532c4cae-d2a5-49c8-8663-0af5e26cad1f ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.13.0-38-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/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
    fwsetup
}
### 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 ###
--------------------------------------------------------------------------------

=============================== sda7/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).
#
#                
# / was on /dev/sda7 during installation
UUID=532c4cae-d2a5-49c8-8663-0af5e26cad1f /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=008D-EE2D  /boot/efi       vfat    defaults        0       1
# swap was on /dev/sda11 during installation
UUID=8b83b838-ad2b-4260-94b4-9480fd5b947d none            swap    sw              0       0
--------------------------------------------------------------------------------

====================== sda7/boot/extlinux/extlinux.conf: =======================

--------------------------------------------------------------------------------
## /boot/extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: extlinux-update


default l0
prompt 1
timeout 50

include themes/debian/theme.cfg
--------------------------------------------------------------------------------

=================== sda7: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


================= sda7: Location of files loaded by Syslinux: ==================

           GiB - GB             File                                 Fragment(s)


============== sda7: Version of COM32(R) files used by Syslinux: ===============

 boot/extlinux/chain.c32            :  COM32R module (v4.xx)

=========================== sdb1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Try Ubuntu without installing" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
    initrd  /casper/initrd.lz
}
menuentry "Install Ubuntu" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --
    initrd  /casper/initrd.lz
}
menuentry "OEM install (for manufacturers)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash oem-config/enable=true --
    initrd  /casper/initrd.lz
}
menuentry "Check disc for defects" {
    set gfxpayload=keep
    linux   /casper/vmlinuz.efi  boot=casper integrity-check quiet splash --
    initrd  /casper/initrd.lz
}
2
  • You are showing two ESP - efi system partitions. Boot flag with gpt must only be on one ESP per device/drive for most systems. The old BIOS boot flag would be on the Windows bootable partition which it looks like you have with your Windows. You have mixed UEFI & BIOS.
    – oldfred
    Aug 19, 2016 at 19:53
  • I agree with @oldfred: you have 2 EFI partitions on 2 separate disks: that will never work unless you change the bot in the UEFI system settings (aka "BIOS")
    – Fabby
    Nov 12, 2018 at 18:48

1 Answer 1

1

Answer

I experienced some similar issue with original Windows 10 setup and later installation of Ubuntu 14.04. I had a broken Ubuntu (due to some unknown Nvidia driver issue) and lost Windows boot loader.

Assumption being made:

  1. Your Windows OS was installed using MBR mode (like mine).

If those were true, I would suggest you could "Create a Windows Recovery Disk" from another Windows 10 machine, which would provide you a minimal command line tool you could use. Then follow this answer to fix mbr (assuming your Windows OS lives in drive C):

bootsect /nt60 C: /mbr

Then reboot your computer. This will restore the Windows boot loader.

More Information

I later learned about the relationship of MBR, BIOS mode, GPT, UEFI mode. Basically, MBR would pair with BIOS mode and GPT would pair with UEFI mode. (Source)

The boot loader mess was caused by the mismatching of Windows OS boot mode and Ubuntu boot mode. (Source)

Not the answer you're looking for? Browse other questions tagged .