I have a Gigabyte Z77X-D3H and a while back installed Ubuntu 12.10 on my system. Today I decided to switch back to Windows and formatted the disk for the new install.
While I am not asked which operating system I want to boot at startup, there still is a lingering reference to ubuntu
when I try to do a 'Boot Override', among other options such as the CD-drive or a USB device.
When I do a 'bcdedit' on my new Windows 7 installation, it only shows the Windows Boot Manager and installation:
Windows-opstartbeheer
---------------------
id {bootmgr}
device partition=\Device\HarddiskVolume1
path \EFI\Microsoft\Boot\bootmgfw.efi
description Windows Boot Manager
locale nl-NL
inherit {globalsettings}
default {current}
resumeobject {249db4c9-a44c-11e2-801d-bd1545a63e32}
displayorder {current}
toolsdisplayorder {memdiag}
timeout 30
Windows-opstartlaadprogramma
----------------------------
id {current}
device partition=C:
path \Windows\system32\winload.efi
description Windows 7
locale nl-NL
inherit {bootloadersettings}
recoverysequence {249db4cb-a44c-11e2-801d-bd1545a63e32}
recoveryenabled Yes
osdevice partition=C:
systemroot \Windows
resumeobject {249db4c9-a44c-11e2-801d-bd1545a63e32}
nx OptIn
This is what my partitions look like (C:\, Ok, Startup, Swapfile, Crashdump, primary, D:\ Ok, primary, F:\ (external), Ok, primary):
Is there any way to get rid of the Ubuntu boot option in the BIOS?
Best Answer
Chances are this problem has nothing to do with what's on the hard disk, although it might. Try this:
sudo modprobe efivars
in a Terminal window. (You can omit thesudo
part if you use System Rescue CD.)sudo efibootmgr -v
to see your boot options. One of these options should include a reference toubuntu
, and probably to thegrubx64.efi
file. Take note of the boot number at the start of the line. For instance, it might beBoot0004
.sudo efibootmgr -B -b 0004
, changing0004
to whatever the boot number is, as you discovered it in the previous step.When you reboot, the Ubuntu reference should disappear. Some EFIs will remove references to boot loaders that have been deleted from the hard disk, so another approach is to delete the boot loader file from the EFI System Partition (ESP). Your screen shot is illegibly small, so I can't tell which it is, but you can probably mount the ESP in Windows by typing
mountvol S: /S
in an Administrator command prompt window. You can then change toS:
and remove theS:\EFI\ubuntu
directory tree.Note that some EFIs seem to be buggy and hang onto EFI boot manager entries even after you delete the files and remove the entries with
efibootmgr
or similar tools. The only way I've found to cope with this is to delete all the entries and then add back the one(s) that you actually want to keep. It's simpler and safer to just ignore the unwanted entries in this case, since the tools to manipulate the EFI boot loader entries are still primitive command-line utilities that can easily provoke user errors.