Forums

Skip to content

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

booting aborts when grub should kick in

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
11 posts • Page 1 of 1
Author
Message
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

booting aborts when grub should kick in

  • Quote

Post by jody » Wed Mar 13, 2024 8:46 am

After an emerge of @world i changed some options in /etc/default/grub:

Code: Select all

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Then i did sudo grub-mkconfig -o /boot/grub/grub.cfg, followed by a restart.

After the ASUS Bios splash screen, I caught a short flash of something that might be the grub menu, but in this instant the computer restarted. This time after the splash screen, I ended up inside the BIOS settings.

I suspected i must have somehow messed up the grub configuration so i booted with a LiveCD USB stick, mounted the root partition and the boot partition, as well as /proc/, /sys, /dev, and /run (as specified in the gentoo handbook). Then chrooted to the mounted root, undid my changes to /etc/default/grub and ran
sudo grub-mkconfig -o /boot/grub/grub.cfg
again. But after rebooting i got showed the same behaviour: booting up until shortly before grub should kick in, then sudden restart, and finally ending up in the BIOS settings.

How should i proceed to get my system running again?
(i would prefer a solution which doesn't include a complete a complete & fresh installation of gentoo, because i got a lot of data on my root partition)
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Wed Mar 13, 2024 9:30 am

Context please.

Did you upgraded grub, rebuild grub only, emerge only other packages?

Upgrade requires more that an grub-mkconfig

MBR, UEFI?

Never had problem because of

Code: Select all

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Maybe I've been lucky...

NeddySeagoon would say gentoo mostly never requires reinstall instead of fixes, I guess.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Wed Mar 13, 2024 10:23 am

I did not explicitly upgrade grub, i only ran emerge --update--newuse --deep @world.
I don't know if this pulled in a new version of grub, but it cerainly uipdated some other packages.

I have UEFI.

It is, however possible that i didn't have /boot mounted when i first ran the grub-mkconfig.
But the second time (when booted from USB) i had /boot mounted.
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Wed Mar 13, 2024 10:32 am

Code: Select all

qlop -v grub
should list about grub rebuilds.

Not having efi partition mounted should output complains.

Very uncomfy about that one: grub install from install/liveCD may no be so straight forward.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Mar 13, 2024 2:29 pm

jody,

please chroot into your Gentoo system (*) and re-install grub (and do again a grub-mkconfig afterwards). You have the same problem I already explained here: viewtopic-p-8818652.html#8818652

*) How to chroot into your Gentoo system again is explained here:
https://wiki.gentoo.org/wiki/User:Pieti ... stallation
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Wed Mar 20, 2024 9:55 am

Hi Pietinger
Thank you for your reply.

I guess my system is even more messed up than i thought.

Code: Select all

 # grub-install --target=x86_64_efi --efi-directory=/boot /dev/sda
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.
(Probably unrelated, but my setup is such that i have an EFI subdirectory directory on /dev/sda1, and i simply do a mount /dev/sda1 /boot (this used to work until now))

But i also tried

Code: Select all

mount /dev/sda1 /boot/efi
but this, too, doesn't work:

Code: Select all

grub-install --target=x86_64_efi --efi-directory=/boot/efi /dev/sda
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.
I must admit the underlying problem is probably that i do not fully grasp the relationship between efi/uefi and /boot...
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Wed Mar 20, 2024 10:44 am

I just found out that the /sys directory on my disk does not contain a firmware/efi subdirectory -
there are only the acpi, di and memmap subdirectories.
This is obviously the reason for the error message cited in my previous mail.

The gentoo-install usb stick i used to boot the system also doesn't contain the /sys/firmware/efi subdirectory.
(i created the stick with rufus from install-amd64-minimal-20240317T170433Z.iso (in dd mode, not iso)).

Also, i saw on the gentoo download page that for arm they have an image for "Minimal Installation CD" marked with "EFI", whereas the one for amd does not.

Is there some other image i should use to boot my machine to get the efi subdirectory?
Or is there some way i can download that subdirectory?
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Wed Mar 20, 2024 12:38 pm

jody wrote:I just found out that the /sys directory on my disk does not contain a firmware/efi subdirectory - [...]

Is there some other image i should use to boot my machine to get the efi subdirectory?
Or is there some way i can download that subdirectory?
It appears automatically if the computer really boots in UEFI mode... Which hints at yours not doing so...
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Mar 20, 2024 1:43 pm

jody,

grub-install calls efibootmgr. efibootmgr needs to be able to access EFI variables (yes, it is /sys/firmware/efi). This is provided by efivarfs.

To get this, you must:

1. the computer must have booted in UEFI (check if you have in your BIOS CSM mode enabled; if yes you must disable CSM mode),
2. the kernel needs some options: https://wiki.gentoo.org/wiki/Efivarfs#Kernel (every kernel from our GentooCDs have it)
3. the efivarfs must be mounted: https://wiki.gentoo.org/wiki/Efibootmgr#EFI_vars (every GentooCD mount it automatically)

I recommend you to boot with our Gentoo Minimal CD and then chroot into your Gentoo:
https://wiki.gentoo.org/wiki/User:Pieti ... stallation
Of course you will mount it to /boot and not to /efi because you have an old installation. See more here: viewtopic-t-1165115-highlight-.html

Then do again your grub-install and grub-mkconfig.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Mon Mar 25, 2024 1:30 pm

In my BIOS the CSM was indeed enabled.
After disabling it, the boot process worked fine.
Thank You!
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Mar 25, 2024 3:41 pm

jody wrote:Thank You!
You are very Welcome ! :D
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Post Reply

11 posts • Page 1 of 1

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

 

 

magic