Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Grub bootloader ERROR after Installation

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Grub bootloader ERROR after Installation

#1 Post by Symposion33 »

Hello!

I originally installed Manjaro Linux as Dual Boot after Win10, it all worked, but I decided after some months to install Debian Linux instead of Manjaro.
I resized my Nvme to get a bit more space for the Linux partition first, then used the debian-live-10.10.0-amd64-kde+nonfree.iso from a USB stick.
Installation went flawlessly, but the first boot attempt produced this error:

error: symbol 'grub_is_lockdown' not found
Entering rescue mode...
grub rescue>

Thanks to my MSI Bios I can still press F11 and boot into either Win10 and Debian, but of course I want to fix this Grub Problem.

/boot/efi/EFI# ls -la
total 6
drwx------ 6 root root 1024 Aug 2 17:20 .
drwx------ 3 root root 1024 Jan 1 1970 ..
drwx------ 2 root root 1024 Jul 30 2020 Boot
drwx------ 2 root root 1024 Aug 2 17:20 debian
drwx------ 2 root root 1024 Mar 3 12:53 Manjaro
drwx------ 4 root root 1024 Jul 30 2020 Microsoft

Obviously the installer (or I) screwed this up, there is no more Manjaro on the System, just Debian and Win10.
I didn't try anything yet. My first idea would be to delete the Manjaro directory in the /boot/efi/EFI directory,
but I guess it would need more than that to fix this issue, so I hope you guys can help me out.

Thank you!

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Grub bootloader ERROR after Installation

#2 Post by mm3100 »

Check with efibootmgr -v to see boot order of EFI files. If Manjaro bootloader is before Debian or Win10 then that is your issue. For that you can change ordering, deactivate or delete Manjaro EFi file.

To deactivate run efibootmgr -A -b bootXXXX, where bootXXXX of Manjaro you get from efibootmgr -v. Then try to restart. If it works fine then that is your issue. Deactivating won't delete anything, will just make it inactivate in boot process.

If you set Debian to be first in order then it will start it with grub, from there you could chose Win10 or Debian.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#3 Post by Symposion33 »

thank you for the help, I will try to fix it in a few hours and report back my experience.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#4 Post by Symposion33 »

ok here's what I did so far, rebooting now after writing this reply...
No idea why there's 2 Debian entries, maybe one for GUI one for shell? I'll have to check later...

Code: Select all

root@Valhalla:/boot# efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0003,0000,0001,0004
Boot0000* Windows Boot Manager  HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0003* Manjaro       HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0004* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
root@Valhalla:/boot# man efibootmgr
root@Valhalla:/boot# efibootmgr -A -b boot0003
Invalid bootnum valueboot0003
                        ^
root@Valhalla:/boot# efibootmgr -A -b 0003    
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0003,0000,0001,0004
Boot0000* Windows Boot Manager
Boot0001* debian
Boot0003  Manjaro
Boot0004* debian
root@Valhalla:/boot# efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0003,0000,0001,0004
Boot0000* Windows Boot Manager  HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0003  Manjaro       HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0004* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
root@Valhalla:/boot# efibootmgr -B 0003
You must specify an entry to delete (see the -b option).
root@Valhalla:/boot# efibootmgr -B -b 0003
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0000,0001,0004
Boot0000* Windows Boot Manager
Boot0001* debian
Boot0004* debian
root@Valhalla:/boot# cd efi/
root@Valhalla:/boot/efi# ls -la
total 6
drwx------ 3 root root 1024 Jan  1  1970 .
drwxr-xr-x 4 root root 4096 Aug  2 19:34 ..
drwx------ 6 root root 1024 Aug  2 17:20 EFI
root@Valhalla:/boot/efi# cd EFI
root@Valhalla:/boot/efi/EFI# ls -la
total 6
drwx------ 6 root root 1024 Aug  2 17:20 .
drwx------ 3 root root 1024 Jan  1  1970 ..
drwx------ 2 root root 1024 Jul 30  2020 Boot
drwx------ 2 root root 1024 Aug  2 17:20 debian
drwx------ 2 root root 1024 Mar  3 12:53 Manjaro
drwx------ 4 root root 1024 Jul 30  2020 Microsoft
root@Valhalla:/boot/efi/EFI# efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0000,0001,0004
Boot0000* Windows Boot Manager  HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0004* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
root@Valhalla:/boot/efi/EFI# rm -rf M
Manjaro/   Microsoft/ 
root@Valhalla:/boot/efi/EFI# rm -rf Manjaro/
root@Valhalla:/boot/efi/EFI# ls -la
total 5
drwx------ 5 root root 1024 Aug  6 18:49 .
drwx------ 3 root root 1024 Jan  1  1970 ..
drwx------ 2 root root 1024 Jul 30  2020 Boot
drwx------ 2 root root 1024 Aug  2 17:20 debian
drwx------ 4 root root 1024 Jul 30  2020 Microsoft
root@Valhalla:/boot/efi/EFI#
Last edited by Symposion33 on 2021-08-08 07:52, edited 1 time in total.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#5 Post by Symposion33 »

so, the Grub error is gone now, but the PC just boots directly into Win10 instead of showing the Grub selection window.
Guess I need to change something more, but it's already better.
I'll read the man page, maybe I can figure it out, or if you're so nice, help me out again.
in any case, thanks a lot!! (I don't see a thank you button on your reply, otherwise I would hit that too)

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#6 Post by Symposion33 »

Code: Select all

root@Valhalla:/home/platon# efibootmgr -v
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0000,0001,0004
Boot0000* Windows Boot Manager  HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0004* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
root@Valhalla:/home/platon# efibootmgr -o 0001,0000,0004
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0001,0000,0004
Boot0000* Windows Boot Manager
Boot0001* debian
Boot0004* debian
root@Valhalla:/home/platon# /sbin/shutdown -r now
I hope that returns the Grub menu, as you wrote.
One more question: i have now boot 0,1,4. can i rename Boot0004 into Boot002 somehow?

thanks a lot!
Last edited by Symposion33 on 2021-08-08 07:53, edited 1 time in total.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#7 Post by Symposion33 »

ok, I set boot order to -o 4,1,0 and then used -n to set next boot . which worked ONCE, after every boot it forgets the boot order I gave it.
do in need to use -w to write 'unique signature to MBR'?

-w | --write-signature
write unique signature to the MBR if needed

or how can i tell the system to not forget my boot order?
thanks
Last edited by Symposion33 on 2021-08-06 18:18, edited 1 time in total.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Grub bootloader ERROR after Installation

#8 Post by mm3100 »

You have broken UEFI implementation, like I do. Your system might not be able to remember boot order. To get grub to start you need to deactivate windows EFI file. Like you did with Manjaro in start. It doesn't remove it from boot order, but when you look at description it is missing *, which means it is inactive, and won't start. So you didn't really needed to delete Manjaro one at all.

Run

Code: Select all

efibootmgr -A -b 0000
You will still be able to boot windows from grub. If you don't see windows as option in grub, you would have to call OS probing manually. Check here for possible issues.
https://wiki.debian.org/DualBoot/Windows10

As for why there are 2 Debian EFI files I am not sure, I don't have that, but did you possibly install Debian with secure boot off once? As that would explain other one.

Edit, also please edit previous post and place that text to code block, so it is easier to read through.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#9 Post by Symposion33 »

Code: Select all

root@Valhalla:/home/platon# efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0000,0001,0004
Boot0000* Windows Boot Manager  HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0004* debian        HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
root@Valhalla:/home/platon# efivootmgr -A -b 0000
bash: efivootmgr: command not found
root@Valhalla:/home/platon# efibootmgr -A -b 0000
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0000,0001,0004
Boot0000  Windows Boot Manager
Boot0001* debian
Boot0004* debian
root@Valhalla:/home/platon# efibootmgr -t 6
BootCurrent: 0001
Timeout: 6 seconds
BootOrder: 0000,0001,0004
Boot0000  Windows Boot Manager
Boot0001* debian
Boot0004* debian
root@Valhalla:/home/platon# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3.2G  9.5M  3.2G   1% /run
/dev/nvme0n1p5  335G   11G  308G   4% /
tmpfs            16G   37M   16G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p1   96M   29M   68M  30% /boot/efi
tmpfs           3.2G   16K  3.2G   1% /run/user/1000
Image


After disabling the Windows Boot option, the PC still boots directly into Win10. Grub does not even show up (unless I explicitly tell efibootmgr to boot Debian partion on next boot, then it works once)
My system disk is a Crucial NVME P1 1000GB, all the other disks are SATA hdds.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub bootloader ERROR after Installation

#10 Post by p.H »

mm3100 wrote: 2021-08-06 18:18 You have broken UEFI implementation, like I do. Your system might not be able to remember boot order.
Then how come the Manjaro boot entry worked ?

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Grub bootloader ERROR after Installation

#11 Post by mm3100 »

p.H wrote: 2021-08-08 11:01
mm3100 wrote: 2021-08-06 18:18 You have broken UEFI implementation, like I do. Your system might not be able to remember boot order.
Then how come the Manjaro boot entry worked ?
It was first in the line, so it was selected before Windows one, if that is what you mean? I know that when I installed Windows after Debian, that Windows got pushed to the first line, don't know exactly how it works.

Can you check in BIOS if you can change boot order, maybe you can do it there. I know I wasn't able to and efibootmgr was only way. I am not sure why it started Windows even after EFI file was inactive. Can you check again after booting to Debian result of efibootmgr -v? Maybe it wasn't saved?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Grub bootloader ERROR after Installation

#12 Post by p.H »

mm3100 wrote: 2021-08-08 11:47 It was first in the line, so it was selected before Windows one
What do you mean by "first in the line" ?
The manjaro boot entry had number 0003 while Windows boot entry has number 0000.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Grub bootloader ERROR after Installation

#13 Post by mm3100 »

Symposion33 wrote: 2021-08-06 16:51 root@Valhalla:/boot# efibootmgr -v
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0003,0000,0001,0004
Boot0000* Windows Boot Manager HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/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.}....................
Boot0001* debian HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\SHIMX64.EFI)
Boot0003* Manjaro HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0004* debian HD(1,GPT,ee358138-4650-4f46-b15b-84a524416213,0x800,0x32000)/File(\EFI\DEBIAN\GRUBX64.EFI)..BO
From here, it was first in line. But user didn't change it manually. How they are ordered after installation is unknown to me. But even if Winodws is 0000, installer can still push something in front of it. Only issue with efibootmgr here is that it isn't able to manually change boot order.

For example here is my list

Code: Select all

BootOrder: 0001,3001,0003,2001,2002,2003
Boot0001  Windows Boot Manager  HD(1,GPT,590f7b70-e9ba-4286-a898-00be21c7ca01,0x800,0x100000)/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................
Boot0003* debian        HD(1,GPT,590f7b70-e9ba-4286-a898-00be21c7ca01,0x800,0x100000)/File(\EFI\debian\shimx64.efi)
Boot2001* USB Drive (UEFI)      RC
Boot3001* Internal Hard Disk or Solid State Disk        RC
Numbering scheme doesn't make much sense, and they seem to be ordered randomly. But I wasn't able to change order manually as well. Once I installed Winodws after Debian it pushed it self to the front of the line.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

[SOLVED]Re:Grub bootloader ERROR after Installation

#14 Post by Symposion33 »

Thank you Everybody for your help!
After fixing the EFI and removing the obsolete entries, I now also figured out why the BIOS never bootet into Linux.
It was indeed a BIOS option, as someone suggested anyway.
Apparently my MSI BIOS is capable of not only choosing the Boot partition, but also which entry inside it will actually boot first.
So after changing the boot options in various menus, it finally boots the GRUB boot manager instead of directly Windows.
Thanks again for the help, and sorry for not checking the BIOS earlier myself, I knew I set it to the correct partition, but didn't know there were Options in the BIOS to even select individual stuff from said partition.
some BIOS screenshots attached.


Image
Image
Image
Image
Image
Image
Image

PROBLEM SOLVED. THANKS A LOT!
Last edited by Symposion33 on 2021-08-23 16:47, edited 2 times in total.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: Grub bootloader ERROR after Installation

#15 Post by mm3100 »

I am glad you solved it, can you add [SOLVED] to tile, so others know.

Symposion33
Posts: 9
Joined: 2021-08-03 21:13

Re: Grub bootloader ERROR after Installation

#16 Post by Symposion33 »

I can only edit my last reply. added [solved] there, but I guess it should be in the OP posting, which i can no longer edit due to age.
thanks

Post Reply