1

I installed Ubuntu 22.04 alongside Windows 11. After a Windows update, my system boots directly into Windows and does not show a GRUB menu, so I am unable to access Ubuntu. I attempted to fix the issue runnin boot-repair with default settings from a live USB. The result is here: https://paste.ubuntu.com/p/Dw4smk9n6S/. My system still boots directly into Windows.

I tried changing the boot order (though 'Ubuntu' is not explicitly listed), disabling secure boot as well as running bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi from Windows cmd. Still booting directly into Windows. Help would be greatly appreciated. Thanks!

camex
  • 11
  • 4

2 Answers2

1

After purging and reinstalling grub i tried this. For me this worked perfectly, on dual boot Ubuntu 22.04 , with Windows 11.

to list all your partition and disk use

sudo fdisk -l

In my case it looks like this :

Screenshot after fdisk -l

so on my computer <boot_partition> = /dev/nvme0n1p5 and <efi_partiton> = /dev/nvme0n1p1

After that run command from answer above:

sudo mount /dev/nvme0n1p5  /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi

for dir in /dev /dev/pts /proc /sys /run; do sudo mount --bind $dir /mnt$dir; done

sudo chroot /mnt /bin/bash mount -t efivarfs none /sys/firmware/efi/efivars grub-install update-grub

After rebooting system bootloader works perfect, and i can choose Ubuntu or Windows 11 system.

karel
  • 122,292
  • 133
  • 301
  • 332
mieho 1
  • 11
0

Thank you for the suggested solutions. After re-running boor-repair, the following line in the boot-repair summary gave the final hint:

grub-install: warning: EFI variables cannot be set on this system.

grub-install: warning: You will have to complete the GRUB setup manually.

Following Wiki Ubuntu Users and this StackExchange Artricle, I manually performed the steps:

sudo mount /dev/<boot_partition> /mnt
sudo mount /dev/<efi_partition> /mnt/boot/efi

for dir in /dev /dev/pts /proc /sys /run; do sudo mount --bind $dir /mnt$dir; done

sudo chroot /mnt /bin/bash mount -t efivarfs none /sys/firmware/efi/efivars grub-install update-grub

mount -t efivarfs none /sys/firmware/efi/efivars was the missing bit from the Wiki article.

camex
  • 11
  • 4