Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Grub is not loaded in dual-boot configuration

  1. #1
    Join Date
    Sep 2011
    Beans
    7

    Grub is not loaded in dual-boot configuration

    I tried to install Ubuntu on my new laptop (Sony Vaio S13). It came with preinstalled Windows 8 and some partitions for recovery purposes which I want to preserve.

    What I've already done:
    - shrink Windows partition
    - install Ubuntu (and grub) from usb

    But when I restart machine nothing happens - Windows 8 loads as normal, without any sign from grub.
    I tried to use boot-repair (from usb), but it gives some errors:
    HTML Code:
    http://paste.ubuntu.com/1424056/

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub is not loaded in dual-boot configuration

    Our friends at Sony have done something nasty or Ubuntu is not mounting it correctly, although many other installs have worked. We have seen similar issues of not installing with other Sony systems.

    cp: cannot create regular file `/boot/efi/EFI/ubuntu/shimx64.efi': Read-only file system
    I did not know you could make the efi partition read only, but until that is changed you cannot correctly install grub's efi files. Grub2 does have the secure boot version that should work but read only on FAT32 is something different.

    Normally the read only setting is controlled by how you mount the partition with Ubuntu for both FAT32 & NTFS.

    Have you turned secure boot off in UEFI/BIOS?

    Also if you have a setting for quick boot or fast boot turn that off also.

    Two other Sonys that worked:
    ubuntu 12.10 & Windows 8 oem Sony T & Intel SRT
    http://ubuntuforums.org/showthread.php?t=2090605
    Sony VAIO E Series Windows 8/Ubuntu 12.10 Dual Boot, EFI help
    http://ubuntuforums.org/showthread.php?t=2087991

    This user manually copied boot files and renamed them. Post 3
    http://askubuntu.com/questions/15017...-into-grub-efi
    Sony Vaio dual UEFI boot with manual copy of files to efi partition
    http://www.hackourlife.com/sony-vaio...-04-dual-boot/
    Last edited by oldfred; December 11th, 2012 at 07:32 PM.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Sep 2011
    Beans
    7

    Re: Grub is not loaded in dual-boot configuration

    I partially solved the problem. Installing Grub on EFI partition was essentially, then I followed instructions from http://www.hackourlife.com/sony-vaio...-04-dual-boot/ . Everything works - I can boot Ubuntu and Windows8. The problem is, that after restarting Windows8, it reverts all changes in /EFI/Microsoft/Boot, which are necessary to be able to boot Ubuntu.

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub is not loaded in dual-boot configuration

    Microsoft's contract with Windows 8 vendors specifies that you the user must be able to turn secure boot off. So is Sony not in compliance with Microsoft?

    Is there a setting somewhere in Windows to stop the overwrite and/or unlock the efi partition.

    Did you turn off fast boot as that has caused issues with many UEFI installs.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #5
    Join Date
    Sep 2011
    Beans
    7

    Re: Grub is not loaded in dual-boot configuration

    I turned off in Bios SecureBoot, but there is not an option like fast boot. Generally this Bios is poor with options. But I will check this again and try to find something in Windows.

    Generally this EFI partition works here strange. When I followed the instruction from previous post, sometimes cp/mv were refused because partition is read-only, but when I remounted it, it worked.

    After all - thanks for help.

  6. #6
    Join Date
    Jan 2008
    Beans
    145
    Distro
    Ubuntu Studio 12.10 Quantal Quetzal

    Re: Grub is not loaded in dual-boot configuration

    I have a Sony Vaio S SVS151190X notebook with Windows 7 and UEFI booting. I am trying to dual-boot with Ubuntu Studio 12.10 x64.

    My first few attempts at dual booting ended identical to 0xddr's situation:
    *Install completes with no complaints,
    *Reboot, Windows starts with no trace of Linux or Grub.


    I just went about it a little differently, and got different results:
    *Use gparted to delete EFI partition created by Windows, then re-create it with same specs - FAT32, boot flag enabled.
    *Install Ubuntu, setting sda1 (EFI partition) as the place to put the boot loader.
    *Restart, boots Ubuntu with no trace of Windows or Grub.
    *Run boot-repair, enable Advanced Options, Grub location tab, check "separate/boot/efi partition:" and select sda1.
    Hit Apply, reboot.
    *Grub menu appears, options: Ubuntu or Advanced Ubuntu options.

    After further search, I came up with adding an entry to /etc/grub.d/40_custom as listed below:
    Code:
    menuentry "Windows 7" {
        set root='(hd0,gpt3)'
        chainloader /boot/efi/Microsoft/Boot/bootmgfw.efi
        }
    After adding this and running update-grub, I restarted and Windows appears in the list, but then I get this message when I choose it:
    error: file '/boot/efi/Microsoft/Boot/bootmgfw.efi' not found.
    Press any key to continue..._
    The directory referenced above contains the file mentioned, so I'm not sure why it's telling me it is not found. Everything is spelled correctly with correct case.

    So, no Windows yet. Any thoughts? The URL created by boot-repair is:
    http://paste.ubuntu.com/1444648/

    Thanks!
    Last edited by Ck.asdf; December 17th, 2012 at 04:41 PM. Reason: Adding updated attempts to resolve my issue.

  7. #7
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub is not loaded in dual-boot configuration

    @Ck.asdf
    When you deleted the efi partition did you back up all the Windows boot files in the efi partition?
    If you had no Windows files, then grub does not show menu, but just boots.

    Script does not show one key Windows file, the BCD. I believe it is also in the efi folder with the other efi files.
    ? location of BCD?
    /boot/efi/EFI/Microsoft/Boot/BCD

    From UEFI menu can you directly boot Windows? Only if that works will the chain load entry from grub2's menu work.

    Boot-Repair would create similar chain load entries to the Windows efi boot files in 25_custom as grub2's os-prober creates BIOS type entries.

    Wrong style chain boot entry
    https://bugs.launchpad.net/ubuntu/+s...2/+bug/1024383
    'Windows ...) (on /dev/sdXY)'
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







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

    Arrow Re: Grub is not loaded in dual-boot configuration

    Quote Originally Posted by 0xddr View Post
    HTML Code:
    http://paste.ubuntu.com/1424056/
    Interesting case.

    Indeed the ESP is not completely read-only, because Boot-Repair has been able to create /EFI/Boot/bootx64.efi.bkp , /EFI/Microsoft/Boot/bootmgfw.efi.bkp , and /EFI/Microsoft/Boot/bootx64.efi.grb

    So that means the ESP prevents the creation/modification of files except inside /efi/Boot and /EFI/Microsoft.
    That's really ugly from Sony/Microsoft.

    Bug report and workaround: https://bugs.launchpad.net/ubuntu/+s...2/+bug/1091477
    Last edited by YannBuntu; December 18th, 2012 at 12:48 AM.

  9. #9
    Join Date
    Jan 2008
    Beans
    145
    Distro
    Ubuntu Studio 12.10 Quantal Quetzal

    Re: Grub is not loaded in dual-boot configuration

    @oldfred
    For the purposes of last night's testing, I did not back up the Windows boot files in the EFI (sda1) partition. However, that brings me to further explanation of my setup.

    My Vaio came preloaded with Windows 7, a 20GB restore partition, and a bunch of extra software. I took that hard drive out, stuck another one in, and installed Windows 7 fresh. In the install, it actually alerted me that the drive was formatted incorrectly for EFI, and made the necessary adjustments, creating sda1 (EFI boot), sda2 (msftres), and sda3 (Windows).

    I went ahead and plugged in the stock drive and Sony partitioned it as such:
    Part - "LABEL" size flags
    sdc1 - "SONYSYS" 260MiB hidden
    sdc2 - "Recovery" 18.90GiB hidden, diag
    sdc3 - [no label] 260MiB boot
    sdc4 - [no label] 128MiB msftres
    sdc5 - [no label] 445GiB <-- Windows

    The two interesting partitions here are sdc1 and sdc3. After mounting each of them, these are their file structures:

    sdc1 (SONYSYS, hidden flag)
    Code:
    /EFI/
        boot/
            bootx64.efi
            en-US/
                bootx64.efi.mui
    
        microsoft/
            boot/
                bcd
                bootmgfw.efi
                en-US/
                    bootmgfw.efi.mui
                    fonts/  ## (Several *.ttf files)
    sdc3 (no label, boot flag)
    Code:
    /EFI/
        Boot/
            bootx64.efi
    
        Microsoft/
            Boot/
    BCD           bootmgfw.efi  da-DK/        es-ES/        hu-HU/        memtest.efi   pt-BR/        tr-TR/
    BCD.LOG       bootmgr.efi   de-DE/        fi-FI/        it-IT/        nb-NO/        pt-PT/        zh-CN/
    BCD.LOG1      BOOTSTAT.DAT  el-GR/        Fonts/        ja-JP/        nl-NL/        ru-RU/        zh-HK/
    BCD.LOG2      cs-CZ/        en-US/        fr-FR/        ko-KR/        pl-PL/        sv-SE/        zh-TW/
    Hopefully the way I structured the paths above makes sense.


    So you're right, there is something called BCD. So this further research brings more questions:
    *Which of the two partitions should I copy data from? I'm thinking sdc3.
    *What do I need to copy from the original drive?
    *Where should I put it?
    *How should I configure grub?


    You asked whether I can boot to Windows from the UEFI menu. This menu you reference, do you speak of the UEFI version of grub, or are you talking about a menu within the BIOS? If the second option, I think my friend's new computer has an EFI menu, but as far as I know, my laptop does not. I've tried repeatedly hitting F11, as well as F12 at boot-up, but nothing happens.

    Thanks for all the help!
    Last edited by Ck.asdf; December 18th, 2012 at 06:30 AM. Reason: Adding answers to questions asked.
    Ubuntu 14.04 LTS, Gnome3, ck-designed desktop
    (ASRock Z77 Extreme4 MB / 3.4GHz Intel i7-3770 / 16GB G.Skill RAM / Intel HD 4000)
    Ubuntu Studio 12.10, Gnome3, Sony Vaio SVS151190X notebook
    (2.5GHz Intel i5-3210M / 6GB RAM / Intel HD 4000)

  10. #10
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub is not loaded in dual-boot configuration

    There has to be a way to get to UEFI menu. But it varies by Vendor. An I do not know yours.

    Some with UEFI have said if you do not turn quick boot off the only way to get to UEFI menu is thru Windows but I do not know. Not even sure what quick boot is, but it seems like it skips some UEFI startup to boot faster.

    Some have also posted that the key combination has to be pressed quickly as there is not much time from power on to system already booting or past UEFI choice. Others have posted that the key combination is more complicated or some combination of keys. I am not sure with Sony what the possibilitys are.

    You may need Windows repair flash.
    Windows 8 UEFI repair USB must be FAT32
    http://social.msdn.microsoft.com/For...-166dddf32205/


    With BIOS you could recreate a BCD with the Windows repair tools. One user manually copied BCD from repair flash and manually edited it with BcdEdit. BCD uses something like UUIDs to know which partition to boot, so if yours is not from the same install it would have to be edited. Not sure if with UEFI you can directly boot into a Windows repair console.

    Some of the UEFI systems seem to have another partition with efi files. For repairs then the UEFI/BIOS must be able to change the boot flag or gpt efi partition designation to ef00 to be the boot partition with UEFI. Then you can run the recovery or vendor repairs.

    With your system you seem to have the extra partition with efi files and another with the recovery image??

    Boot-Repair will reconfigure grub to boot in efi mode if not installed correctly, and add a correct chain load entry to Windows. But you have to go into UEFI menu and choose ubuntu as boot choice. It remembers last choice an uses that until you change it. From UEFI you should get at least Windows & ubuntu. But some others have shown a large list of boot options like every bootable device in both legacy or UEFI modes and recovery or repair options.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Page 1 of 2 12 LastLast

Tags for this Thread

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
  •