View previous topic :: View next topic |
Author |
Message |
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sat Jun 05, 2021 2:57 pm Post subject: grub-install failed |
|
|
Hi,
I followed HB for the install and now on the grub install chapter.
GRUB-2 compiled and i'm trying to install it, however I'm getting the following:
Code: |
grub-install --target=x86_64-efi --efi-directory=/boot
EFI variables are not supported on this system
EFI variables are not supported on this system
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory
|
And yes - that warning/error appeared twice.
What do I do?
I'm trying to set a GPT with EFI scheme.
This is on an old DELL Inspiron 1545. (~11 years old).
Thank you for any hints. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jun 05, 2021 3:05 pm Post subject: |
|
|
You must boot in EFI mode for efivars to be available. If this computer really can boot in EFI mode use some Linux EFI CD to boot and then finish Grub install manually, by using efibootmgr to add the Grub EFI executable to boot listing. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sat Jun 05, 2021 3:17 pm Post subject: |
|
|
Hi,
Can minimal boot into EFI mode? I do have latest version...
If not - what can I use?
Thank you. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Jun 05, 2021 3:24 pm Post subject: |
|
|
I'm sure the latest minimal can boot in EFI mode.
There is even quicker solution. You could copy your Grub EFI executable to EFI/BOOT/BOOTX64.EFI and reboot in EFI mode, EFI firmware will find it and it will be in your EFI boot menu, no need to set anything with efibootmgr. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Sat Jun 05, 2021 9:24 pm Post subject: |
|
|
ONEEYEMAN wrote: | Can minimal boot into EFI mode? I do have latest version... |
Like @Jaglover said before: YES.
So: It is only your settings in your BIOS (IF it is capable doing UEFI): Check if CSM Mode is enabled. If yes: Disable it (Some BIOS call it "legacy mode"; then disable this). The boot again and check
IF /sys/firmware/efi exists (this is the sign it was an UEFI-boot). |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sun Jun 06, 2021 4:05 am Post subject: |
|
|
Hi,
There is nothing in the BIOS.
But the drive does have a GPT label according to fdisk.
So what do I do?
Shuold I follow @Jaglover, copy an executable and see if it works?
Thank you. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Sun Jun 06, 2021 9:12 am Post subject: |
|
|
ONEEYEMAN wrote: | Shuold I follow @Jaglover, copy an executable and see if it works? |
Yes, I would give it a try.
If it doesnt work it is maybe not able to boot in UEFI (gpt alone doesnt make a disk UEFI-bootable if BIOS is not able). Dont forget to give the ESP-flag to the partition. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sun Jun 06, 2021 2:33 pm Post subject: |
|
|
Hi,
Whats an ESP flag? I don't remember anything like this in the HB...
Thank you. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Jun 06, 2021 2:46 pm Post subject: |
|
|
What happens if you install efibootmgr
and run
Code: |
efibootmgr
ls /sys/firmware/efi
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
|
If not then create a usb stick with Fedora Media Writer reboot enter the bios and make sure to boot into "UEFI <livecd-name>" _________________
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sun Jun 06, 2021 8:37 pm Post subject: |
|
|
Hi,
alamahant wrote: |
What happens if you install efibootmgr
and run
|
Install was successful, but running it gave:
Quote: |
EFI variables are not supported on this system.
|
I just rebooted into LiveCD, mounted ll partitions, chrooted and then:
Code: |
emerge efibootmgr
efibootmgr
|
So how do I install on this laptop?
Thank you. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Sun Jun 06, 2021 11:46 pm Post subject: |
|
|
Hi,
I don't mind re-installing from scratch, but I need guidance of what to do and how.
Unfortunately HB only mentions EFI/GPT + Legacy install, but I don't think it has instructions to do so.
Thank you. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21706
|
Posted: Mon Jun 07, 2021 12:30 am Post subject: |
|
|
Reinstalling is almost certainly not necessary. At worst, you might need to remake your boot partition, but I don't think we have even established that such a remake is required. Is there a particular reason you want to boot using EFI? If the system supports legacy boot mode well, and you can boot from that, then using that might be simpler than solving this. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Mon Jun 07, 2021 12:41 am Post subject: |
|
|
Hu,
No reason. Just wanted that based on the disk label (GPT).
I also presume that the CD is booted into legacy mode and its only disk label, i.e. no EFI support.
It is DELL Inspiron 1445 that used to have 7.
Now IIUC, I need to redo the install since it will be different partitioning scheme and different disk label.
And the former is what GRUB is looking for during the install.
Thank you. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Mon Jun 07, 2021 12:51 am Post subject: |
|
|
The only thing that won't work in legacy mode with your current setup and layout is Grub (it needs its own tiny partition with GPT). Use some other booloader, Syslinux or Lilo and you do not have to reinstall anything.
Once upon time when my first EFI board arrived I did not want to spend time learning EFI. I did partitioning for EFI, but I booted it in legacy mode. Until one day I studied EFI and set it up to boot in EFI mode. I still have this machine, when I choose EFI mode in BIOS it boots in EFI mode, when I choose CSM in BIOS it boots in legacy mode. It comes up and runs just the same. See, you are in exactly same situation. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Mon Jun 07, 2021 1:07 am Post subject: |
|
|
Jaglover,
Are you saying LILO will be happy with the EFI partitioning scheme from the HB?
(Tiny VFAT, swap and the rest is ext4)?
How will it work?
Than you. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Mon Jun 07, 2021 1:13 am Post subject: |
|
|
You have misunderstood something, there is no tiny VFAT with any configuration. In case of Grub you need a 2 MB partition which has no filesystem, Grub will write its stage files there. If you have planned and created ESP partition for your EFI boot then you can use it as /boot, just create EXT filesystem on it, there is no need for FAT if you are not using EFI boot. Lilo and Syslinux do not need this tiny extra partition, just install one of them as usual. Make sure your GPT disk has protective MBR and boot flag, otherwise [braindead] BIOS may not boot it. That's all. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Mon Jun 07, 2021 1:22 am Post subject: |
|
|
Jaglover,
I definitely misunderstood something.
According to HB, Amd64 , 3 partitions were made.
1 for the size of 256M which I put VFAT on according to HB
2. swap partition
3. root partition.
The VFAT portion is explained here.
Did I do something wrong?
Thank you. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1548 Location: South America
|
Posted: Mon Jun 07, 2021 1:34 am Post subject: |
|
|
ONEEYEMAN wrote: | According to HB, Amd64 , 3 partitions were made. |
First, any partition scheme in the Handbook is just an example. Second, the title of that section is "Partitioning the disk with GPT for UEFI". It is not clear if that Dell Inspiron 1545 does have UEFI support, or not. That section applies if the computer supports UEFI and you are going to boot in UEFI mode. Being an 11 year old computer, it might not have UEFI support, in which case, you have to do a BIOS (MBR) installation, and that section is not applicable.
You can boot in BIOS mode with a GPT, if the firmware is not quirky. But if you are going to use GRUB you need a special partition for it, which you might create by repurposing an existing partition. For example, the one that was going to be the ESP. Syslinux also needs special arrangements to boot from a disk with a GPT, BTW.
So... have you determined if that Dell supports UEFI?
Last edited by GDH-gentoo on Mon Jun 07, 2021 1:49 am; edited 4 times in total |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Mon Jun 07, 2021 1:36 am Post subject: |
|
|
Jaglover,
K, this is definitely good.
Quote: |
Make sure your GPT disk has protective MBR and boot flag
|
I didn't set the boot flag when creating partition, because both scheme in HB didn't mention it.
I was actually curious about that but decided not to bother asking.
But I don't know what "protective MBR" is.
Can you shed some light?
Thank you.
P.S.: Sorry forgot to ask - I presume I should recompile kernel and turn off EFI required options?
Last edited by ONEEYEMAN on Mon Jun 07, 2021 1:41 am; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Mon Jun 07, 2021 1:41 am Post subject: |
|
|
Code: | # gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.7
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
|
gdisk can display info and create this protective MBR for you, other disk tools can do it, too, like parted. Above is the example of my boot drive. All disk tools can also set the boot flag. You need to use expert mode with gdisk to accomplish this, it is not destructive, all your partitions will stay intact.
No need to rebuild kernel, EFI options won't prevent booting in legacy mode. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Mon Jun 07, 2021 12:23 pm Post subject: |
|
|
Jaglover,
I'm using frisk.
Do you know how to make it there?
Thank you. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1548 Location: South America
|
Posted: Mon Jun 07, 2021 9:08 pm Post subject: |
|
|
fdisk's user interface is self-explanatory, type m for help.
p prints information about the GPT.
M and then p prints information about the protective MBR. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3612
|
Posted: Wed Jun 23, 2021 5:35 am Post subject: |
|
|
Hi, guys,
Sorry for the delay.
I was away from that laptop for family issues.
Now that I'm back here is the output of fdisk (after pressing M and p):
Code: |
Device Boot Start End Sectors Size Id Type
/dev/sda1 1 976773167 976773167 465.8G ee GPT
Partition 1 does not start physical sector boundary
Command (m for help):
|
What should I do?
Will using gparted help?
Thank you. |
|
Back to top |
|
|
|