View previous topic :: View next topic |
Author |
Message |
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Fri Apr 26, 2024 8:01 am Post subject: Solved grub fail again |
|
|
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=gentoo
installerar för x86_64-efi-plattform
efi variables are not supported on this system
grub-install:fel: efi boot mgr misslyckades med att registrera uppstartsposten:
filen eller katalogen finns inte
/Borje
Last edited by borje2 on Tue Apr 30, 2024 5:14 pm; edited 1 time in total |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Fri Apr 26, 2024 9:56 am Post subject: |
|
|
Hello,
This is an English subsection of the forum, if there is one available in your language, please, go in there if you want to speak your mother's tongue.
Otherwise, in English, please :).
Also, funny story: I had this problem yesterday, you seems to have boot the USB live of Gentoo in BIOS mode, not UEFI.
Rebooting on it will allow you to finish the installation process in UEFI mode.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22578
|
Posted: Fri Apr 26, 2024 2:40 pm Post subject: |
|
|
When posting error messages from programs, please run the program with LC_MESSAGES=C, so that the messages are not translated. This makes it easier for us to understand what the tool is reporting. |
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Fri Apr 26, 2024 3:10 pm Post subject: grub-install |
|
|
grub-install fail
grub-install --target=x86_64-efi --efi-directory=/boot --bootloadet-id=gentoo
installing for x86_64-efi platforms
EFI variables are not supported on this system
grub-install :error: efibootmgr failed to register the boot entry: no such file or directory
/Borje |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 481
|
Posted: Fri Apr 26, 2024 4:55 pm Post subject: |
|
|
Did you boot the live-medium in UEFI mode? Check if the /sys/firmware/efi directory is filled.
Did you chroot correctly? Please show the commands you used. |
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Fri Apr 26, 2024 7:18 pm Post subject: sMueggli |
|
|
I don't know how to boot live-medium in UEFI mode?
/sys/firmware/efi directory where did I found that?
sorry I am newbi
/Borje |
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Fri Apr 26, 2024 7:42 pm Post subject: |
|
|
now I boot into live medium in UEFI mode
chroot
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
swapon /dev/sda2
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
/sys/firmware/efi directory I cannot find
/Borje |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Fri Apr 26, 2024 7:46 pm Post subject: |
|
|
borje2 wrote: | now I boot into live medium in UEFI mode
chroot
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
swapon /dev/sda2
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
/sys/firmware/efi directory I cannot find
/Borje |
Don't you forget to mount /efi ?
You have mounted a partition as boot, it should probably be a VFAT 32 partition, typed as EFI, with fdisk for example. And it should be named /efi, not /boot. So it's the same command (same partition) but you have to mount it on /mnt/gentoo/efi.
/boot is used for BIOS computer, not UEFI.
Did you use a GPT layout for the disk or BIOS ?
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
Posted: Fri Apr 26, 2024 9:07 pm Post subject: |
|
|
borje2 wrote: | now I boot into live medium in UEFI mode
[...]
/sys/firmware/efi directory I cannot find |
Once again:
Check your BIOS setting: CSM mode (some BIOS call it "legacy") must be DISABLED.
Our GentooCDs are dualboot-capable ... IF UEFI-(BIOS) is set to CSM they do an old MBR boot AND THEN you dont have a /sys/firmware/efi directory. _________________ https://wiki.gentoo.org/wiki/User:Pietinger
Last edited by pietinger on Fri Apr 26, 2024 9:12 pm; edited 1 time in total |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1674 Location: South America
|
Posted: Fri Apr 26, 2024 9:07 pm Post subject: |
|
|
borje2 wrote: | /sys/firmware/efi directory I cannot find |
After booting the live medium (don't chroot yet):
Code: | ls -F /sys/firmware |
If "efi/" is not in the output, then the live medium did not boot in UEFI mode. _________________
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Sat Apr 27, 2024 6:53 am Post subject: |
|
|
I have disable legacy in BIOS setting
I am very confused
when I boot from live cd i use BOOTx64.efi
shall I only have directory /efi? Not /boot
what should be the keystroke for
grub-install |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1028
|
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 481
|
Posted: Sat Apr 27, 2024 8:20 am Post subject: |
|
|
kgdrenefort wrote: | /boot is used for BIOS computer, not UEFI. | That is nonsense. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1674 Location: South America
|
Posted: Sat Apr 27, 2024 12:03 pm Post subject: |
|
|
borje2 wrote: | I am very confused
when I boot from live cd i use BOOTx64.efi
shall I only have directory /efi? Not /boot |
I have no idea what you are asking. _________________
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 |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
Posted: Sat Apr 27, 2024 12:23 pm Post subject: |
|
|
borje2 wrote: | I have disable legacy in BIOS setting |
Good.
borje2 wrote: | when I boot from live cd i use BOOTx64.efi |
Yes, every bootable OperatingSystem (for UEFI) - every Linux and also Windows - use this NAME because it is a hardcoded name every UEFI understands. As you surely already know you must make an UEFI boot-entry to boot a kernel or bootmanager or Windows ... but you dont want to do this for every USB stick (or bootable CD). Therefore UEFI invented this hardcoded name. Now you can boot this WITHOUT having a boot entry. You must know: BOOTx64.efi IS the grub (only renamed from grubx64.efi to this name). See more here: https://wiki.gentoo.org/wiki/EFI_System_Partition#Removable_media
borje2 wrote: | shall I only have directory /efi? Not /boot |
You will need both directories. You mount your ESP (EfiSystemPartition) to /efi ... and then later grub-install will install your grubx64.efi (=first part of grub) INTO /efi/EFI/gentoo/grubx64.efi ... and ... the second part of grub INTO /boot/grub
Please read: https://forums.gentoo.org/viewtopic-t-1165115-highlight-.html
borje2 wrote: | what should be the keystroke for grub-install |
Sorry, I dont understand your question. Please describe in other words what you mean. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Sat Apr 27, 2024 2:42 pm Post subject: |
|
|
I get more confused with UEFI
shall I have 2 diffrent directory? /efi and /boot both mount on /dev/sda1?
mount /sys is it not in
mount --rbind /sys /mnt/gentoo/sys
and
mount --make-rslave /mnt/gentoo/sys
/Borje |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5036 Location: Bavaria
|
|
Back to top |
|
|
borje2 Apprentice
Joined: 19 Apr 2024 Posts: 195 Location: Gällivare
|
Posted: Sat Apr 27, 2024 3:13 pm Post subject: |
|
|
Two directory OK
mount ESP to /efi I don't understand how to
when I start from live-cd I go into bootsetup
I take
kör UEFI-program
CDROM: hp DVD-ram UJ8E1
EFI
BOOT
BOOTx64,EFI
ls -F /sys/firmware
Show:
acpi/ dmi/ efi/ memmap/
/Borje |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1674 Location: South America
|
Posted: Sat Apr 27, 2024 3:43 pm Post subject: |
|
|
Alright. After booting your live medium, without chrooting, post the outputs of:
Code: | $ lsblk -o name,mountpoints,partlabel,parttype
$ ls -F /mnt/*
$ mount |
_________________
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 |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Sat Apr 27, 2024 4:19 pm Post subject: |
|
|
sMueggli wrote: | That is nonsense |
Indeed, I wanted to say: /boot is used to install GRUB for a MBR/BIOS case (but also used in GPT/BIOS case IIRC), got a bit quick to answer.
That /boot partition will be where grub-install works on BIOS system.
While /efi is used on an UEFI system, and is used as the directory where you use grub-install command.
Is that more correct ? _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1674 Location: South America
|
Posted: Sat Apr 27, 2024 5:24 pm Post subject: |
|
|
kgdrenefort wrote: | Is that more correct ? |
No.
I don't like the term "the /boot partition". If it means anything, it is "the partition that you mount at /boot", which is a user's choice and may very well be none. Although the chosen bootloader (or lack of) can force the user to set things up in a particular way. So in my opinion the term is best avoided.
grub-install always installs most of GRUB (modules, fonts, themes, files for localization, etc.) to the /boot directory, regardless of target, and regardless of which partition holds the contents of that directory —unless said partition contains a filesystem type that GRUB doesn't support reading from—.
The rest of it depends: on UEFI systems, grub-install additionally installs a PE32+ file to the EFI System Partition. Which can be mounted wherever you want as long as you tell grub-install where it is. Although three choices are the customary ones: /boot, /boot/efi and /efi. The Gentoo Handbook currently favors the latter.
On BIOS systems and disks with a GPT, grub-install additionally installs part of it to the protective Master Boot Record, and part of it to a partition marked in the GPT with a special Partition Type GUID.
On BIOS systems and disks with a MS-DOS partition table, grub-install additionally installs part of it to the Master Boot Record, and part of it to the space between the MBR and the first partition —which must be large enough—.
Oh, and you usually don't need to tell grub-install which system it is: it does a decent job guessing it and figuring out what to do. I. e. --target is not generally needed. _________________
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 |
|
|
|