2

I booted Debian from a USB and installed but unfortunately was using the wrong version for my computer so wasn't completely successful.

I removed the incomplete installation, using the windows disk manager to delete the linux partitions.

On restart, the computer went into Grub rescue mode and I used windows 10 USB and diskpart to repair the MBR.

Currently, when booted into the UEFI menu has three options, a functioning Windows, a non-functioning Windows, and a non-functioning Debian.

My understanding is that each of these is meant to point to the given OS info on the hard disk, but the two non-functioning options aren't found because I deleted them, while the functioning one was created by the windows repair tool.

How can I go about "fixing" the boot menu to remove the bad records? Could I just leave them?

Sub-questions (Please just delete these if they need to be separate questions, thanks) :

I intend to reinstall Debian correctly once I get my boot menu squared away. Is there anything else I should check about the set up of the system before installing again?

edit:

I didn't find that question due to the lack of any sort of windows tag. This question is specific to windows.

the two answers recommend using third party tools ,where as @grawity uses native windows tools.

2

1 Answer 1

2

How can I go about "fixing" the boot menu to remove the bad records?

Run efibootmgr -v from within an UEFI-booted Linux system to list the Boot#### items, then delete one by one with efibootmgr --delete-bootnum:

# efibootmgr -b 0003 -B

Within Windows, bcdedit does the same, although it mixes both firmware and Windows boot items. First do bcdedit /enum firmware to see the EFI boot entries, note down their {GUID}s, then bcdedit /delete them.

Is the relationship between GPT and UEFI the same as BIOS and MBR?

Mostly yes. The MBR format came with IBM PC BIOS, and the GPT format was meant for (U)EFI.

  • BIOS is the traditional IBM PC firmware, and MBR is the traditional IBM PC partition table which also holds the boot sector. (However, most BIOSes have no reason to look at partition tables at all – so they will boot from a GPT-partitioned disk just fine, as long as it has the same data in the boot sector area. GPT happens to reserve that area.)

  • GPT is the partition table format introduced by EFI, indeed often called "EFI partition table". (However, the UEFI specification also allows and defines usage of MBR partition tables. It doesn't use the boot sector, but you can create an EFI System Partition on an MBR disk and it'll boot via UEFI anyway.)

How does Grub compare to these 4

It doesn't. Grub is a program, but it isn't system firmware – it's a bootloader (and a boot manager), i.e. the second stage after BIOS/UEFI. It is something you place in the BIOS boot sector, or in the UEFI system partition.

Not the answer you're looking for? Browse other questions tagged .