Forums

Skip to content

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

[SOLVED] Not booting after upgrading grub

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
8 posts • Page 1 of 1
Author
Message
samidarko
n00b
n00b
Posts: 37
Joined: Sun Aug 10, 2014 12:47 pm

[SOLVED] Not booting after upgrading grub

  • Quote

Post by samidarko » Wed Mar 20, 2024 12:58 pm

Hi,

Yesterday I ran my updates and saw "installkernel is no longer implicitly installed" in the news => https://www.gentoo.org/support/news-ite ... ernel.html

Like I compile my kernel, after I finished my update and ran "emerge --depclean", I saw installkernel was going to be removed I did "emerge --noreplace sys-kernel/installkernel" then ran "emerge --depclean".

Following this, I compiled the kernel that was coming with the update. I'm using some scripts so I did exactly the same way I usually do.

Since then, when I want to boot, I see "Welcome to Grub" then I have a black screen for a couple of seconds, then reboot and at the next start I'm going straight to UEFI.

I've been able to boot from USB stick and chroot in my system. I deleted the last kernel and compiled it again but I still have the same issue.

When I ran genkernel I noticed: Current kernel's LOCALVERSION is set to "; Will ignore set --kernel-localversion value '-x86_64' because kernel was not built

Thanks for your help
Last edited by samidarko on Mon Mar 25, 2024 9:50 am, edited 2 times in total.
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

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

samidarko,

this doesnt look like a problem with installkernel; moreover it sounds you have updated grub and NOT re-installed it (we have some threads about :lol: )

Please chroot into your Gentoo system (*) and re-install grub (and do again a grub-mkconfig afterwards). You might 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
samidarko
n00b
n00b
Posts: 37
Joined: Sun Aug 10, 2014 12:47 pm

  • Quote

Post by samidarko » Thu Mar 21, 2024 1:47 am

pietinger,

Yes, you're right, this is probably not an installkernel issue. Since my previous post I did:

I chrooted a couple of times and the first thing I tried was to update grub with grub-mkconfig.

- Reinstalled, installkernel and added the "dracut" use and now installkernel USE includes "dracut" and "grub"
- I removed from my kernel install script the genkernel command to create initramfs and the grub-mkconfig command
- I deleted the grub.cfg file and all the kernel files (currently using gentoo-sources 6.6.21)
- I ran a "make clean" and compile again of my kernel. As a result, I could find my 3 kernel files including the initramfs and grub.cfg. I can deduce that installkernel with "dracut" and "grub" use is working correctly
- I rebooted and I still have the same issue.

I had a look to "dmesg" and Xorg.0.log and I saw an nvidia error like "no devices were found".

So I tried to downgrade to my previous kernel and my previous nvidia driver version but unfortunately I still have the same problem.

What's really confusing me, due to my lack of knowledge of how grub is working, is to get an nvidia error just after the "Welcome to grub". I always thought the nvidia driver was loaded with the kernel itself and that grub was using a more basic driver to display the kernel selection menu. Maybe this is the case and that's the one which is failing?

Let me know if there is a better topic than "Installing Gentoo" for this post and I'll move or recreate it.

In the mean time, I'll keep investigating. Thanks for the pointers.
Top
samidarko
n00b
n00b
Posts: 37
Joined: Sun Aug 10, 2014 12:47 pm

  • Quote

Post by samidarko » Thu Mar 21, 2024 2:19 am

I reinstalled the grub with "grub-install --efi-directory=/boot" and now the system is booting
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Thu Mar 21, 2024 12:26 pm

samidarko wrote:What's really confusing me, due to my lack of knowledge of how grub is working, is to get an nvidia error just after the "Welcome to grub". I always thought the nvidia driver was loaded with the kernel itself and that grub was using a more basic driver to display the kernel selection menu. Maybe this is the case and that's the one which is failing?
Yes, you are right, the nvidia modules are kernel modules; grub doesn't use it.

Grub hast two parts: The first one is grubx64.efi residing in your ESP (efi system partition). This part of grub loads the second part residing in /boot/grub (where you find also the config from grub).

Now what happened in your system ? You made an update to world (with a new grub) and an update to your kernel (this is unrelated to the problem). But because of your kernel update you did also a grub-mkconfig - from the "new" grub coming from world-update. This grub-mkconfig created a configuration file which is NOT understandable for the "old" grub and therefore the exisiting ("old") grub was not able to proceed.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
grknight
Retired Dev
Retired Dev
Posts: 2564
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Thu Mar 21, 2024 12:49 pm

pietinger wrote:Now what happened in your system ? You made an update to world (with a new grub) and an update to your kernel (this is unrelated to the problem). But because of your kernel update you did also a grub-mkconfig - from the "new" grub coming from world-update. This grub-mkconfig created a configuration file which is NOT understandable for the "old" grub and therefore the exisiting ("old") grub was not able to proceed.
To be specific, it is a new /etc/grub.d/25_bli file and changes to /etc/grub.d/30_uefi-firmware that may create situations where a grub-mkconfig produces an incompatible config with older grubx64.efi. An alternate solution is chmod -x on those files for grub-mkconfig (or flat out delete them) or just edit out those (commented) sections from the grub.cfg file itself as workarounds.
Top
samidarko
n00b
n00b
Posts: 37
Joined: Sun Aug 10, 2014 12:47 pm

  • Quote

Post by samidarko » Mon Mar 25, 2024 9:52 am

Thanks a lot for taking the time of clarifying the situation even tho the post is solved.

I have edited the title to make it more accurate with regards to the issue.

For me and for further readers, was there a way to anticipate the situation or is it just an empiric knowledge where the users should just be careful when upgrading grub?

Also, was there a better topic for this question than "Installing Gentoo" ?
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

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

samidarko wrote:Thanks a lot for taking the time of clarifying the situation even tho the post is solved.
You are very Welcome ! :D
samidarko wrote:For me and for further readers, was there a way to anticipate the situation or is it just an empiric knowledge where the users should just be careful when upgrading grub?
Our developers have written a special message for this time: 2024-02-01-grub-upgrades. But I don't know whether this will still be the case if this situation arises again.

I see two possibilities to deal with an update of grub: 1. just always do the install, or 2. boot after a grub-mkconfig and see the result; and only then do the grub-install if necessary.

Have fun with Gentoo ! 8)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Post Reply

8 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