View previous topic :: View next topic |
Author |
Message |
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Wed May 12, 2021 11:29 am Post subject: Grub doesn't recognize the 5.4 kernel. |
|
|
Hi,
I just installed the 5.4 kernel as backup since im using the 5.12.2 kernel, however, when i emerge it (i emerged it multiple times now and once uninstalled, so practically i reinstalled it & then rebuilt it a few times)
it gives me this output:
Code: |
* Messages for package sys-kernel/gentoo-sources-5.4.109:
* Note: Even though you have successfully unmerged
* your kernel package, directories in kernel source location:
* /usr/src/linux-5.4.109-gentoo
* with modified files will remain behind. By design, package managers
* will not remove these modified files and the directories they reside in.
* For more detailed kernel removal instructions, please see:
* https://wiki.gentoo.org/wiki/Kernel/Removal
|
So, I just ignored that.
Then I did grub-mkconfig -o /boot/grub/grub.cfg
Then I saw that grub doesn't detect it at all?
What could be the cause?
Cheers! _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Wed May 12, 2021 12:12 pm Post subject: |
|
|
fullbyte,
/boot is not mounted
The new kernel is buried in Grubs menu somewhere.
The new kernel name is not recognised by grub-mkconfig as being a kernel file.
Something else entirely. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Wed May 12, 2021 12:42 pm Post subject: |
|
|
NeddySeagoon wrote: | fullbyte,
/boot is not mounted
The new kernel is buried in Grubs menu somewhere.
The new kernel name is not recognised by grub-mkconfig as being a kernel file.
Something else entirely. |
This helped a bit.
Cheers! _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Wed May 12, 2021 12:53 pm Post subject: |
|
|
fullbyte,
Tell us what you find, it will help others. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Wed May 12, 2021 12:58 pm Post subject: |
|
|
NeddySeagoon wrote: | fullbyte,
Tell us what you find, it will help others. |
So, I had to rebuild the kernel basically via
Code: |
sudo make -j20 && sudo make modules_install && sudo emerge @module-rebuild && sudo make install && grub-mkconfig -o /boot/grub/grub.cfg
|
(editing something random before that to make it)
That somehow made grub detect it? _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
Ralphred Guru
Joined: 31 Dec 2013 Posts: 495
|
Posted: Wed May 12, 2021 2:09 pm Post subject: |
|
|
fullbyte wrote: | Code: | ~snip~ && grub-mkconfig -o /boot/grub/grub.cfg |
|
Just a quick note about that.
I don't have any modules so am happy to just run Code: | host /usr/src/linux # make -j12 && make install | but allowing grub-mkconfig to just overwrite your existing config without checking it detected everything first, too trusting.
I always Code: | grub-mkconfig >/dev/null | first just to check it's detected everything, then Code: | grub-mkconfig > /boot/grub/grub.cfg-x.y.z | where x.y.z is the kernel version you just built. You don't need this now, but if grub-mkconfig starts producing .cfg files that don't work in the future, you have a reference.
Now sanity check the /boot/grub/grub.cfg-x.y.z file for UUID/PARTUUID etc. If it's OK then Code: | grub-mkconfig > /boot/grub/grub.cfg | and check it boots.
Admittedly keeping grub.cfg-x.y.z files is a bit OTT, but the primary >/dev/null saved me from installing a .cfg that completely ignored my windows install on another drive just yesterday. |
|
Back to top |
|
|
mustafasalih1993 n00b
Joined: 09 Feb 2021 Posts: 38
|
Posted: Wed May 12, 2021 2:18 pm Post subject: |
|
|
Hello fullbyte
you don't have rebuild your kernel if you already did before,
after you mounted your /boot as Neddy commented, you just need to cd into the kernel directory again and do only a `make install`
this command will not rebuild your kernel it will copy the kernel executable to your $(INSTALL_PATH) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54220 Location: 56N 3W
|
Posted: Wed May 12, 2021 7:21 pm Post subject: |
|
|
fullbyte,
Start with to force a rebuild. That removes all the binary files in the kernel tree but leaves the .config alone.
If thats not clean enough, there is That removes more, including the .config. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
hjkl Apprentice
Joined: 22 Apr 2021 Posts: 198 Location: Somewhere in Europe
|
Posted: Thu May 13, 2021 4:23 pm Post subject: |
|
|
NeddySeagoon wrote: | fullbyte,
Start with to force a rebuild. That removes all the binary files in the kernel tree but leaves the .config alone.
If thats not clean enough, there is That removes more, including the .config. |
Will do next time! Cheers
Sorry about the late reply. _________________ Having problems compiling since 2021 |
|
Back to top |
|
|
|