Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: Dual-boot woes

  1. #21
    Join Date
    Mar 2008
    Location
    Edinburgh, Scotland
    Beans
    52
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Dual-boot woes

    Ok...

    I opened /etc/grub.d/40_custom as sudo and edited it to countain the following:

    Code:
    # Windows 7 UEFI entry
    
    menuentry "Windows 7 UEFI" {
    	insmod part_gpt
    	insmod fat
    	insmod search_fs_uuid
    	insmod chain
    	set root='(hd0, gpt1)'
    	search --fs-uuid --no-floppy --set=root B039-55F4
    	chainloader (${root}/EFI/Microsoft/Boot/bootmgfw.efi)
    }
    I know the Windows EFI partition is sda1, and I looked up the UUID using blkid as you suggested.

    I then ran update-grub2 and looked at /boot/grub/grub.cfg to confirm that my entry was there.

    Now when I reboot, I have a Windows 7 UEFI entry in the GRUB menu. However, it returns the following error:

    error: invalid filename `'.

    I suspect I have typed something wrong in my entry, but I can't see what it is. Any suggestions...it sometimes helps for other people to look at these things!

    K

  2. #22
    Join Date
    Mar 2008
    Location
    Edinburgh, Scotland
    Beans
    52
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Dual-boot woes

    Oh, this is the output from blkid just in case it's of any use.

    Code:
    device     fs_type label    mount point    UUID
    -------------------------------------------------------------------------------
    /dev/sda1  vfat    SYSTEM   (not mounted)  B039-55F4
    /dev/sda3  ntfs    OS       (not mounted)  52B678EBB678D149
    /dev/sda4  ntfs    HP_RECOVERY (not mounted) 9488FFEC88FFCAAE
    /dev/sdb1  vfat             /boot/efi      F140-BFF2
    /dev/sdb2  swap             <swap>         2b97bf91-71d8-4d36-b277-1dcb1f973cbe
    /dev/sdb3  ext4             /              ae769c2e-f494-4729-a025-a86b0454b88e
    /dev/sdb4  ext4             /home          fc87c3eb-a83b-4906-923e-e5c37441ae80

  3. #23
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Dual-boot woes

    Sorry, but the original setting of hd0 may be wrong. With BIOS/grub the drive you boot is always hd0, so then the next drive is hd1. So change the hd0 to hd1. But the search should have overriden the set root, as it is a backup to the set root, as removable devices often get renumbered and the search by UUID should then still have worked.

    When Boot-Repair adds entries it was adding an entry for 3 different Windows efi files and two of the three entries seemed to always work. What are the efi Windows files in your sda1 efi? Is the path correct also.

    /efi/Microsoft/Boot
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #24
    Join Date
    Mar 2008
    Location
    Edinburgh, Scotland
    Beans
    52
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Dual-boot woes

    Hi,

    I tried changing hd0 to hd1 based on your last message (assuming that if I am booting sdb, the machine will take sdb to be hd0 and sda to be hd1) but I'm still getting the same error.

    I am pretty sure the path is correct...it is the same as was given last time I ran boot-repair:

    Code:
    Boot Info Script 0.61.full + Boot-Repair extra info      [Boot-Info October 25th 2012]
    
    
    ============================= Boot Info Summary: ===============================
    
     => No boot loader is installed in the MBR of /dev/sda.
     => Grub2 (v1.99-2.00) is installed in the MBR of /dev/sdb and looks at sector 
        1 of the same hard drive for core.img, but core.img can not be found at 
        this location.
     => Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdc.
    
    sda1: __________________________________________________________________________
    
        File system:       vfat
        Boot sector type:  Windows 7: FAT32
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  
        Boot files:        /EFI/Boot/bootx64.efi /EFI/ubuntu/grubx64.efi 
                           /EFI/HP/SystemDiags/CryptRSA.efi 
                           /EFI/HP/SystemDiags/CryptRSA32.efi 
                           /EFI/HP/SystemDiags/SystemDiags.efi 
                           /EFI/HP/SystemDiags/SystemDiags32.efi 
                           /EFI/Microsoft/Boot/bootmgfw.efi 
                           /EFI/Microsoft/Boot/bootmgr.efi 
                           /EFI/Microsoft/Boot/memtest.efi
    From something I read on a different thread, bootmgfw is one of the ones that tends to work, but I will try the others and see what happens...

    K

  5. #25
    Join Date
    Mar 2008
    Location
    Edinburgh, Scotland
    Beans
    52
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Dual-boot woes

    Hi again,

    I have now tried all the paths listed above, and tried each with root set to hd0 and hd1.

    I am getting the "error: invalid filename `'." error with every combination.

    My grub.cfg file looks a little odd to me...but I don't really know what I am looking at so it might be normal. Firstly, it seems to be calling sdb hd1, even though it is thr drive that is booting first. Secondly, it seems to be loading Ubuntu from gpt3, not gpt1 which is the EFI partion. Does that mean I am still booting Ubuntu in BIOS mode?? I have put the cfg file below...sorry it's so long but I don't know what information is useful and what isn't!

    Code:
    #
    # 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 [ "${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 {
      insmod efi_gop
      insmod efi_uga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_gpt
    insmod ext2
    set root='(hd1,gpt3)'
    search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      insmod part_gpt
      insmod ext2
      set root='(hd1,gpt3)'
      search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
      set locale_dir=($root)/boot/grub/locale
      set lang=en_GB
      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, with Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_gpt
    	insmod ext2
    	set root='(hd1,gpt3)'
    	search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
    	linux	/boot/vmlinuz-3.2.0-29-generic root=UUID=ae769c2e-f494-4729-a025-a86b0454b88e ro   quiet splash $vt_handoff
    	initrd	/boot/initrd.img-3.2.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod gzio
    	insmod part_gpt
    	insmod ext2
    	set root='(hd1,gpt3)'
    	search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
    	echo	'Loading Linux 3.2.0-29-generic ...'
    	linux	/boot/vmlinuz-3.2.0-29-generic root=UUID=ae769c2e-f494-4729-a025-a86b0454b88e ro recovery nomodeset 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.2.0-29-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+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod part_gpt
    	insmod ext2
    	set root='(hd1,gpt3)'
    	search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_gpt
    	insmod ext2
    	set root='(hd1,gpt3)'
    	search --no-floppy --fs-uuid --set=root ae769c2e-f494-4729-a025-a86b0454b88e
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows 7 (loader) (on /dev/sda3)" --class windows --class os {
    	insmod part_gpt
    	insmod ntfs
    	set root='(hd0,gpt3)'
    	search --no-floppy --fs-uuid --set=root 52B678EBB678D149
    	chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### 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.
    
    # Windows 7 UEFI entry
    
    menuentry "Windows 7 UEFI" {
    	insmod part_gpt
    	insmod fat
    	insmod search_fs_uuid
    	insmod chain
    	set root='(hd0, gpt1)'
    	search --fs-uuid --no-floppy --set=root B039-55F4
    	chainloader (${root}/EFI/Microsoft/Boot/bootmgfw.efi)
    }
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###

  6. #26
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Dual-boot woes

    The grub in the MBR does not have a core.img to continue booting so that is not working.
    It may be better to think of the efi partition as the same as the MBR. Normally you do not see MBR and would not have to edit or deal with efi partition. The MBR was just a first part of the boot loader.

    Ubuntu's (and Windows) have most of the boot files in other locations although it is a bit more mixed as the efi partition does have more room than old MBR, so more boot loader code is in efi partition.

    The actual grub menu & Ubuntu boot files are still in /boot which is normally still in your / (root) partition or a separate /boot if you happened to have one. So that the grub menu refers to the install partition is correct.

    Both set root with a specific location and the search are to find the correct location of the files you want to boot. Search is supposed to override the set to hd1,1 type entries since drive locations can change with plug in drives now a days.

    But something is not correct if it cannot find location.

    I believe this user used exactly the same entry you are and it worked.
    UEFI dual boot two drives see post #14
    http://ubuntuforums.org/showthread.php?t=2031836
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #27
    Join Date
    Mar 2008
    Location
    Edinburgh, Scotland
    Beans
    52
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Dual-boot woes

    Dual boot is go!

    Thanks to everyone who helped out, especially oldfred and Yann )

    Turns out I had closed a bracket in the wrong place when I wrote my GRUB entry for Windows UEFI. I didn't notice until I was comparing it against the code from that other thread. Still, no-one else noticed when I posted it earlier so I only feel slightly stupid!

    Thanks again all

    Kathryn (feeling slightly less ignorant now than she did a week ago!)

  8. #28
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Dual-boot woes

    Glad you resolved it. And good to know entry works if configured correctly.

    I have gone cross-eyed looking for that type of error many times. Good catch.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #29
    Join Date
    Jan 2008
    Location
    France
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Dual-boot woes

    Quote Originally Posted by kathrync View Post
    Dual boot is go!
    Good job!
    For information: http://ubuntuforums.org/showthread.p...3#post12323223
    It should work better for you next time

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •