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

Thread: ESP in USB

  1. #1

    Default ESP in USB

    My openSUSE /boot/efi is likely get deleted by me or a fresh installed ubuntu 18.04 or just ge hidden, I couldn't find openSUSE in UEFI and Ubuntu boot menu again. I made a bootable USB with openSUSE-Leap-15.1-NET-x86_64.iso, from it's boot I choose enter "boot from harddisk", then it led me to the openSUSE in my harddisk. I want to know why and it's a secure boot?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,047
    Blog Entries
    3

    Default Re: ESP in USB

    It is hard to know what you did there.

    Yes, if you delete the ESP partition, you will have problems. But a Ubuntu install should not do that.

    Another possibility, is that you have a fussy BIOS that cleans up NVRAM by deleting boot entries that it decides are not needed.

    I'm not sure, but I don't think "boot from hard disk" with the installer would actually work on a UEFI system if the ESP had been deleted.

    You can probably use Yast bootloader to reinstall booting for your system. But if you have a fussy BIOS, that might remove the Ubuntu boot entry.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: ESP in USB

    Quote Originally Posted by nrickert View Post
    It is hard to know what you did there. Yes, if you delete the ESP partition, you will have problems. But a Ubuntu install should not do that. Another possibility, is that you have a fussy BIOS that cleans up NVRAM by deleting boot entries that it decides are not needed. I'm not sure, but I don't think "boot from hard disk" with the installer would actually work on a UEFI system if the ESP had been deleted. You can probably use Yast bootloader to reinstall booting for your system. But if you have a fussy BIOS, that might remove the Ubuntu boot entry.
    May the ESP didn't get deleted, I don't know and forget the detail, but why the openSUSE menu is hidden from BIOS if ESP didn't get deleted , while the bootable USB can boot the openSUSE?

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,047
    Blog Entries
    3

    Default Re: ESP in USB

    The BIOS sees the NVRAM entries. Here "NVRAM" is short for "non volatile ram". NVRAM is like a small flash drive built into your hardware.

    The command
    Code:
    /usr/sbin/efibootmgr -v
    should list the boot entries that are in NVRAM.

    If the NVRAM entry is gone, your BIOS won't boot it.

    The BIOS does know about a USB and how to boot that without an NVRAM entry. The boot code is in "\EFI\boot" in the EFI directory of the USB. When you boot from the USB, and choose the "boot from disk" entry, it look inside the ESP and grub runs the file "\EFI\opensuse\grub.efi" that is in the ESP. So that file must exist if you can boot with the USB, but it seems that the NVRAM entry has gone missing.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #5

    Default Re: ESP in USB

    Quote Originally Posted by nrickert View Post
    The BIOS sees the NVRAM entries. Here "NVRAM" is short for "non volatile ram". NVRAM is like a small flash drive built into your hardware. The command
    Code:
    /usr/sbin/efibootmgr -v
    should list the boot entries that are in NVRAM. If the NVRAM entry is gone, your BIOS won't boot it. The BIOS does know about a USB and how to boot that without an NVRAM entry. The boot code is in "\EFI\boot" in the EFI directory of the USB. When you boot from the USB, and choose the "boot from disk" entry, it look inside the ESP and grub runs the file "\EFI\opensuse\grub.efi" that is in the ESP. So that file must exist if you can boot with the USB, but it seems that the NVRAM entry has gone missing.
    Yes it seems like it, awesome answer! And I also want to know that the bootloader in the USB same with the bootloader in NVRAM which in the hard disk? Upgrading openSUSE doesn't change the bootloader in NVRAM? And secure boot that the bootloader verified by UEFI firmware built-in CA?

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,047
    Blog Entries
    3

    Default Re: ESP in USB

    Quote Originally Posted by xinvojan44 View Post
    And I also want to know that the bootloader in the USB same with the bootloader in NVRAM which in the hard disk?
    The bootloader in the USB (assuming the installer USB) includes secure-boot support. So the bootloader uses files
    • shim.efi (but actually named "bootx64.efi" on the USB, because that's what the BIOS will use)
    • grub.efi
    • grub.cfg


    The bootloader in NVRAM is really just the path to the bootloader in your ESP. And if secure-boot support is included (that's the default), then it uses "shim.efi" which in turn uses "grub.efi" and "grub.cfg". But the content of "grub.cfg" will be different between the USB and what's in your ESP.

    Upgrading openSUSE doesn't change the bootloader in NVRAM?
    Upgrading will reinstall the bootloader. But the NVRAM entry will probably finish up the same as before. The files "shim.efi" and "grub.efi" may be updated versions. And "grub.cfg" will have been update to now contain the UUID of the partition containing "/boot" so that grub can find its menu in "/boot/grub2".


    And secure boot that the bootloader verified by UEFI firmware built-in CA?
    The way this normally works, is that "shim.efi" has been signed by Microsoft, and your UEFI firmware is set to verify Microsoft signatures. In turn, "shim.efi" contains the openSUSE CA certificate. And that openCA certificate is used to verify the signature of "grub.efi" and the signature on the kernel that you are loading.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7

    Default Re: ESP in USB

    Hi, I like to ask little more. As the first stage bootloader in the bootable USB has never updated, how long can it lasts to boot my openSUSE 15.1 on HDD? If the time is too short, how can I add the openSUSE entry to NVRAM?

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

    Default Re: ESP in USB

    As far as I know, it should last until the end-of-life of Leap 15.1.

    The files that matter are "shim.efi" and "grub.efi" in the EFI partition of that USB. And you probably could manually update them if you wanted to, by mounting that partition and manually copying the files. However, "shim.efi" has never been updated since Leap 15.1 was released, and I think "grub.efi" was only updated once (in June).

    Can you provide the output from:
    Code:
    /usr/sbin/efibootmgr -v
    so that we can see what is currently in NVRAM.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  9. #9

    Default Re: ESP in USB

    Quote Originally Posted by nrickert View Post
    As far as I know, it should last until the end-of-life of Leap 15.1.

    The files that matter are "shim.efi" and "grub.efi" in the EFI partition of that USB. And you probably could manually update them if you wanted to, by mounting that partition and manually copying the files. However, "shim.efi" has never been updated since Leap 15.1 was released, and I think "grub.efi" was only updated once (in June).

    Can you provide the output from:
    Code:
    /usr/sbin/efibootmgr -v
    so that we can see what is currently in NVRAM.
    Code:
    minepc@alphaz:~$ efibootmgr -v
    BootCurrent: 0001
    Timeout: 1 seconds
    BootOrder: 0001,0002
    Boot0001* ubuntu    HD(12,GPT,xxxxxxx-xxxx-xxxx-xxxx-xxxx,xxxxxxxx,xxxxxx)/File(\EFI\Ubuntu\grubx64.efi)
    Boot0002* UEFI OS    HD(12,GPT,xxxxxxx-xxxx-xxxx-xxxx-xxxx,xxxxxxxx,xxxxxx)/File(\EFI\BOOT\BOOTX64.EFI)

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

    Default Re: ESP in USB

    So far, so good. You have an NVRAM entry for "Ubuntu".

    When I install Ubuntu, I usually get two NVRAM entries (one for secure-boot and the other without secure-boot). You only have the one without secure-boot.

    Can you show the output from:
    Code:
    ls /boot/efi/EFI/opensuse
    I'm suspecting that you have fussy UEFI firmware that deletes most of the NVRAM entries. So you may need to manage with only one entry. You could either use the Ubuntu entry to boot openSUSE or the openSUSE entry to boot Ubuntu. Maybe it is best to set it up so that either way works. Then, whichever NVRAM entry sticks around can be used for either system.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Page 1 of 2 12 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
  •