Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Gentoo won't boot after successful GRUB install

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
70 posts
  • 1
  • 2
  • 3
  • Next
Author
Message
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

Gentoo won't boot after successful GRUB install

  • Quote

Post by greek » Mon Jan 04, 2021 3:29 pm

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
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 3:44 pm

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
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 5:07 pm

Hello, Peter, thanks for responding so quickly!
- 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.
- 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.
- Do you use (U)EFI ?
Yes, I do.
- 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.
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 5:37 pm

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?
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 5:52 pm

Hi, Buffoon.

The grub-install command was right on the amd64 handbook;
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:A ... Bootloader

Kind regards,
Greek.
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 6:03 pm

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?
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 6:04 pm

Yes, I was booted in EFI mode, checked if the efi directory existed, it did.
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 6:13 pm

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?
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 6:18 pm

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?
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 6:21 pm

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.
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 6:32 pm

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?
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Mon Jan 04, 2021 6:36 pm

What does running efibootmgr say? Use the code tags, i.e.

Code: Select all

 # 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
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 6:54 pm

greek wrote:
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.
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 7:02 pm

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: Select all

 # 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: Select all

 2      xxxxkB  xxxxMB  xxxxMB  fat32        boot  boot, esp
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 8:12 pm

Hello, here's the output of 'efibootmgr -v'
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
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)
- What is your output from "parted /dev/sda p" ?
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
- 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.
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Mon Jan 04, 2021 8:54 pm

Code: Select all

$ 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.
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 9:37 pm

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:

Code: Select all

> set 2 boot on
and then press "p" (for print) again.
Last edited by pietinger on Mon Jan 04, 2021 9:43 pm, edited 2 times in total.
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 9:40 pm

Tony0945 wrote:Isn't the EFI supposed to be the first partition (not sure)?
No, its okay if ESP is the second partition.
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 9:50 pm

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 :-)
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 10:02 pm

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!)
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 10:20 pm

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):

Code: Select all

ls -Rl /boot/Efi/
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.
Top
nick_gentoo
Tux's lil' helper
Tux's lil' helper
Posts: 140
Joined: Mon Jan 07, 2019 7:42 pm

  • Quote

Post by nick_gentoo » Mon Jan 04, 2021 10:24 pm

Code: Select all

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?
Top
pietinger
Moderator
Moderator
Posts: 6613
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Jan 04, 2021 10:32 pm

nick_gentoo wrote:

Code: Select all

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".
Top
greek
n00b
n00b
Posts: 15
Joined: Mon Dec 14, 2020 7:27 pm

  • Quote

Post by greek » Mon Jan 04, 2021 10:50 pm

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!
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Mon Jan 04, 2021 10:52 pm

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.
Top
Post Reply

70 posts
  • 1
  • 2
  • 3
  • Next

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy