View previous topic :: View next topic |
Author |
Message |
samidarko n00b
Joined: 10 Aug 2014 Posts: 37
|
Posted: Wed Mar 20, 2024 12:58 pm Post subject: [SOLVED] Not booting after upgrading grub |
|
|
Hi,
Yesterday I ran my updates and saw "installkernel is no longer implicitly installed" in the news => https://www.gentoo.org/support/news-items/2024-03-12-debianutils-installkernel.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 |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4333 Location: Bavaria
|
|
Back to top |
|
|
samidarko n00b
Joined: 10 Aug 2014 Posts: 37
|
Posted: Thu Mar 21, 2024 1:47 am Post subject: |
|
|
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. |
|
Back to top |
|
|
samidarko n00b
Joined: 10 Aug 2014 Posts: 37
|
Posted: Thu Mar 21, 2024 2:19 am Post subject: |
|
|
I reinstalled the grub with "grub-install --efi-directory=/boot" and now the system is booting |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4333 Location: Bavaria
|
Posted: Thu Mar 21, 2024 12:26 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1702
|
Posted: Thu Mar 21, 2024 12:49 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
samidarko n00b
Joined: 10 Aug 2014 Posts: 37
|
Posted: Mon Mar 25, 2024 9:52 am Post subject: |
|
|
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" ? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4333 Location: Bavaria
|
Posted: Mon Mar 25, 2024 3:37 pm Post subject: |
|
|
samidarko wrote: | Thanks a lot for taking the time of clarifying the situation even tho the post is solved. |
You are very Welcome !
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 ! _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
|