Reidho Satria
317 words
2 minutes
How to Safely Remove a Linux Bootloader from a Shared EFI Partition

Illustration by champi on Pixiv

Hello and welcome! My name is Rei, and today I’m going to guide you through the process of safely removing a Linux bootloader from a shared EFI partition. This tutorial is designed to be easy to follow, even if you’re not very experienced with managing bootloaders or working with EFI partitions. By the end of this guide, you will have successfully removed the Linux bootloader without affecting your Windows installation.

WARNING

Before proceeding, it’s crucial to back up your important data. Mistakes during this process can prevent your system from booting properly.

NOTE

This tutorial is required Administrative privileges.

Steps#

1. Mount the EFI Partition#

First, we need to assign a temporary drive letter to the EFI partition so that we can access it. This can be done using the mountvol command. Open a Command Prompt with administrative privileges and run the following command:

mountvol X: /s

This command mounts the EFI system partition to the drive letter X:. You can choose any available drive letter, but for this tutorial, we will use X:. This step is crucial because it allows us to navigate to the EFI partition and make the necessary changes.

2. Navigate to the EFI Directory#

Next, we need to navigate to the EFI directory on the temporary drive. Open a Command Prompt and run the following commands:

cd X:/EFI

3. Find the Linux Bootloader#

Using ls command, we can find the Linux bootloader name in the EFI directory.

ls

after running the above command, you will see a list of files and directories in the EFI directory. The Linux bootloader is typically named after its distribution, for example, Debian.

4. Remove the Linux Bootloader#

Now, we can remove the Linux bootloader using the rm command in Terminal or Remove-Item in PowerShell.

Remove-Item -Path "X:\EFI\Debian" -Recurse -Force # Powershell

rm -rf "X:\EFI\Debian" # Terminal

4. Unmount the EFI Partition#

Finally, we need to unmount the EFI partition using the mountvol command.

mountvol X: /d

Make sure to change your current location before unmounting.

How to Safely Remove a Linux Bootloader from a Shared EFI Partition
https://blog.rei.my.id/posts/5/how-to-safely-remove-a-linux-bootloader-from-a-shared-efi-partition/
Author
Reidho Satria
Published at
2024-07-15