ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
62.95k stars 4.1k forks source link

Duplicate boot entries when main data partition is reformatted. #997

Closed ghost closed 3 years ago

ghost commented 3 years ago

Official FAQ

Ventoy Version

1.0.46

What about latest release

Yes. I have tried the latest release, but the bug still exist.

BIOS Mode

UEFI Mode

Partition Style

GPT

Disk Capacity

64GB [Kingston DT100G3]

Image file checksum (if applicable)

No response

What happened?

Duplicate UEFI boot entries get created on each boot after the main data partition gets reformatted to NTFS. Have had this happen on 2 USB drives. I also tried deleting the duplicates using "bcdedit" & "efibootmgr" with no luck. The entries keep duplicating seemingly forever & they point to the main data partition (which is not bootable).

20210712_021024

Screenshot 2021-07-12 021238

steve6375 commented 3 years ago

Do you have an Asus z87 mainboard? Mine does the same. It seems to be a bios bug. I get same issue with other types of uefi-bootable usb drives too, not just Ventoy.

steve6375 commented 3 years ago

https://www.programmersought.com/article/7094577532/ https://www.vacuumbreather.com/index.php/blog/item/45-the-case-of-duplicate-firmware-objects-in-bcd

ghost commented 3 years ago

Do you have an Asus z87 mainboard? Mine does the same. It seems to be a bios bug. I get same issue with other types of uefi-bootable usb drives too, not just Ventoy.

Nope (ASUS B85M-E with the latest BIOS version - 3602). I've also had this happen when I created a MemTest86 bootable USB. Tried different tools to create the drive with no luck (Rufus & the tool that comes with MemTest86, don't remember what it's called). The drive had like 10 duplicate entries. It was ridiculous.

ghost commented 3 years ago

Is there some sort of script that can delete the duplicates by reading the "partition=F:" value & deleting all identifiers that contain it? I don't know Batch or Powershell, so help on this would be greatly appreciated. Are there other workarounds that don't involve modifying the UEFI boot entries? Ventoy should give us the option on what filesystem to choose when initially creating the drive (something like Rufus), since the default exFAT 128k configuration is ridiculous for small files (which is why I decided to reformat in the first place).

steve6375 commented 3 years ago

There are scripts which can remove the firmware entries, however they will just come back again whenever you connect the USB drive again. The UEFI BIOS adds the entries to the mainboard NVRAM - then when you boot to Windows\WinPE it reads the UEFI NVRAM and adds the firmware entries into its BCD file. https://www.vacuumbreather.com/index.php/blog/item/45-the-case-of-duplicate-firmware-objects-in-bcd