Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot install GRUB2 onto my computer
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Sun May 31, 2020 5:31 am    Post subject: cannot install GRUB2 onto my computer Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46066
Location: 56N 3W

PostPosted: Sun May 31, 2020 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message
APolozov
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2006
Posts: 149
Location: Voronezh, Russia

PostPosted: Sun May 31, 2020 7:42 am    Post subject: Reply with quote

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
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Sun May 31, 2020 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 491

PostPosted: Sun May 31, 2020 10:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Sun May 31, 2020 11:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46066
Location: 56N 3W

PostPosted: Sun May 31, 2020 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Sun May 31, 2020 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
pietinger
Guru
Guru


Joined: 17 Oct 2006
Posts: 311
Location: Bavaria

PostPosted: Mon Jun 01, 2020 12:37 am    Post subject: Reply with quote

Your kernel doesnt find your root partition. Probably GRUB gives a wrong "root=..." parameter to your kernel.

You have three ways to correct this. Please read the last posts of this thread: https://forums.gentoo.org/viewtopic-t-1111788-highlight-.html
Back to top
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Mon Jun 01, 2020 1:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Mon Jun 01, 2020 2:18 am    Post subject: Reply with quote

Please post your kernel config [using wgetpaste].
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Mon Jun 01, 2020 3:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Mon Jun 01, 2020 12:08 pm    Post subject: Reply with quote

There are a few threads about eMMC here, one is here https://forums.gentoo.org/viewtopic-t-1093278-start-0.html
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Gentobobbyuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2020
Posts: 142

PostPosted: Mon Jun 01, 2020 4:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Tue Jun 02, 2020 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 03, 2020 2:10 am    Post subject: Reply with quote

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. :?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Wed Jun 03, 2020 2:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 03, 2020 3:06 am    Post subject: Reply with quote

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.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Fri Jun 05, 2020 4:46 am    Post subject: Reply with quote

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
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 508
Location: Australia

PostPosted: Fri Jun 05, 2020 6:31 am    Post subject: Reply with quote

dmesg should be available in the busybox shell. Any tips in there?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Fri Jun 05, 2020 9:57 am    Post subject: Reply with quote

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.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LuxJux
Guru
Guru


Joined: 01 Mar 2016
Posts: 419

PostPosted: Fri Jun 05, 2020 10:45 am    Post subject: Reply with quote

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
View user's profile Send private message
pietinger
Guru
Guru


Joined: 17 Oct 2006
Posts: 311
Location: Bavaria

PostPosted: Fri Jun 05, 2020 12:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
boomerhackr
n00b
n00b


Joined: 19 May 2020
Posts: 39

PostPosted: Fri Jun 05, 2020 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
pietinger
Guru
Guru


Joined: 17 Oct 2006
Posts: 311
Location: Bavaria

PostPosted: Fri Jun 05, 2020 9:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum