View previous topic :: View next topic |
Author |
Message |
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 3:29 pm Post subject: Gentoo won't boot after successful GRUB install |
|
|
Hello,
I'm new to this amazing linux distribution, and I'm off to my fifth attempt on trying to install gentoo.
I followed the handbook step-by-step, installed GRUB2 and it reported no errors.
I'm curious at why it doesn't work. I'll be happy to provide logs or whatever is needed.
Kind regards,
Greek |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 3:44 pm Post subject: |
|
|
Hello greek,
welcome to the Gentoo forum !
An exact description of your problem is half the way to solve it
greek wrote: | I'll be happy to provide logs or whatever is needed. |
Before sending us any logs tell us which was your last step installing gentoo and what you did before and:
- Do you have an error or just a black screen ?
- What is your machine you want to install Gentoo ?
- Do you use (U)EFI ?
- What do you want install (systemd / OpenRC) ?
You can read this german installation guide - translate it with google translator to your language (greek?): https://forums.gentoo.org/viewtopic-t-1112798.html
as an inspirition for sending us an explanation where you are stranded.
Greetings,
Peter |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 5:07 pm Post subject: |
|
|
Hello, Peter, thanks for responding so quickly!
Quote: | - Do you have an error or just a black screen ? |
When I reboot to log-in to my new system, it just brings me to my BIOS configuration screen.
Quote: | - What is your machine you want to install Gentoo ? |
It's a computer with the following parts; MSI B450M-A PRO, Intel Core i3 10100 processor, 8GB RAM.
Quote: | - Do you use (U)EFI ? |
Yes, I do.
Quote: | - What do you want install (systemd / OpenRC) ? |
I want to install OpenRC, because I do not like systemd.
The last thing I did on the install was doing the grub-mkconfig -o command, then exiting chroot, cd-ing, unmount the partitions and... rebooting.
Kind regards,
Greek. |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 5:37 pm Post subject: |
|
|
Quote: | When I reboot to log-in to my new system, it just brings me to my BIOS configuration screen. |
This means no UEFI compatible boot image is found. I do not use Grub myself, but this grub install command of yours looks suspicious to me, what guide did you follow? |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 5:52 pm Post subject: |
|
|
Hi, Buffoon.
The grub-install command was right on the amd64 handbook;
Quote: | Install
Next, install the necessary GRUB2 files to the /boot/grub/ directory via the grub-install command. Presuming the first disk (the one where the system boots from) is /dev/sda, one of the following commands will do:
When using BIOS:
root #grub-install /dev/sda
When using UEFI:
Important
Make sure the EFI system partition has been mounted before running grub-install. It is possible for grub-install to install the GRUB EFI file (grubx64.efi) into the wrong directory without providing any indication the wrong directory was used.
root #grub-install --target=x86_64-efi --efi-directory=/boot |
Full page is here
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
Kind regards,
Greek. |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 6:03 pm Post subject: |
|
|
OK, just to make sure we are not missing anything, you were booted in EFI mode when you issued this install command and you did not get any errors? |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 6:04 pm Post subject: |
|
|
Yes, I was booted in EFI mode, checked if the efi directory existed, it did. |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 6:13 pm Post subject: |
|
|
Well, I still have impression your motherboard UEFI firmware does not find your grub image. You did format your ESP partition in FAT and set the partition type to EFI System? |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 6:18 pm Post subject: |
|
|
Quote: | Well, I still have impression your motherboard UEFI firmware does not find your grub image. You did format your ESP partition in FAT and set the partition type to EFI System? |
Yeah, I did, but it is not in FAT32, but rather in FAT16. Do you think that might be the problem? |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 6:21 pm Post subject: |
|
|
FAT16 is OK. If you mount your ESP partition, what is the full path to the grub EFI image? This path is part of EFI specification and is important. |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 6:32 pm Post subject: |
|
|
Quote: | FAT16 is OK. If you mount your ESP partition, what is the full path to the grub EFI image? This path is part of EFI specification and is important. |
Where would I find the path? In the grub config? |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Jan 04, 2021 6:36 pm Post subject: |
|
|
What does running efibootmgr say? Use the code tags, i.e. Code: | # efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0007,0000,0008,0009,0002,0001
Boot0000* rEFInd Boot Manager
Boot0001 Hard Drive
Boot0002 CD/DVD Drive
Boot0007* UEFI OS
Boot0008 UEFI: PXE IP4 Realtek PCIe GBE Family Controller
Boot0009 UEFI: PXE IP6 Realtek PCIe GBE Family Controller
|
|
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 6:54 pm Post subject: |
|
|
greek wrote: | Quote: | FAT16 is OK. If you mount your ESP partition, what is the full path to the grub EFI image? This path is part of EFI specification and is important. |
Where would I find the path? In the grub config? |
The actual path to the image. According to EFI specs the firmware must find EFI/boot/bootx64.efi without user intervention. If your [temporary] mount point is /boot/ then the path should be /boot/EFI/boot/bootx64.efi. This path can be different, but then you (or grub-install) must execute efibootmgr to store it in NVRAM. Tony0945 question addresses this. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 7:02 pm Post subject: |
|
|
Greek,
please give us the output of "efibootmgr -v". Here is an example of mine. "gentoo" was added from the installation of grub2 (the other two entries I did myself (see B.2 and C.3)).
Code: | # efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0002,0000
Boot0000* gentoo HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\gentoo\grubx64.efi)
Boot0001* DIRECT HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\Boot\bzImage.efi)
Boot0002* UNLOCKED HD(2,GPT,e6cccc9a-40e0-4b59-b6d2-082596500077,0x1800,0x1fe800)/File(\EFI\unlocked\bzImage.efi) |
And let us know how you did your ESP. Why Fat16 ? And how big ?
P.S.
- What is your output from "parted /dev/sda p" ?
- Did you set "boot on" to your ESP to get the ESP-flag ? It should look like this:
Code: | 2 xxxxkB xxxxMB xxxxMB fat32 boot boot, esp |
|
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 8:12 pm Post subject: |
|
|
Hello, here's the output of 'efibootmgr -v'
Quote: | BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,0001
Boot0000* gentoo HD(2,GPT,b055a88d-2bc3-4b72-8728-72c54e5e4e09,0x1800,0x40000)/File(\Efi\gentoo\grubx64.efi)
Boot0001* UEFI: TOSHIBA TransMemory 1.00 PciRoot(0x0)/Pci(ox14,0x0)/USB(6,0)/CDROM(1,0xc0,0xcc30). . BO |
Quote: | And let us know how you did your ESP. Why Fat16 ? And how big ? |
I've fixed that by just reinstalling again. GRUB installed without errors again, but I do not dare to reboot (i'm still on the livecd, all steps done except umounting)
Quote: | - What is your output from "parted /dev/sda p" ? |
Quote: | Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sda:120GB
Sector size (logical/physical): 512B/512B
Partition table: gpt
Disk flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB grub bios_grub
2 3146kB 137MB 134MB fat32 boot
3 137MB 4432MB 4295MB linux swap(v1) swap
4 4432MB 120GB 116GB ext4 rootfs
|
Quote: | - Did you set "boot on" to your ESP to get the ESP-flag ? |
I did set up the flag, yes
Sorry for the delay on responding, was busy with some personal stuff!
Kind regards,
Greek. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Jan 04, 2021 8:54 pm Post subject: |
|
|
Code: | $ sudo parted /dev/sda p
Model: ATA CT500MX500SSD1 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI System boot, esp
2 106MB 500GB 500GB ext4 Linux filesystem
|
Isn't the EFI supposed to be the first partition (not sure)?
Also I'm not seeing the boot and esp flags on your fat32 partition. Only the boot flag. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 9:37 pm Post subject: |
|
|
greek wrote: | I've fixed that by just reinstalling again. GRUB installed without errors again, but I do not dare to reboot (i'm still on the livecd, all steps done except umounting) |
I miss the ESP of your 2. Partition. Go again in "parted /dev/sda" and type in:
and then press "p" (for print) again.
Last edited by pietinger on Mon Jan 04, 2021 9:43 pm; edited 2 times in total |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 9:40 pm Post subject: |
|
|
Tony0945 wrote: | Isn't the EFI supposed to be the first partition (not sure)? |
No, its okay if ESP is the second partition. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 9:50 pm Post subject: |
|
|
greek wrote: | Sorry for the delay on responding, was busy with some personal stuff! |
This is pretty ok - its a forum and not a chat !
And we also are not always online |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 10:02 pm Post subject: |
|
|
Hello, Peter.
I've already done that. Now it displays the 'boot, esp' flags. Rebooted after, still popped onto my BIOS menu...
Could the problem be the ISO? I honestly think the only option I have left is to try a BIOS/MBR install to see if the ISO is the problem...
P.D: Is this how a first-timer usually goes? If so, I'll totally stick to this distro (if I get it to install LOL!) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 10:20 pm Post subject: |
|
|
greek wrote: | Now it displays the 'boot, esp' flags. |
This is better. The first step.
greek wrote: | Could the problem be the ISO? I honestly think the only option I have left is to try a BIOS/MBR install to see if the ISO is the problem... |
No, its not a problem with your boot-image on your CD. Dont try an old MBR installation. Better to find out why your BIOS dont find GRUB2.
Boot with your install-CD again and mount all partitions you need (described in the first steps of th AMD64 installation handbook). Then give us the output of (its not the number "one" - it is the letter "L" in small):
and
"lsblk" and "blkid"
greek wrote: | P.D: Is this how a first-timer usually goes? If so, I'll totally stick to this distro (if I get it to install LOL!) |
No - sometimes some people are only a little bit unlucky. |
|
Back to top |
|
|
nick_gentoo Tux's lil' helper
Joined: 07 Jan 2019 Posts: 140
|
Posted: Mon Jan 04, 2021 10:24 pm Post subject: |
|
|
Code: | BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,0001
Boot0000* gentoo HD(2,GPT,b055a88d-2bc3-4b72-8728-72c54e5e4e09,0x1800,0x40000)/File(\Efi\gentoo\grubx64.efi)
Boot0001* UEFI: TOSHIBA TransMemory 1.00 PciRoot(0x0)/Pci(ox14,0x0)/USB(6,0)/CDROM(1,0xc0,0xcc30). . BO |
Also, one more idea: greek, what options do you see in that BIOS menu?
I think the efibootmgr output shows that the default boot option is from an USB drive (BootCurrent: 0001). Can you select another option within the BIOS menu? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4236 Location: Bavaria
|
Posted: Mon Jan 04, 2021 10:32 pm Post subject: |
|
|
nick_gentoo wrote: | Code: | BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0000,0001
Boot0000* gentoo HD(2,GPT,b055a88d-2bc3-4b72-8728-72c54e5e4e09,0x1800,0x40000)/File(\Efi\gentoo\grubx64.efi)
Boot0001* UEFI: TOSHIBA TransMemory 1.00 PciRoot(0x0)/Pci(ox14,0x0)/USB(6,0)/CDROM(1,0xc0,0xcc30). . BO |
Also, one more idea: greek, what options do you see in that BIOS menu?
I think the efibootmgr output shows that the default boot option is from an USB drive (BootCurrent: 0001). Can you select another option within the BIOS menu? |
Nick, this is normal when booting from a CD. If he pulls out the CD and do a reboot, the UEFI (=BIOS) checks there is no CD adn change automatically to "Boot0000".
I suppose the entry he has in the UEFI will not fit to the actual PARTUUID of his second partition. Therefore I need "blkid" to check this with the output from "efibootmgr -v". |
|
Back to top |
|
|
greek n00b
Joined: 14 Dec 2020 Posts: 15
|
Posted: Mon Jan 04, 2021 10:50 pm Post subject: |
|
|
Hello,
I already have as the first boot device my hard drive in the BIOS.
As to setting up the partitions and sending the results, I will do that tomorrow.
Thank you all for trying to help me! |
|
Back to top |
|
|
Buffoon Veteran
Joined: 17 Jun 2015 Posts: 1369 Location: EU or US
|
Posted: Mon Jan 04, 2021 10:52 pm Post subject: |
|
|
I do not want to confuse greek here, but my idea was to copy grub EFI executable into EFI spec location and rename it bootx64.efi. In this case UEFI firmware should boot it even when variable is not set with efibootmgr, one thing less that can go wrong. If there still is no boot then it is quite clear something is wrong with that motherboard firmware setup. |
|
Back to top |
|
|
|