DEV Community

Cover image for Remove Linux GRUB from UEFI boot list and keep Windows BCD
Egit S.
Egit S.

Posted on • Originally published at esabook.wordpress.com on

Remove Linux GRUB from UEFI boot list and keep Windows BCD

UEFI: https://en.wikipedia.org/

ESP: https://en.wikipedia.org/

GRUB: https://www.gnu.org/software/grub/

BCD: https://en.wikipedia.org/


  1. Boot to Windows terminal mode, by typing this at command prompt
    shutdown.exe /r /o
    other guide https://www.minitool.com/

  2. Rebuild BCD (swapping GRUB to BCD)
    bootrec /rebuildbcd
    bootsect /nt60 sys
    bootrec /fixmbr
    if all of that command is not successful, jump to step 3, then back again here to rename old BCD, and retry.
    cd /d Z :/EFI/Microsoft/Boot
    ren BCD BCD.old

    20200209_113255
    Windows 10 at terminal mode

  3. Make​ ​ESP accessible
    diskpart
    type list disk if any other disk attached, else​ ​select disk 0

    type list volume to find ​ESP volume number

    select volume number (e.g 4 ) and assign a letter (e.g Z ) as ESP volume alias.
    select volume 4
    assign letter= Z
    exit

    20200209_121646
    Diskpart.exe

  4. Remove Kali GRUB from ESP
    cd /d **Z** :/efi
    rmdir /r /s **kali**

  5. Done


Bonus

Merging unused (old linux system) to single (nearest) partition.

Highlight of unused partition
Extend partition volume with diskmgmt.exe
Result of merged partition

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️