View previous topic :: View next topic |
Author |
Message |
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 6:20 pm Post subject: Help, GRUB entry does not appear in UEFI |
|
|
Hello everyone, after installing Gentoo Linux on my notebook and installing grub and generating the GRUB configuration, upon restarting the EFI Shell is shown and when I enter the UEFI the entry does not appear, only the entry of the USB drive that I used to appear appears. install gentoo even though the USB is disconnected.
I tried with efibootmgr to create the entry from chroot by restarting in gentoo LiveCD, and with efibootmgr -v it showed the gentoo entry but when exiting chroot and restarting again it showed the EFI Shell and the entry did not appear, I tried it as several times re-chrooting and installing grub and formatting the EFI partition with vfat several times but it doesn't work, always to the EFI shell.
UEFI is Aptio Setup Utility - Copyright (C) 2021 American Megatrends, Inc.
dated 2021 with BIOS version 2.01.00 and EC Version: 1.01
The UEFI options are very Limited as it only has 3 options: the Main Menu where you can only change the date, day and language of the System (UEFI), and it also shows the CPU that the computer has.
The Boot Menu where you can only change the boot order between hard drive, USB and other devices and the boot priority.
and finally the menu to save and exit and also the Boot Override.
As you can see, it does not have Secure Boot or to put a password on the bios and it does not have CSM or the security menu, very limited.
gentoo is not detected by the UEFI system and I need help so that gentoo can boot on this Notebook. _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1727 Location: South America
|
Posted: Thu Sep 21, 2023 7:00 pm Post subject: |
|
|
It might be bad quality firmware that just ignores and deletes Boot### variables. I suppose that your installation medium is the USB drive, right? When you reboot with it and reenter the chroot, what happens is that efibootmgr -v no longer shows the entry for Gentoo that grub-install created, right?
Could you mount the EFI System partition from the Gentoo chroot and show the output of ls -l /mountpoint-of-the ESP/EFI/*? _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 8:29 pm Post subject: |
|
|
What was shown was the following:
ls -l /boot/efi/*
total 1
drwxr-xr-x 2 root root 512 Sep 20 20:49 GENTOO
and as an extra the grubx64.efi is present:
ls /boot/efi/EFI/GENTOO/grubx64.efi
/boot/efi/EFI/GENTOO/grubx64.efi
NOTE: I don't know how to copy and paste what is shown in the terminal because I am doing this answer on my desktop PC that runs Arch Linux, the notebook that I am trying to make gentoo be detected by the firmware is of secondary use as its processor is a Intel celeron n4020 with 2 cores and 4GB of RAM, compiling the Gentoo kernel took me 3 hours if I'm not mistaken and even more updating with emerge the entire new system in chroot _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1727 Location: South America
|
Posted: Thu Sep 21, 2023 9:26 pm Post subject: |
|
|
So, is the mountpoint of the EFI System Partition /boot/efi? Is "GENTOO" the only directory in /boot/efi/EFI, and grubx64.efi the only file in /boot/efi/EFI/GENTOO? Also, you didn´t answer this:
GDH-gentoo wrote: | I suppose that your installation medium is the USB drive, right? When you reboot with it and reenter the chroot, what happens is that efibootmgr -v no longer shows the entry for Gentoo that grub-install created, right? |
_________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 9:31 pm Post subject: |
|
|
Yes, the answer I didn't answer is true, also when rebooting without the USB terminal drive in EFI Shell
and if you started on LiveCD efibootmgr does not show the entry in chroot and in UEFI it does not appear _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1727 Location: South America
|
Posted: Thu Sep 21, 2023 9:35 pm Post subject: |
|
|
OK, now answer this:
GDH-gentoo wrote: | So, is the mountpoint of the EFI System Partition /boot/efi? Is "GENTOO" the only directory in /boot/efi/EFI, and grubx64.efi the only file in /boot/efi/EFI/GENTOO? |
_________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 9:41 pm Post subject: |
|
|
Yes, /boot/efi is the ESP mount point, "GENTOO" is the only directory and grubx64.efi is the only file in the GENTOO directory.
In case you're wondering, I tried efibootmgr to get lucky but when it shows that it was added when rebooting, the entry is no longer there. _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5169 Location: Bavaria
|
Posted: Thu Sep 21, 2023 9:57 pm Post subject: |
|
|
I suspect you have a crippled BIOS. It is questionable whether it understands SecureBoot. What was previously installed on this system? Windows ? With or without SecureBoot ?
There is a SMALL chance to get it working for Linux:
The UEFI specification says that every UEFI must be able to load at least one fixed file - WITHOUT an explicit entry in the UEFI table. This file is named: bootx64.efi (and can be whatever it is)
If it is to be loaded from disk, it must be in the \efi\boot directory.
So you can try to copy the grub (grubx64.efi) to this !
1. boot with our GentooInstallCD
2. mount your ESP-/boot-partition on /mnt/gentoo, so you have access to the ESP-/boot-partition.
3. create a /mnt/gentoo/efi/boot directory
4. copy /mnt/gentoo/efi/gentoo/grubx64.efi to /mnt/gentoo/efi/boot/bootx64.efi
5. umount and reboot
Does grub appear now ? |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1727 Location: South America
|
Posted: Thu Sep 21, 2023 10:09 pm Post subject: |
|
|
Adding the --removable option to the grub-install invocation from the chroot will also create \EFI\BOOT in the ESP, if it doesn't exist, and make a copy of grubx64.efi in there as bootx64.efi.
This is indeed one possible workaround for crappy firmware, but I didn't want to suggest it before making sure that an existing bootx64.efi would not be overwritten. That was the reason for the questions. Workaround #2 would be disguising GRUB as the Windows loader, but let's hear from ian848uig if workaround #1 succeded. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
Last edited by GDH-gentoo on Thu Sep 21, 2023 10:13 pm; edited 1 time in total |
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 10:13 pm Post subject: |
|
|
I previously installed Windows on this notebook although it came with Linux because it is a School netbook and I didn't like the distribution it had and I installed Windows on it until yesterday when I tried Gentoo and found that it doesn't take the GRUB input.
The distribution that originally came is based on Debian.
.
also reformat it to install Gentoo using fdisk from the Gentoo installation LiveCD
I also installed Windows before and took the input. but it does not support SecureBoot, it seems although some programs say that it is disabled because the option is absent
I mean grub would have to be detected if it came with a distribution that was based on debian _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 10:29 pm Post subject: |
|
|
good news, with the --removable option the entry was detected by the UEFI firmware although it appears as "UEFI OS(P0: Lexar 240GB SSD)" but GRUB was detected and booted without any problem and now I will be safe for a couple of hours at Poor specifications of the notebook to install KDE Plasma as a Desktop Environment _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5169 Location: Bavaria
|
Posted: Thu Sep 21, 2023 10:31 pm Post subject: |
|
|
GDH-gentoo wrote: | [...] but I didn't want to suggest it before making sure that an existing bootx64.efi would not be overwritten. That was the reason for the questions.[...] |
Yes ... I know that ... and therefore I have waited with my suggestion until there is no other bootx64.efi ... and I also know that you know it.
I intentionally suggested copying over because then he doesn't have to chroot completely into gentoo. If you want to use the --removable parameter during grub-install he must do more (complete chrooting):
- boot with amd64-minimal CD
# mount /dev/sdXY /mnt/gentoo
# cd /mnt/gentoo
# mount -t proc /proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# mount --bind /run /mnt/gentoo/run
# chroot /mnt/gentoo /bin/bash
# . /etc/profile
# mount /dev/sdXZ /boot
and then again grub-install (and maybe also grub-mkconfig ?). |
|
Back to top |
|
|
ian848uig n00b
Joined: 21 Sep 2023 Posts: 45 Location: Latin America
|
Posted: Thu Sep 21, 2023 10:33 pm Post subject: |
|
|
In total, with the many attempts of trying to get the input taken, I already learned Gentoo Chroot by heart _________________ I like everything that is Linux, free and open source software. I am a teenager |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5169 Location: Bavaria
|
Posted: Thu Sep 21, 2023 10:35 pm Post subject: |
|
|
ian848uig wrote: | In total, with the many attempts of trying to get the input taken, I already learned Gentoo Chroot by heart |
As you can imagine, I wrote my last post parallel with your last post ... I'm happy it works.
Have fun with Gentoo ! |
|
Back to top |
|
|
|