Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47

Thread: Install Grub2 in UEFI

  1. #1

    Default Install Grub2 in UEFI

    Hello.

    I have overridden the MBR from Windows 10 using EasyBCD and now I can't boot into any system.
    So I've followed these instructions:
    https://forums.opensuse.org/content....rom-DVD-Rescue
    ...but when I wrote "mount /proc" (and /sys) I got this error:
    Code:
    mount: /proc: mount failed: No such file or directory
    mount: /sys: mount failed: No such file or directory
    ...when I wrote "grub2-mkconfig -o /boot/grub2/grub.cfg" I got this error:
    Code:
    /usr/sbin/grub2-mkconfig: line 130: /proc/self/mountinfo: No such file or directory
    ...and when I wrote "grub2-install /dev/sda" I got:
    Code:
    /usr/sbin/grub2-bios-setup: warning: this GPT partition label contains no BIOS Boot Partition; embedding won’t be possible
    /usr/sbin/grub2-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.
    /usr/sbin/grub2-bios-setup: error: will not proceed with blocklists.
    I've found some threads googling these errors and generally people had this error with BIOS and I have UEFI. But I've come across this topic:
    http://superuser.com/questions/90311...boot-partition
    ...but it's too laconic for me (I'm not the brightest guy on Earth) and what's worse, when I went into Rescue mode on my DVD with Opensuse 13.1 I got no command grub2-efi, grub2-efi-install, etc. The only command that starts with "grub" and contains "efi" is "grub2-glue-efi", and it's for Mac.

    I guess my question is - how to burn a disk so it has grub2-efi command and generally how to install Grub2 with this disk (including creating ESP and other mysterious things)?
    I would really appreciate the help since I have to use this computer for work tomorrow. And I don't want to mess anything even more since I already "broke" the MBR.
    Last edited by kokosek; 20-Sep-2015 at 03:58. Reason: Slight change of the title

  2. #2
    Join Date
    Sep 2012
    Posts
    5,326

    Default Re: Install Grub2 in UEFI

    Quote Originally Posted by kokosek View Post
    I have overridden the MBR from Windows 10 ... I have UEFI.
    You need to decide. You cannot have MBR and EFI and Windows (pick two).

    And I do not understand what you are trying to do and how installing GRUB can help you to boot Windows.

    Please start with telling what you are trying to achieve, not how you tried to do it.

  3. #3

    Default Re: Install Grub2 in UEFI

    Thanks for the reply.

    I want to have Linux and Windows. Windows bootloader in UEFI doesn't allow systems outside of Windows family. So I need Grub2 to be able to boot both Linux and Windows. And I want to have EFI since it's newer than BIOS so I guess better.

    And I gave a detailed description what I've done because people on the web are very rude otherwise if I don't show that I've actually spent these 3 hours trying to solve the problem.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,326

    Default Re: Install Grub2 in UEFI

    Quote Originally Posted by kokosek View Post
    I want to have Linux and Windows. Windows bootloader in UEFI doesn't allow systems outside of Windows family. So I need Grub2 to be able to boot both Linux and Windows.
    Just start with openSUSE install. Make sure installation DVD is booted in EFI mode (you need to consult your motherboard documentation how to do it). Then installer will install grub2, attempt to make it default boot option in firmware; and you will have possibility to add menu entry for Windows to GRUB, during installation or after.

    And I want to have EFI since it's newer than BIOS so I guess better.
    It does not matter what is better - what matters is how Windows is installed. Linux must be installed in the same mode. But as you have GPT Windows most likely is installed in EFI.

  5. #5

    Default Re: Install Grub2 in UEFI

    I already have Linux installed. I installed it after Windows but was unable to add it to the bootloader and that's why I've overriden MBR.

    This is what "parted -l" in Secure mode shows me (I skipped "start" and "end" columns):
    Code:
    Number Size   File system    Name                         Options
    1      315MB  ntfs           Basic data partition         hidden,diag
    2      105MB  fat32          EFI system partition         boot
    3      134MB                 Microsoft reserved partition msftres
    4      321GB  ntfs           Basic data partition 
    5      472MB  ntfs                                        hidden,diag
    6      2150MB linux-swap(v1) primary
    7      43.0GB ext4           primary
    8      633GB  ext4           primary
    Does that change anything? If not and I still should reinstall OpenSuse, which partitions should I format? Only the last 3?

  6. #6
    Join Date
    Sep 2012
    Posts
    5,326

    Default Re: Install Grub2 in UEFI

    Is Linux installed in EFI mode? Is /boot/efi mounted? Is /sys/firmware/efi present?

  7. #7

    Default Re: Install Grub2 in UEFI

    To make sure I've just reinstalled Opensuse using default partitioning (formatting home and root partitions).

    In BIOS I have UEFI mode so I guess Linux is installed in UEFI mode.
    During installation there was an info:
    Code:
    mounting point /dev/sda2 will be set to /boot/efi
    ...so I guess /boot/efi is mounted.

    When I launch DVD with OpenSuse 13.1 in Rescue mode I have a directory /sys/firmware/efi when I log as root.

    When I rebooted the computer after the reinstallation, Windows bootloader was launched and in boot queue it's after booting from HDD. So something's not right.

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,191
    Blog Entries
    3

    Default Re: Install Grub2 in UEFI

    Quote Originally Posted by kokosek View Post
    When I rebooted the computer after the reinstallation, Windows bootloader was launched and in boot queue it's after booting from HDD. So something's not right.
    The EasyBCD stuff won't work with EFI.

    If you installed grub2-efi, then you should have a directory "/boot/grub2/x86_64-efi". Check whether that exists.

    It's possible that you did it all correctly, but your computer BIOS is biased toward Windows. Maybe tell us what kind of computer this is, and someone might have specific help.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9

    Default Re: Install Grub2 in UEFI

    Now I know that EasyBCD won't work with EFI because I've also done some googling but only after using it.

    My /boot/grub2 is empty. Because as I said, I don't have the command grub2-efi. How do I install grub2-efi?

    I don't know what information do you need. It's a laptop, Acer, HDD+SSD. "dmidecode -t 2" told me that I have SMBIOS and my motherboard is Acer's EA50_HWS v1.02.

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,191
    Blog Entries
    3

    Default Re: Install Grub2 in UEFI

    Quote Originally Posted by kokosek View Post
    I don't know what information do you need. It's a laptop, Acer, HDD+SSD. "dmidecode -t 2" told me that I have SMBIOS and my motherboard is Acer's EA50_HWS v1.02.
    As far as I know, ACER laptops are pretty good with UEFI.

    To install grub2-efi:

    Boot the live rescue CD (via USB is okay). Make sure that you boot it in UEFI mode. As a test, you can run:
    Code:
    # efibootmgr -v
    If you get an error message about "efivars" then you are not in UEFI mode.

    If you are properly booted, then:
    mount your root file system as "/mnt"
    mount other file systems ("/home", "/boot" if a separate mount) on top of that.
    mount the efi partition as "/mnt/boot/efi
    Code:
    # mount --bind /dev /mnt/dev
    # mount --bind /proc /mnt/proc
    # mount --bind /sys /mnt/sys
    Then go into chroot mode to install grub2-efi
    Code:
    # chroot /mnt
    # grub2-install --target=x86_64-efi
    # shim-install    ### only needed for secure-boot
    I'm away from my UEFI machine at present, so some of this is off the top of my head. I hope somebody will check and correct any errors.

    After that (while still in chroot mode)
    Code:
    # grub2-mkconfig -o /boot/grub2/grub.cfg
    After all of that, your BIOS (or, really, UEFI firmware) should be able to boot into a grub2-efi boot menu.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Page 1 of 5 123 ... LastLast

Posting Permissions

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