View previous topic :: View next topic |
Author |
Message |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Sun May 31, 2020 5:31 am Post subject: cannot install GRUB2 onto my computer |
|
|
I am trying to install gentoo onto my lapto, however I cannot install GRUB2 onto my computer. My computer uses uefi. When I run Code: | grub-install --target=x86_64-efi --efi-directory=/boot | it gives the following output:
Code: |
Installing for x86_64-efi platform.
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.
|
Why is this problem happening anad how do I fix it? _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47017 Location: 56N 3W
|
Posted: Sun May 31, 2020 7:41 am Post subject: |
|
|
boomerhackr,
You are not booted in EFI mode, so Code: | EFI variables are not supported on this system. |
and you are trying to install grub for an EFI boot.
Shut down, go into your BIOS and switch out of Legacy/BIOS mode.
Reboot, get back into your chroot and try again. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
APolozov Apprentice


Joined: 28 Sep 2006 Posts: 151 Location: Voronezh, Russia
|
Posted: Sun May 31, 2020 7:42 am Post subject: |
|
|
Show please a output "emerge -pv grub" _________________ Excuse my bad English, I only study it.
I also connected to: velo36.ru openstreetmap.org |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Sun May 31, 2020 9:53 pm Post subject: |
|
|
When I disabled legacy boot, my usb did not boot (I using an arch iso). _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
alamahant l33t

Joined: 23 Mar 2019 Posts: 651
|
Posted: Sun May 31, 2020 10:02 pm Post subject: |
|
|
Hi
Please use Fedora Media Writer to write the iso on your usb(if you are using linux) or rufus(if you are in windows)
Then reboot and press F2(or preferably esc) to get to the bios/uefi boot menu.
You will see many options.
There will be a normal arch iso AND an UEFI arch iso(You will see the name of the usb device)
Pick the UEFI one.
You can still retain the legacy uefi if you do that.
 |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Sun May 31, 2020 11:01 pm Post subject: |
|
|
I managed to install grub by using the uefi cd for the arch iso. Then I rebooted my computer, and gentoo shows up in the grub menu. However now my caps lock light has started blinking, and the screens shows something about a kernel panic. I don't know if this is related to grub. What is happening now? _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47017 Location: 56N 3W
|
Posted: Sun May 31, 2020 11:06 pm Post subject: |
|
|
boomerhackr,
Grub has loaded your kernel and your kernel has encountered an error that prevents it from continuing.
The will have been a plain text reason.
VFS unable to mount ... unknown-block(x,y)
Tried to kill init ...
What wan the reason for the panic? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Sun May 31, 2020 11:19 pm Post subject: |
|
|
The message:
Code: | VFS: cannot open root device "mmcblk0p2" or unknown-block(0,0) |
_________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
pietinger Guru

Joined: 17 Oct 2006 Posts: 508 Location: Bavaria
|
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Mon Jun 01, 2020 1:48 am Post subject: |
|
|
I read the thread that you linked to, and I tried using the partuuid instead of the /dev/sdx, but it still does not boot. _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7799 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Mon Jun 01, 2020 3:35 am Post subject: |
|
|
kernel config: http://dpaste.com/0HY6ASB _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7799 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
Gentobobbyuk Apprentice

Joined: 23 May 2020 Posts: 168
|
Posted: Mon Jun 01, 2020 4:58 pm Post subject: |
|
|
Not that im an expert at all but after days of playing with gruib and the commands on the genntoo forums
First of all do you no the exact hardware ?
Sometimes linux-firmware package is required
Secound of all make sure your efi directory is set correctly ?
The error pessages you are reporting are similar to whati had.
grub-install --target=x86_64-efi --efi-directory=/boot --removable
grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable (for me linux-firmware was required)
for exmaple i have to add /boot/efi for my dirtectory
also make sure when grub is installed your hardrives are mounted .
Did you select all the efi options in the kernel. |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Tue Jun 02, 2020 6:11 am Post subject: |
|
|
My laptop is hp stream. I already have the linux firmware installed. I ran both of your grub-install commands, but with /boot/EFI instead of /boot/efi, I am not sure if they have the same effect, or what you mean by the correct efi directory, so if you could explain in a little bit more detail, that would be very helpful. _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7799 Location: Saint Amant, Acadiana
|
Posted: Wed Jun 03, 2020 2:10 am Post subject: |
|
|
You had Grub working at some point, your kernel had no eMMC support and was unable to access the root filesystem, I pointed you to a thread with all information to fix it. Now you are back to square one and trying to install Grub again? What happened to it, it was working.  _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Wed Jun 03, 2020 2:42 am Post subject: |
|
|
Before all of this, grub did not work at all. My computer boots to the grub menu, but then it stops at a kernel panic because it cannot find the root partition. So I tried using the partuuid instead of the /dev/sdX format in my grub configuration file, but it still gave an error message saying it could not find the root partition. Then someone on this thread suggested reinstalling grub with /boot/efi instead (I tried using /boot/EFI because /boot/efi did not exist). My grub menu still shows up, but gentoo doesn't boot because the linux kernel cannot find the root partition. I am assuming this is a problem with my grub configuration file, but grub is still working _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7799 Location: Saint Amant, Acadiana
|
Posted: Wed Jun 03, 2020 3:06 am Post subject: |
|
|
If Grub does not work then you won't get kernel panic. Grub job is to load kernel, that's it (and optional initrd). You have to understand what is bootloader, what it does and what is kernel. I pointed you to a useful eMMC thread but you apparently ignored it. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Fri Jun 05, 2020 4:46 am Post subject: |
|
|
Oh sorry, I forgot to read that thread. Now I read it, and I tried building support for emmc (and also initramfs, which seems to be required). However It still cannot find my partition. After the kernel crashes, it gives me the option to drop into a shell, and not devices starting with mmc showed up, but it still recognized my usb, which is sd. I do not know why it still cannot find my root partition, or what else I need. _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
ian.au Guru


Joined: 07 Apr 2011 Posts: 515 Location: Australia
|
Posted: Fri Jun 05, 2020 6:31 am Post subject: |
|
|
dmesg should be available in the busybox shell. Any tips in there? |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 7799 Location: Saint Amant, Acadiana
|
Posted: Fri Jun 05, 2020 9:57 am Post subject: |
|
|
Quote: | and also initramfs, which seems to be required |
No, initramfs is not required. You are supposed to make your own decisions, to use other peoples solutions to get ideas, not follow them blindly. Initramfs is required only when a driver which is essential for boot cannot be built into kernel for some reason. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
 |
LuxJux Guru

Joined: 01 Mar 2016 Posts: 420
|
Posted: Fri Jun 05, 2020 10:45 am Post subject: |
|
|
boomerhackr wrote: | (I tried using /boot/EFI because /boot/efi did not exist). |
Wasn't the correct path /boot/EFI/efi ? _________________ Now, you can breath. After emerge always reboot |
|
Back to top |
|
 |
pietinger Guru

Joined: 17 Oct 2006 Posts: 508 Location: Bavaria
|
Posted: Fri Jun 05, 2020 12:55 pm Post subject: |
|
|
LuxJux wrote: | boomerhackr wrote: | (I tried using /boot/EFI because /boot/efi did not exist). |
Wasn't the correct path /boot/EFI/efi ? |
No. You can use what you want.
For UEFI-Boot you need a partition with FAT 32 (UEFI spec. recommended size 128 MB).
If you want to install grub, then you have to mount this partition to /boot
Then GRUB itself (=the install-routine of grub) makes a directory named "EFI" and a subdir named "gentoo". Here in is the bootable part of grub: "grubx64.efi"
(/boot/EFI/gentoo/grubx64.efi)
If you have a stub-kernel you can do what you want. You can even mount this partition to /mnt. But /boot is the standard.
In this partition you can use "efi" or "EFI" or "Efi" or ...
I have put my stub-kernel in /boot/EFI/Boot/bzImage.efi
Even this wasnt neccessary, you can copy it into /EFI direct. The only thing you have to do, is giving UEFI the correct adress with:
Code: | # efibootmgr -c -d /dev/sdX -p Y -L "SECLINUX" -l '\EFI\Boot\bzImage.efi' |
or - without - dir /Boot =>
Code: | # efibootmgr -c -d /dev/sdX -p Y -L "SECLINUX" -l '\EFI\bzImage.efi' |
|
|
Back to top |
|
 |
boomerhackr n00b

Joined: 19 May 2020 Posts: 39
|
Posted: Fri Jun 05, 2020 9:21 pm Post subject: |
|
|
I am trying to run your efibootmgr command, but it gives the error:
Code: | invalid numical value -Y |
The exact command that I am running is
Code: | efibootmgr -c -d /dev/mmcblk0p1 -p Y -L "SECLINUX" -l '\EFI\Boot\BOOTX64.EFI' |
where /dev/mmcblk0p1 is my /boot partition and my image is /boot/EFI/BOOT/BOOTX64.EFI. Are you sure this is the right command? _________________ I'd just like to interject for a moment. What you're referring to as Linux,
is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. |
|
Back to top |
|
 |
pietinger Guru

Joined: 17 Oct 2006 Posts: 508 Location: Bavaria
|
Posted: Fri Jun 05, 2020 9:38 pm Post subject: |
|
|
No, this command has a X and a Y to not use it without thinking ...
Y is the partition nr.
see also in gentoo wiki -> stub-kernel |
|
Back to top |
|
 |
|