1

if this post would be better in the Ubuntu Forum just let me know.

The title is my problem and after much research and note taking I have a hypothetical solution, but I want to ask what others who know more about these things than I if it is feasible or what better solution there could be.

Essentially I have two OS installed: Windows-7 Home Premium and Xubuntu 14.04 (Trusty).

Each is installed on its own drive: Win-7 on a 120-GB OCZ SSD, Linux on a 1-TB WD HDD.

STATE OF THINGS:

My motherboard is the Gigabyte GA-Z77X-UD3H(rev-1) installed on a self-built machine purchased without any OS installed a couple of years ago.

Both drives are GPT formatted and the mobo is being asked by me to boot only in UEFI mode ("CSM Support" set to Never in the UEFI screen).

Secure Boot and Fast Boot are disabled.

My motherboard (UEFI) shows three options as boot drives:

  1. ubuntu -> works fine, installed on 2nd drive

  2. WDC WDC1002FAEX-00Y9A0 -> does not work, simply because the (2nd drive, HDD) ESP which it point to is empty

  3. Windows Boot Manager -> does not work, installed on 1st drive

I have one ESP on each drive:

  • sda5, fat32 (the one being used by GRUB/Linux)
  • sdb1, fat32 (empty)

I know that the 5th partition of a drive is a weird place for the ESP, see my comments in the "solution" section below.

My GRUB menu is a mess: 9 options total, 4 of which contain "Windows" in their name, none of which work. I know some of them were created by "Boot Repair" and I will delete them when I am more confident. Despite all this my "ubuntu" entry in GRUB is functional. I'm using it (Xubuntu) right now and have been for a few weeks.

I will not get into the how my machine got to this state, unless someone asks. This post would be too long. Let's just say that I have used both Windows and Xubuntu, have upgraded Xubuntu from 12.04 to 14.04, created problems with the later, BIOS firmware update and other things. Right now I am using Xubuntu but will have to reinstall it because of "Locale" problems which I can't fix. Everything important to me is already backed up on an external hard drive connected via usb.

MY PROPOSED SOLUTION:

First I want to copy the content of an EFI System Partition from one drive to another, in order to keep and use both of them. Of course I don't mean use them simultaneously. I mean use the one on the first drive when that drive is selected as the first one in the UEFI's screen options, and the other one when that other one is the first. If it is possible, and if that could be a solution to my problem, I would afterwards take care of updating GRUB so that it reflects the changes made.

In the end, I would like to have an ESP in each drive, sda1 and sdb1, a conventional setup in other words, but if it's too complicated or if it's better to have only one for both drives/OS I want it to be on my Linux drive (2nd, 1-TB HDD). I would like to physically isolate Linux from Windows. For me Linux is my workshop and Windows is a toy, I mainly play games on it and only locally and I've read an awful lot of posts about Windows installations that screwed up a Linux one, and a small number about the other way around.

About my active/used ESP on my first drive (SSD, where Windows System lives):

I have read many times that an ESP should reside near the beginning of a drive. Although the "order" of partition certainly does not have the same meaning on a SSD as on a HDD, I would like to move it to sda1, but I can do that later, probably after re-formatting my entire SSD, and before reinstalling Windows. Maybe I will try to just move my existing partitions with some program like PMagic just to see if it works. I don't care that much about my current Windows setup, but if I can save an afternoon by not re-installing everything, that may be worth it.

Another issue is that I'm pretty sure any ESP partition should have the "boot flag" set, as opposed to a "/boot" partition but I would like a confirmation on this, particularly I'm not sure if a computer should have only one set at any one time, like in a case like mine with two drives each with its own OS. I got confused throughout my readings about a lot of things because of the MBR vs. GPT stuff and this machine is my first dual-boot one.


I already have a bootinfoscript output file and can add it to this if needed.

Thanks in advance for any comments/suggestions.


                  Boot Info Script 0.61      [1 April 2012]

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

 => No boot loader is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________
    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

sda2: __________________________________________________________________________
    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:        

sda3: __________________________________________________________________________
    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda4: __________________________________________________________________________
    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda5: __________________________________________________________________________
    File system:       vfat
    Boot sector type:  Windows 7: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda6: __________________________________________________________________________
    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''

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

sdb2: __________________________________________________________________________
    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        /grub/grub.cfg

sdb3: __________________________________________________________________________
    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 14.04.3 LTS
    Boot files:        /etc/fstab

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

sdb5: __________________________________________________________________________
    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:        

sdb6: __________________________________________________________________________
    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sdb7: __________________________________________________________________________
    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: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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   234,441,647   234,441,647  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           4,096    65,835,007    65,830,912 Data partition (Windows/Linux)
/dev/sda2      65,835,008   150,996,991    85,161,984 Data partition (Windows/Linux)
/dev/sda3     150,996,992   152,020,991     1,024,000 Data partition (Windows/Linux)
/dev/sda4     152,020,992   193,230,847    41,209,856 Data partition (Windows/Linux)
/dev/sda5     193,230,848   193,435,647       204,800 EFI System partition
/dev/sda6     193,435,648   193,697,791       262,144 Microsoft Reserved Partition (Windows)

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 / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1                   1 1,953,525,167 1,953,525,167  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdb1           4,096       409,599       405,504 EFI System partition
/dev/sdb2         409,600     7,925,759     7,516,160 Data partition (Linux)
/dev/sdb3       7,925,760    69,365,759    61,440,000 Data partition (Linux)
/dev/sdb4      89,845,760   110,325,759    20,480,000 Swap partition (Linux)
/dev/sdb5     110,325,760   929,525,759   819,200,000 Data partition (Windows/Linux)
/dev/sdb6   1,093,365,760 1,421,045,759   327,680,000 Data partition (Linux)
/dev/sdb7   1,421,045,760 1,830,645,759   409,600,000 Data partition (Windows/Linux)

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        1C2E866C1128BCD3                       ntfs       Win-7_System
/dev/sda2        5E2256D51B201E21                       ntfs       Win-7_Profile-Apps
/dev/sda3        906e461a-1473-4f4f-a365-d0ce199765aa   ext4       Linux-SSD BOOT
/dev/sda4        81201b69-edac-4c7a-b878-79c6d487f569   ext4       Linux-SSD root
/dev/sda5        6A2D-CF9D                              vfat       EFI_SYSTEM
/dev/sdb1        6047-DBE8                              vfat       EFI_system
/dev/sdb2        dbba209a-c585-42f7-a408-17d6f8a587f8   ext4       boot_part
/dev/sdb3        a3eb9fbe-e91e-44ed-b826-071814a1be79   ext4       ROOT_part
/dev/sdb4        9e26bed2-0448-4ff9-af08-b469676e0ee1   swap       
/dev/sdb5        1AC8D5D5590C4FCC                       ntfs       AUDIO
/dev/sdb6        ac50468e-aeba-4fd2-8f9b-a728bc2cdb04   ext4       HOME
/dev/sdb7        1292A3272D072EC3                       ntfs       DOCS

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

Device           Mount_Point              Type       Options

/dev/sda5        /boot/efi                vfat       (rw)
/dev/sdb2        /boot                    ext4       (rw)
/dev/sdb3        /                        ext4       (rw,errors=remount-ro)
/dev/sdb5        /mnt/ntfs-int_AUDIO      fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb6        /home                    ext4       (rw)
/dev/sdb7        /mnt/ntfs-int_DOCS       fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)


=============== sdb2/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='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  a3eb9fbe-e91e-44ed-b826-071814a1be79
else
  search --no-floppy --fs-uuid --set=root a3eb9fbe-e91e-44ed-b826-071814a1be79
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=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  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
### 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-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd1,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  dbba209a-c585-42f7-a408-17d6f8a587f8
    else
      search --no-floppy --fs-uuid --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
    fi
    linux   /vmlinuz-3.16.0-53-generic.efi.signed root=UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79 ro  quiet splash $vt_handoff
    initrd  /initrd.img-3.16.0-53-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
    menuentry 'Ubuntu, with Linux 3.16.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-53-generic-advanced-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  dbba209a-c585-42f7-a408-17d6f8a587f8
        else
          search --no-floppy --fs-uuid --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
        fi
        echo    'Loading Linux 3.16.0-53-generic ...'
        linux   /vmlinuz-3.16.0-53-generic.efi.signed root=UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-53-generic
    }
    menuentry 'Ubuntu, with Linux 3.16.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-53-generic-recovery-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  dbba209a-c585-42f7-a408-17d6f8a587f8
        else
          search --no-floppy --fs-uuid --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
        fi
        echo    'Loading Linux 3.16.0-53-generic ...'
        linux   /vmlinuz-3.16.0-53-generic.efi.signed root=UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-53-generic
    }
    menuentry 'Ubuntu, with Linux 3.16.0-52-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-52-generic-advanced-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  dbba209a-c585-42f7-a408-17d6f8a587f8
        else
          search --no-floppy --fs-uuid --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
        fi
        echo    'Loading Linux 3.16.0-52-generic ...'
        linux   /vmlinuz-3.16.0-52-generic.efi.signed root=UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-52-generic
    }
    menuentry 'Ubuntu, with Linux 3.16.0-52-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-52-generic-recovery-a3eb9fbe-e91e-44ed-b826-071814a1be79' {
        recordfail
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  dbba209a-c585-42f7-a408-17d6f8a587f8
        else
          search --no-floppy --fs-uuid --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
        fi
        echo    'Loading Linux 3.16.0-52-generic ...'
        linux   /vmlinuz-3.16.0-52-generic.efi.signed root=UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-52-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/25_custom ###

menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root 6A2D-CF9D
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root 6A2D-CF9D
chainloader (${root})/EFI/Boot/bkpbootx64.efi
}

menuentry "EFI/ubuntu/MokManager.efi" {
search --fs-uuid --no-floppy --set=root 6A2D-CF9D
chainloader (${root})/EFI/ubuntu/MokManager.efi
}

menuentry "efi/EFI/Boot/bkpbootx64.efi" {
search --fs-uuid --no-floppy --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
chainloader (${root})/efi/EFI/Boot/bkpbootx64.efi
}

menuentry "efi/EFI/ubuntu/MokManager.efi" {
search --fs-uuid --no-floppy --set=root dbba209a-c585-42f7-a408-17d6f8a587f8
chainloader (${root})/efi/EFI/ubuntu/MokManager.efi
}
### END /etc/grub.d/25_custom ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda5)' --class windows --class os $menuentry_id_option 'osprober-efi-6A2D-CF9D' {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  6A2D-CF9D
    else
      search --no-floppy --fs-uuid --set=root 6A2D-CF9D
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### 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.
#
# ME:  I added what follows today, August 15 , 2015, when my Win-7 did't show
#      in the list of "boot items" in my UEFI screen, neither MBR nor EFI. I have
#      not yet re-installed Xubuntu 14.04.  I can't write French, accents not
#      working in "mousepad" or "ted".  Also I never solved my "locale" problem
#      and the "perl" error messages in terminal when I play with apt-get and
#      other packages/repositories related stuff.  ALL CSM STUFF NOW DISABLED,
#      CAN BOOT OK IN XUBUNTU ONLY.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
menuentry "Windows x86_64 UEFI-GPT" {
  search --fs-uuid --no-floppy --set=root UUID
**chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi**
}
### 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 ###

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

           GiB - GB             File                                 Fragment(s)

============== sdb3/etc/fstab: ===============

# /etc/fstab: static file system information.
#
# <file system>                           <mount point>   <type>   <options>          <dump>  <pass>
# / was on /dev/sdb3 during installation
UUID=a3eb9fbe-e91e-44ed-b826-071814a1be79       /          ext4     errors=remount-ro   0       1
# /boot was on /dev/sdb2 during installation
UUID=dbba209a-c585-42f7-a408-17d6f8a587f8       /boot      ext4     defaults            0       2
# /boot/efi was on /dev/sda5 during installation
#UUID=6A2D-CF9D                                  /boot/efi  vfat     defaults            0       1
# /home was on /dev/sdb6 during installation
UUID=ac50468e-aeba-4fd2-8f9b-a728bc2cdb04       /home      ext4     defaults            0       2
# swap was on /dev/sdb4 during installation
UUID=9e26bed2-0448-4ff9-af08-b469676e0ee1       none       swap     sw                  0       0
#
# /dev/sdb5: LABEL="AUDIO" MOI: "not mounted during installation"
UUID=1AC8D5D5590C4FCC      /mnt/ntfs-int_AUDIO    ntfs-3g   dmask=003,fmask=113,uid=1000,gid=1000,relatime,nls=utf8,x-gvfs-show  0  0
#
# /dev/sdb7: LABEL="DOCS" MOI: not mounted during installation
UUID=1292A3272D072EC3      /mnt/ntfs-int_DOCS     ntfs-3g   defaults,uid=1000,gid=1000,relatime,nls=utf8,x-gvfs-show,umask=002  0  0
UUID=6A2D-CF9D  /boot/efi   vfat    defaults    0   1

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

           GiB - GB             File                                 Fragment(s)

=============== StdErr Messages: ==============

cat: /tmp/BootInfo-eh5KWy4g/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-eh5KWy4g/Tmp_Log: No such file or directory

error message when selecting any of my Grub boot selections that contain "Windows" in their name:

" Widows failed to start ...
1. Install Windows installation disc and restart ... 2. Choose language ...
3. Click "Repair your computer." ...
File: \EFI\Microsoft\Boot\BCD Status: 0xc000000d
Info: An error occured while attempting to read the boot configuration data. "

The same message appears when I change the BOOT OPTIONS/ORDER in motherboard's UEFI screen by selecting "Windows Boot Manager" as the first boot device.

  • Can you try to boot-repair with advanced setup enabling repair windows boot files. – biozalp Nov 13 '15 at 7:07
  • biozalp: I may eventually try that but for the moment I'm trying to understand what goes on, and "Boot Repair" is a black box to me. Besides I've read in several posts about Boot Repair adding to the problems rather than simplifying things. For now I would rather get answers to my questions and try to do things manually... until I give up. I have actually used it recently and it did not solve another problem I had and it put a bunch of files in my ESP that I want to remove once I'm sure they are not used in the boot process. Thanks for the suggestion. – hockeykong Nov 13 '15 at 7:32
  • Also I forgot to say, everything is 64-bit, both operating systems and the machine. – hockeykong Nov 13 '15 at 7:46
  • if it's set well it's perfect – biozalp Nov 13 '15 at 7:54
  • Grub will not boot Windows that is hibernated or needs chkdsk. It really only boots working Windows. But can you directly boot Windows from UEFI boot menu or one time boot key? And then use f8 to get into Windows own repair console. I had to manually copy Ubuntu/grub efi files from sda to sdb's ESP. Grub only installs to sda's ESP. But systems seems to only see the efi files on sda. I only got grub to install to sdb drive when sda was disconnected and then seen as sda. Then UEFI drive order changed, so it lost entries & I had to manually add them. – oldfred Nov 13 '15 at 23:52
1

The easy stuff first: An ESP on a GPT disk has a partition type code of C12A7328-F81F-11D2-BA4B-00A0C93EC93B. This is too long and complex for human use, so programs use various shorthands to refer to this code. In GPT fdisk (gdisk, cgdisk, and sgdisk), its "EF00." In most libparted-based tools (parted, GParted, etc.), it's a "boot flag." Unfortunately, the libparted developers "hijacked" the "boot flag" nomenclature from the MBR boot flag (aka "active flag"), which is entirely unrelated to the ESP type code, although there is a vague conceptual relationship. This creates confusion, since in MBR, the boot flag is normally set on a partition that holds second-stage boot loader code, which in Linux would normally be the /boot or root (/) partition; but under GPT, the "boot flag" should be set only on the ESP. I recommend that you not think in terms of a "boot flag" on ESP disks, since that's a libparted-specific way of identifying an ESP. Instead, think in terms of the partition type (that is, that a partition is an ESP vs. a Linux filesystem partition vs. a Windows filesystem partition, etc.), and know that libparted identifies the ESP as having a "boot flag."

As to the rest, Boot Info Script output would indeed be helpful. The real question I have is just where the Windows boot process is going wrong. Your report that it "does not work" is imprecise, which makes it hard to suggest solutions. What are the precise symptoms when you select a Windows option? What are the Windows entries in grub.cfg? (Boot Info Script will show this detail.)

For a few wild stab-in-the-dark suggestions:

  • Download and prepare the USB flash drive or CD-R version of my rEFInd boot manager. You can then try booting with it. rEFInd generally does a better job of detecting the Windows boot loader and launching it than GRUB does, so this might get you into Windows; however, if the Windows boot loader is missing or damaged, rEFInd won't help. One advantage of trying this approach is that it's very low-risk; unless you install it to your disk, rEFInd won't disrupt your current boot configuration, even if it fails to help. If it does help, you can install rEFInd to your hard disk and be reasonably confident that it will work as well when booted that way as it does when booted from an external medium.
  • Run the Boot Repair tool. This is more of a leap of faith; it will either work or it won't, and if it doesn't, there's a small chance that it will make matters worse.
  • Run Windows repair tools. This option may help if the problem is that your Windows boot loader files are missing or damaged. If you need help on this, you should probably ask on a Windows forum.

Knowing whether to run a Linux-based repair, such as Boot Repair, or a Windows-based repair depends largely on determining whether your Windows boot problem is one of a bad GRUB configuration or missing or damaged Windows boot files. You can look for those files manually -- they should appear as EFI/Microsoft/Boot/bootmgfw.efi (and other files in the same directory) on one of your ESPs. If those files are completely missing, try a Windows repair. If the files are present, then either your GRUB configuration is messed up or the Windows files are damaged. (Note that "damaged" can include "replaced by GRUB." Some tools, including Boot Repair, will sometimes try to fix Linux boot problems by replacing the Windows boot loader with another copy of GRUB, usually renaming the Windows files to something else to keep them accessible.)

  • Sorry for the delay @RodSmith, I was away. I've read your answer and am trying to add the bootinfoscript but it's too long for "askubuntu.com". I've just figured out how to keep the formatting so it's readable but I have to take some stuff out so it will fit. I will also try adding a "tree" output of sda5 (/boot/efi) here in comments if I can. I'll be right back. – hockeykong Nov 15 '15 at 22:51
  • You've got GRUB entries for Windows boot loader files on /dev/sda5, but the script hasn't found those files. (It sometimes misses files, so this isn't necessarily a sign of trouble, but it does hinder further diagnosis.) Mounting /dev/sda5 to /boot/efi and running sudo find /boot/efi -iname "*.efi" might be helpful. Trying rEFInd may also be informative, or even provide a solution. – Rod Smith Nov 15 '15 at 23:41
  • ~$ sudo find /boot/efi -iname "*.efi" [sudo] password for mon-username: /boot/efi/EFI/Microsoft/Boot/bootmgr.efi /boot/efi/EFI/Microsoft/Boot/memtest.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Boot/bkpbootx64.efi /boot/efi/EFI/Boot/bootx64.efi /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/ubuntu/shimx64.efi /boot/efi/EFI/ubuntu/MokManager.efi /boot/efi/ubuntu/grubx64.efi /boot/efi/ubuntu/shimx64.efi /boot/efi/Boot/bootx64.efi /boot/efi/boot-sav/log/2015-08-14__00h07boot-repair28``/sda5/bootx64.efi – hockeykong Nov 16 '15 at 0:08
  • I can't figure out how to format comments properly, and there isn't any room in my question's section. Sorry. I'd like to point out that /dev/sda/ was already mounted in /boot/efi/. I don't know if that's important. It's in my /etc/fstab file: UUID=6A2D-CF9D, and comment in same file: "# /boot/efi was on /dev/sda5 during installation" – hockeykong Nov 16 '15 at 0:16
  • I have no objection on installing rEFInd. In fact I have read most of your pages on it and your pages on EFI boot loaders, many others also, even printed some to read when away. Excellent docs ! Your writings are very helpful. The only thing is I don't really like having two different boot loaders/managers and I would prefer, at least in the end, having only one so I would want to uninstall Grub. Essentially I' m looking for a setup that is, in order of importance: standard, simple, versatile. Thanks again. – hockeykong Nov 16 '15 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.