0% found this document useful (0 votes)
11 views

How To Fix Missing GRUB Boot Menu After A Windows Update

when you loose your boot to winblows

Uploaded by

dojai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

How To Fix Missing GRUB Boot Menu After A Windows Update

when you loose your boot to winblows

Uploaded by

dojai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Em 25/junho: https://techblog.

dev/posts/2021/12/how-to-fix-missing-grub-boot-menu-after-a-
windows-update/

How to Fix Missing GRUB Boot Menu after a


Windows Update
This tutorial explains how to restore the GRUB boot menu on Ubuntu, Manjaro, Arch Linux which
disappeared after updating Windows on a dual / multi boot machine.

You’ve installed your favorite Linux distro alongside Windows and have been happily enjoying the
best of both worlds, without having to override your Windows installation. This is possible thanks
to the incredible bootloader: GRUB.
Until one day you notice that the GRUB boot menu no longer appears, causing your computer to
automatically boot on Windows — locking you out of your Linux installation. If you have been
plagued by this issue, cursing Linux or GRUB will be of no help. The real culprit here is Windows.
Here is what actually happened. Unlike GRUB which is intelligent by design to detect the presence
of other operating systems, the Windows bootloader doesn’t take into account other operating
systems that are installed on the computer. Whenever a major Windows update is available, the
GRUB bootloader gets replaced by the Windows bootloader. Therefore, in order to bring back the
GRUB boot menu, all we have to do is replace the Windows bootloader with GRUB.

Restore Missing GRUB Boot Menu


The instructions below explain how to restore / reinstall GRUB on Ubuntu, Debian, Manjaro, Arch
Linux and other derivatives.

Step 1: Boot from a Live USB


First, you need to boot from a live Linux USB. Then, open a Terminal window.

Step 2: Identify Root Partition and EFI Partition


Run the following command to determine the current root and EFI partitions:
lsblk -io KNAME,MOUNTPOINT | grep "/"

Bash

1/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt
We’ll now create shell variables to denote the root and EFI partitions:

Caution
Make sure to set the variables $ROOT_PART and $EFI_PART with the proper partition names you
obtained above! Also, don't forget to add /dev/ in front of the partition name as shown below:
export ROOT_PART="/dev/nvme0n1p5"
export EFI_PART="/dev/nvme0n1p1"

Bash

Step 3: Mount Root Partition and EFI Partition


Next, mount these partitions and set proper permissions:
sudo mount $ROOT_PART /mnt
sudo mount $EFI_PART /mnt/boot/efi

Bash
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /sys /mnt/sys
sudo mount -o bind /run /mnt/run

2/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt
sudo chroot /mnt/

Bash

Step 4: Fix GRUB Installation


Once the proper partitions have been mounted, run the appropriate commands below depending on
your Linux distro.
1. Ubuntu and Debian derivatives (For UEFI or Non-UEFI):
sudo apt-get install --reinstall grub-efi
sudo update-grub

Bash
2. Manjaro and Arch Linux derivatives (For UEFI):
sudo pacman -S grub efibootmgr os-prober
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-
id=grub
sudo grub-mkconfig -o /boot/grub/grub.cfg

Bash
3. Manjaro and Arch Linux derivatives (For Non-UEFI):
sudo pacman -S grub
sudo grub-install --recheck --target=i386-pc $ROOT_PART
sudo grub-mkconfig -o /boot/grub/grub.cfg

Bash

Step 5: Reboot
Finally, restart your computer and you should be good to boot on Linux again :)
sudo reboot

Bash
Tip
If you still don’t see the GRUB boot menu, you’ll need to change the boot order in the BIOS. It is
also possible to do this from Windows without entering the BIOS as explained below.

Changing GRUB Boot Order in Windows


The following steps will enable you to change the boot order priority to set GRUB as the preferred
bootloader without entering the BIOS.

Step 1
In Windows, click on the Start Menu and search for “Command Prompt”.

3/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt
Step 2
Right click on the Command Prompt menu option and click “Run as administrator”.
Note
It is important to open the Command Prompt with Administrator privileges, otherwise the step
below will not work!

Step 3
Copy and paste the appropriate command below depending on your Linux distro in the Command
Prompt window and press ENTER:
1. For Ubuntu:
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Batch
2. For Manjaro:
bcdedit /set {bootmgr} path \EFI\Manjaro\grubx64.efi

4/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt
Batch
2. For Arch Linux:
bcdedit /set {bootmgr} path \EFI\Arch\grubx64.efi

Batch
Next, reboot your machine and you should see the GRUB boot menu again :)

# Footnotes
https://wiki.archlinux.org/title/GRUB
https://www.bleepingcomputer.com/forums/t/734220/lost-my-grub-menu-on-manjarowin-10-dual-
boot/
https://askubuntu.com/questions/1001822/trouble-with-dual-boot-after-windows-10-update-used-
bcdedit-now-cant-access-b

5/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt
em 27/junho/2024 disco SSD do LG:

dojai@a410:~$ df
Sist. Arq. Blocos de 1K Usado Disponível Uso% Montado em
tmpfs 798600 1656 796944 1% /run
/dev/sda5 95534732 34048096 56603924 38% /
tmpfs 3992996 32 3992964 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
/dev/sda3 245967 6186 239781 3% /boot/efi
/dev/sda6 623129728 130586928 460816364 23% /home
tmpfs 798596 116 798480 1% /run/user/1000

root@a410:~# fdisk -l /dev/sda


Disco /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 setores
Disk model: WD Green 2.5 100
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0xc59f93c0

root@a410:~# fdisk -l /dev/sda


Disco /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 setores
Disk model: WD Green 2.5 100
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0xc59f93c0

Dispositivo Inicializar Início Fim Setores Tamanho Id Tipo


/dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda2 1026048 489307297 488281250 232,8G 7 HPFS/NTFS/exFAT
/dev/sda3 * 489308160 489807871 499712 244M ef EFI (FAT-12/16/32)
/dev/sda4 489809918 1953523711 1463713794 698G 5 Estendida
/dev/sda5 489809920 685118513 195308594 93,1G 83 Linux
/dev/sda6 685121536 1953523711 1268402176 604,8G 83 Linux

6/6 /home/dojai/MEGAsync/documentos/How to Fix Missing GRUB Boot Menu after a Windows Update.odt

You might also like