Grub not booting anymore, goes straight to Windows

So, yesterday I decided to update my motherboard firmware.

Booted into Windows, installed my motherboard software and it did it’s magic. But clearly, it also did something regarding how my PC boots, since now when I turn my PC on, it goes straight to Windows.

I have used Ventoy to search for and boot my Linux partition, and it does seem to find it, but after entering my password, I get the following error:

image

So then I booted the EOS ISO and chrooted into it and did “update-grub” which works fine but didnt fixed the boot issue.

So, that is pretty weird. Then I tried “grub-install” but that say’s:

Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

So after searching I tried “grub-install --target=i386-pc /dev/nvme0n1”:

Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won’t be possible.
grub-install: error: embedding is not possible, but this is required for RAID and LVM install.

So, that is where I am at. Does anyone know how I can fix this? What did the motherboard software do on the Windows side so that grub doesn’t work properly?

Are your systems installed in UEFI or MBR/Legacy mode?

Could you post the output of:

sudo parted -l
efibootmgr -v

from the EnOS ISO?

sudo parted -l

Model: ATA WDC WD40EZRZ-00G (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  4001GB  4001GB


Model: ATA WDC WD40EZRZ-00G (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  4001GB  4001GB


Model: ATA WDC WD40EZRZ-00G (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  4001GB  4001GB


Model: ATA CT1000MX500SSD4 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  17.8MB  16.8MB               Microsoft reserved partition  msftres
 2      17.8MB  1000GB  1000GB  ntfs         Basic data partition          msftdata


Model:  USB  SanDisk 3.2Gen1 (scsi)
Disk /dev/sde: 61.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  61.5GB  61.5GB  primary               boot
 2      61.5GB  61.5GB  33.6MB  primary  fat16        esp


Model: Samsung SSD 970 EVO 1TB (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      2097kB  317MB   315MB   fat32              boot, esp
 2      317MB   963GB   963GB                root
 3      963GB   1000GB  37.0GB

efibootmgr -v

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0003,0004,0002,0005
Boot0002* Hard Drive	BBS(HD,,0x0)..GO..NO........u.W.D.C. .W.D.4.0.E.Z.R.Z.-.0.0.G.X.C.B.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.7.C.4.K.S.E.3.5.6.5........BO..NO........u.W.D.C. .W.D.4.0.E.Z.R.Z.-.0.0.G.X.C.B.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.7.C.4.K.X.S.3.R.N.S........BO..NO........u.W.D.C. .W.D.4.0.E.Z.R.Z.-.0.0.G.X.C.B.0....................A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.7.C.5.K.S.S.E.T.T.2........BO..NO........u.C.T.1.0.0.0.M.X.5.0.0.S.S.D.4....................A.................................>..Gd-.;.A..MQ..L.9.1.3.0.1.E.4.E.7.2.C.F. . . . . . . . ........BO..NO........}.S.a.m.s.u.n.g. .S.S.D. .9.7.0. .E.V.O. .1.T.B....................A.......................................%8Y.........4..Gd-.;.A..MQ..L.S.4.6.7.N.X.0.M.9.1.4.3.0.5.J........BO
Boot0003* Windows Boot Manager	HD(1,GPT,583c49b6-9ed3-e04b-bfee-27f5968deac1,0x1000,0x96000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0004* UEFI:  USB, Partition 2	PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)/USB(16,0)/HD(2,MBR,0x293f4396,0x728c000,0x10000)..BO
Boot0005*  USB	BBS(HD,,0x0)..BO

In my BIOS I have everything default, so UEFI. Didn’t changed anything there, but maybe things did change there since I did updated my BIOS and it might have changed settings there without me knowing.

The Bios update seem to have deleted the EFI boot entry for your EnOS judging by the output of the efibootmgr.

Also:

is the command to install the bootloader for Legacy/MBR system if I am not mistaken. See:

https://wiki.archlinux.org/title/GRUB#Installation_2

You need this one instead:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=enos-grub

See:

https://wiki.archlinux.org/title/GRUB#Installation

Make sure to mount your system partition at /mnt and the ESP at /mnt/boot/efi before arch-chrooting.

I checked the BIOS and it’s UEFI.

Updating your BIOS may have re-enabled default Secure Boot, amongst other things.

Ok, so mounting that efi part is new to me. Isnt mounting nvme0n1p2 enough since all the needed data is there?

In any case, I just did:

  • sudo cryptsetup luksOpen /dev/nvme0n1p2 data
  • sudo mkdir /mnt/data
  • sudo mount /dev/mapper/data /mnt/data

Data is my Linux system drive with the OS. it contains:

bin boot crypto_keyfile.bin dev etc home lib lib64 lost+found mnt opt proc root run sbin srv sys tmp usr var

So, this is the same drive where I now also need to seperately mount “/mnt/data/boot/efi/” to /mnt/boot?

You need to mount ESP as well. For reference, please see:

https://discovery.endeavouros.com/system-rescue/arch-chroot-for-efi-uefi-systems/2021/03/

Scroll down to the part for encrypted systems.

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

is needed then before

sudo arch-chroot /mnt/data

1 Like

Just the command grub-install is recommend now. Check my post and also the discovery article

Right!
I keep forgetting it is so in EnOS. That is the default path is set to /boot/efi already.

Installing for x86_64-efi platform.
Installation finished. No error reported.

So far so good. Now a small break and then restarting the system and hoping it works.

It worked! Thanks everyone!

5 Likes

That’s great!
Glad you got it working!

:enos_flag: :wave:t5:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.