Skip to content

Instantly share code, notes, and snippets.

@hasinhayder
Created January 26, 2022 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasinhayder/ebe4169d5c516eaa0c70fc7843ef559c to your computer and use it in GitHub Desktop.
Save hasinhayder/ebe4169d5c516eaa0c70fc7843ef559c to your computer and use it in GitHub Desktop.
Remove Grub Bootloader From Windows

Remove Boot Loader EFI / System Partion in Windows 10

Quick Guide

Open PowerShell as Administrator

mountvol S: /S
S:
cd .\EFI\
dir
Remove-Item -Recurse ubuntu

Details

Administrator PowerShell

Enter powershell into the windows search of the start menu. Look for a blue icon with the label "Windows PowerShell", right click on the that and select "Run as Administrator" within the context menu.

Mount EFI/System Partition As Volume

To Mount the EFI System Partition on the given drive use the mountvol command by using the /S parameter. You can chose any free drive letter you want. For example "S".

mountvol S: /S

Access Mounted Volume

Now the partition is mounted. We can access the mounted volume by changing to the drive by the cd command and the drive letter S: as parameter

cd S:

To ensure we are at the root of this volume we should execute:

cd\

Type via the dir command to list the entries of the current path to ensure you on the right one.

dir

It should look like this:

Directory: S:\


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2019-01-17     12:55                EFI
-a----       2018-10-16     10:57             31 startup.nsh

Delete Boot Loaders

Your boot loaders are location in the EFI directory. Change to it by using the cd command and list the entries via the dir command.

cd .\EFI\
dir

Your output depends on the boot loaders you have installed, here is a example with Windows and Ubuntu.

Directory: S:\EFI


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2018-12-06     06:55                Ubuntu
d-----       2018-12-05     05:21                Microsoft
d-----       2019-01-17     12:55                Boot

Now you can delete unwanted loaders via the command Remove-Item and the parameter -Recurse.

DO NOT DELETE THE BOOT DIRECTORY OR THE WINDOWS DIRECTORY!

Remove-Item -Recurse ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment