How does one expunge an EFI install of openSuSE 13.2?

Overview. Details in next post.

[ul]
[li] How does one delete, and expunge an EFI installation of openSUSE 13.2 from a computer?[/li][LIST]
[li] Specifically, I want to get the computer back to where there are no “EFI Boot Sources.” [/li][/ul]

[li] openSUSE documentation claims to explain this:[/li][ul]
[li] How to enable or disable Secure Boot support [/li][li] but I cannot find an explanation of how to “disable” it in that page. [/li][li] The documentation page only says: To enable or disable support for Secure Boot in an installed system the YaST bootloader module can be used.[/li][LIST]
[li] That’s nice, but how? [/li][/ul]

[li] I have no trouble booting either Windows or a non-EFI openSUSE from the BIOS boot menu, but it is an awkward, 3-step process through the BIOS, because of the need to bypass the “hard-wired” secureboot default. [/li][/LIST]

[li] Presently, choosing “opensuse-secureboot” from the BIOS boot menu drops me into Grub. [/li][li] Help, please! [/li][/LIST]

[ul]
[li] My computer is a Hewlett-Packard Compaq Pro 6300 Microtower PC.[/li][LIST]
[li] BIOS is American Megatrends with Aptio Setup Utility Version 2.13.1216 (C) 2012. [/li][/ul]

[/LIST]

[ol]
[li] I installed Windows 7 Pro. I chose MBR, not GPT. The install then went cleanly.[/li][ul]
[li] I wish to use Terabyte BootItBareMetal as my boot manager. It can hide one OS from another. I have previously watched one Windows install cannibalize another, and I have no wish to repeat that experience. [/li][/ul]

[li] I installed openSUSE 13.2 from the distribution media, without an internet connection.[/li][ul]
[li] The installer wanted to reformat the whole drive, so I was forced into Expert drive layout. [/li][li] Next the installer issued a warning that it could not proceed unless I provided a /boot/efi FAT32 partition, so I exited the installer, created such a partition and restarted the installer. The partitioning and formatting then went cleanly. [/li][li] I forgot to check the boot options in the summary. (I would normally select “boot from / partition.”) The installer took its default boot settings. [/li][/ul]

[li] When it rebooted, I had no option for accessing Windows. It booted directly into openSUSE.[/li][ul]
[li] Now the bios has:[/li][LIST]
[li] EFI Boot Sources[/li][LIST]
[li] opensuse-secureboot [/li][/ul]

[li] Legacy Boot Sources[/li][ul]
[li] [all the rest of the hardware] [/li][/ul]

[/ol]

[/LIST]

[/LIST]

[ul]
[li] I then replaced the hard drive in which this happened with a data-only hard drive.[/li][LIST]
[li] The “opensuse-secureboot” still remained in the BIOS, even though openSUSE and the EFI partition were not there. [/li][/ul]

[li] How do I get rid of it?[/li][ul]
[li] Here is one guess: One of the BIOS options is “Apply Defaults and Exit.”[/li][LIST]
[li] Will that remove the “EFI Boot Sources / opensuse-secureboot” entries in the BIOS? [/li][/ul]

[/LIST]

[li] Having been burned once by the openSUSE installer, I want expert advice before proceeding.[/li][ul]
[li] I have now installed openSUSE with a non-EFI boot in another partition, so I know how to do it. [/li][li] Also, I have installed Boot It Bare Metal, so I can now boot both Windows and openSUSE.[/li][LIST]
[li] Booting the opensuse-secureboot option now drops me into Grub. [/li][/ul]

[/LIST]

[li] I am quite willing to delete that EFI SUSE install and the EFI partition, but I don’t want to be left with an unbootable computer.[/li][ul]
[li] If I can, I would like to avoid losing the Windows partition since it is now activated, but I am prepared to reformat the whole drive if that is the only choice. [/li][/ul]

[li] Help, please! [/li][/LIST]

  1. Do not install OS’s in different modes. By Installing Windows in legacy and Linux in EFi and one using GPT and the other MSDOS partitions you have a mess. My advice is start from scratch. It does not matter is both are legacy or both are EFI both need to boot the same method. DO NOT MIX BOOT MODES! My advice is use EFI it is really much better in many ways and you want GPT partitioning Can’t help with Windows but it depends on how you boot the installer if you boot in EFI mode the default settings are for EFI if you boot in legacy the default settings are for legacy. The reason the installer wanted to use the whole drive is probably because you installed in mix mode. You can tell what mode it is at the first screen of the installer if you see option at the bottom then you are in legacy if not EFI. EFI mode requires a special FAT format partition to hold the boot code for all the OS’s installed it is the EFI boot partition and in openSUSE it is mounted as /boot/efi Another sure sign that you booted the installer in EFI mode not legacy. Another is it will want to install grub2-efi not grub2

  2. Secure boot is controlled in the EFI BIOS. Where depends on your machine. Read the instructions, if you can’t find it in the BIOS menus

  3. boot mode for external drives is controlled by the EFI boot menu it is often F12 at boot but again depends on your hardware read the instructions that came with your machine. … You got no instruction ??? :open_mouth: Well maybe check on the makers website. It is far from being standard

I’m not quite sure what you are wanting to do. However:


# efibootmgr -v

That will list the boot entries, with a 4 digit number for each (4-digit hex number).

Find the entry you want to delete – I’ll call it ‘000n’, and the


# efibootmgr -b 000n -B

That should delete the entry.

You might also want to remove the “opensuse” directory and its contents from the EFI partition.

I’m quoting this for emphasis. I prefer EFI, but mixing the two gives you the worst of both worlds.

Thanks for the help. I understand that I shouldn’t be in this condition. I’m asking how most cleanly to get out of this mess. My preference is to get rid of the EFI/secure boot remnants. But how?

  1. the “opensuse-secureboot” boot option drops me into Grub. I have no idea how to proceed.
  2. the non-EFI copy of openSUSE responds to “efibootmgr -v” with “Fatal: couldn’t open either sysfs or procfs directories for accessing EFI variables.”
  3. I can mount the EFI partition from there, and delete the boot and/or opensuse subfolders. I just don’t want to do something that renders the computer unbootable.
  4. I still have the problem that even with this hard drive replaced by one with no bootable partitions (and no EFI partition), the “EFI Boot Sources” and “opensuse-secureboot” entries remain in the BIOS. How do I get rid of them?
  5. I believe I can get back into the EFI copy of openSUSE using the install disk to recover access. Will having Yast switch from EFI boot to non-EFI boot get rid of the BIOS entry?

4 and 5 are the questions for which I really need answers.

Hi
You need to set the BIOS to uefi boot, boot the install DVD in efi mode and select rescue, run the efibootmgr commands to remove the efi nvram entries. Reboot the system and set the BIOS to legacy boot. You should be good to go.

If you need to wipe the drive and turn it from gpt to mbr, there are some additional steps to take…

Bingo! That got it! Here are the details for lurkers.

  1. I had to boot the computer twice to get it to recognize the openSUSE install disk as UEFI bootable. The DVD has to be in the drive early in the boot sequence to be recognized as UEFI bootable.
  2. After booting the rescue system, I used the command “efibootmgr -b 0 -B” three times* to remove bootable “devices”: opensuse (0), the Hard Drive, and a net-boot piece of hardware. (This is a used computer. I’ve seen it try to secure-boot that net-boot device when it was trying to find something bootable.)
  3. Finally, I mounted the EFI partition and deleted all files in it.
    After that, rebooting got back to the normal non-EFI boot process.
  • On my first try, I just deleted the opensuse entry in the EFI table. On the next boot, the BIOS promoted the Hard Drive to secure boot status, found the EFI partition, recreated the opensuse-secureboot entry and booted it.

Thanks, malcomlewis, you solved the problem!