-1

I have Ubuntu (UEFI) installed on an SSD (gpt). I decided that I want Win 10 on the HDD (that I also use for data storage). I installed it after formatting the HDD (gpt), but I got the following error on restart (when trying to boot the windows)

boot error 1

Then I restarted and booted to Ubuntu, where I ran boot-repair. This gave a Windows boot manager entry in the GRUB bootloader, but when I click on it I get the following error

boot error 2

My disks are partitioned as follows

sudo fdisk -l

Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6A5AE417-00FC-48A5-9E45-EE3DD51E1214

Device      Start       End   Sectors  Size Type
/dev/sda1    2048    514047    512000  250M EFI System
/dev/sda2  514048 900214783 899700736  429G Linux filesystem


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5A1E50F1-0809-4308-BBF4-657E23735BA6

Device          Start        End    Sectors   Size Type
/dev/sdb1        2048      34815      32768    16M Microsoft reserved
/dev/sdb2       34816  419944447  419909632 200.2G Microsoft basic data
/dev/sdb3  1936748544 1953523711   16775168     8G Linux swap
/dev/sdb4   419944448 1936748543 1516804096 723.3G Linux filesystem

Partition table entries are not in disk order.

I serached around and found for example this thread. Shall I try the answer there?

UPDATE: Here is the log from boot-repair

 Boot Info Script cfd9efe + Boot-Repair extra info      [Boot-Info 26Apr2016]


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

 => Grub2 (v1.99-2.00) is installed in the MBR of /dev/sda and looks at sector 
    428568872 of the same hard drive for core.img, but core.img can not be 
    found at this location.
 => No boot loader is installed in the MBR of /dev/sdb.
 => No boot loader is installed in the MBR of /dev/sdc.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /EFI/Boot/bootx64.efi /EFI/ubuntu/fwupx64.efi 
                       /EFI/ubuntu/grubx64.efi /EFI/ubuntu/mmx64.efi 
                       /EFI/ubuntu/shimx64.efi 
                       /EFI/Microsoft/Boot/bootmgfw.efi 
                       /EFI/Microsoft/Boot/bootmgr.efi 
                       /EFI/Microsoft/Boot/bootx64.efi 
                       /EFI/Microsoft/Boot/memtest.efi

sda2: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

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

sdb2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /Windows/System32/winload.exe

sdb3: __________________________________________________________________________

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

sdc1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/boot/bootx64.efi /efi/microsoft/boot/cdboot.efi 
                       /efi/microsoft/boot/cdboot_noprompt.efi 
                       /efi/microsoft/boot/memtest.efi /bootmgr /boot/bcd

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

Drive: sda _____________________________________________________________________
Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1 1,000,215,215 1,000,215,215  ee GPT


GUID Partition Table detected.

Partition  Attrs   Start Sector    End Sector  # of Sectors System
/dev/sda1                 2,048       514,047       512,000 EFI System partition
/dev/sda2               514,048   900,214,783   899,700,736 Data partition (Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt

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  Attrs   Start Sector    End Sector  # of Sectors System
/dev/sdb1   +             2,048        34,815        32,768 Microsoft Reserved Partition (Windows)
/dev/sdb2                34,816   419,944,447   419,909,632 Data partition (Windows/Linux)
/dev/sdb3         1,936,748,544 1,953,523,711    16,775,168 Swap partition (Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

Drive: sdc _____________________________________________________________________
Disk /dev/sdc: 29.5 GiB, 31610372096 bytes, 61739008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdc1                   1    61,739,007    61,739,007  ee GPT


GUID Partition Table detected.

Partition  Attrs   Start Sector    End Sector  # of Sectors System
/dev/sdc1                 2,048    61,736,959    61,734,912 Data partition (Windows/Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        4E12-B74E                              vfat       
/dev/sda2        a6b6740f-2439-4aae-86f2-65584630d5c2   ext4       
/dev/sdb1                                                          
/dev/sdb2        7CD26914D268D3C4                       ntfs       
/dev/sdb3        e9bc1d49-2b7b-4815-b506-cc19644b193e   swap       
/dev/sdc1        910B-04A2                              vfat       WUSB2236

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 Sep  7 19:27 ata-HGST_HTS721010A9E630_JR1000D30HSXPF -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep  7 19:27 ata-HGST_HTS721010A9E630_JR1000D30HSXPF-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep  7 19:28 ata-HGST_HTS721010A9E630_JR1000D30HSXPF-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Sep  7 19:27 ata-HGST_HTS721010A9E630_JR1000D30HSXPF-part3 -> ../../sdb3
lrwxrwxrwx 1 root root  9 Sep  7 19:27 ata-SAMSUNG_MZNTN512HDJH-00000_S36ANYAH700063 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep  7 19:27 ata-SAMSUNG_MZNTN512HDJH-00000_S36ANYAH700063-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep  7 19:27 ata-SAMSUNG_MZNTN512HDJH-00000_S36ANYAH700063-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Sep  7 19:27 usb-ADATA_USB_Flash_Drive_22B2011361270092-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Sep  7 19:27 usb-ADATA_USB_Flash_Drive_22B2011361270092-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root  9 Sep  7 19:27 wwn-0x5000cca8c8c72b61 -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep  7 19:27 wwn-0x5000cca8c8c72b61-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep  7 19:28 wwn-0x5000cca8c8c72b61-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Sep  7 19:27 wwn-0x5000cca8c8c72b61-part3 -> ../../sdb3
lrwxrwxrwx 1 root root  9 Sep  7 19:27 wwn-0x5002538d00163d10 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep  7 19:27 wwn-0x5002538d00163d10-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep  7 19:27 wwn-0x5002538d00163d10-part2 -> ../../sda2

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

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda2        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdc1        /media/bogdan/WUSB2236   vfat       (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)


=========================== sda2/boot/grub/grub.cfg: ===========================

Haven't posted the whole thing, as it is too long and with less than 10 reputation Ica't provide more links

1 Answers1

0

The complete Boot Repair output would be helpful. Try posting it on a pastebin site and posting the URL here.

What I can say is this:

  • There's evidence of both BIOS/CSM/legacy-mode and EFI/UEFI-mode installations of Linux. This is confusing and complicates diagnosis. In a dual-boot with Windows on GPT disks, both OSes should boot in EFI mode for simplicity. It's best to completely disable your Compatibility Support Module (CSM) in your firmware to simplify your boot path. See this page of mine for more on this subject.
  • You say that when you select Windows from the GRUB menu, you get "failed to open" and "failed to load image" messages, both of which refer to grubx64.efi. These messages come from Shim, which is a Linux tool for dealing with Secure Boot. Shim should not normally exist in the EFI/Microsoft/Boot directory, where the EFI-mode Windows boot loader resides; nor should grubx64.efi, which is the GRUB binary that Shim launches, and that's mentioned in those error messages. My best guess is that you used a Boot Repair option to back up and replace the Windows boot loader, but then did something else (used Windows boot repair tools, perhaps) that damaged the copy of GRUB that would have been put there.

One thing you might try is to put my rEFInd boot manager on a USB flash drive or CD-R and boot from it. (This may require disabling Secure Boot.) If things are set up correctly, rEFInd should enable you to boot either Windows or Ubuntu. If this works, you can install rEFInd to your hard disk by using its Debian package or PPA. If rEFInd does not help, then perhaps it will at least give a better idea of what's installed. (Each icon on the rEFInd main menu should have a description, which is either a standard description for a common boot loader or a filename. Pairing the description or filename with what happens when you select a boot option will reveal a lot about the computer's configuration.)

Another thing you could try is running more boot repair tools. I'd start with getting Windows booting by using Windows tools. Asking for advice on a Windows-specific forum might be worthwhile. Once Windows is booting, you could either run Boot Repair again or use rEFInd to boot the system. Note that it's imperative that you run Boot Repair from an EFI-mode boot on your system. It's probably best to not use the advanced options, too, although on rare occasion they are necessary to work around buggy EFIs or do advanced things.

Rod Smith
  • 22,290