SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
... but at start up, the dmesg includes a statement that 4.19.58 is running. I confirm with this:
Quote:
bash-5.0# uname -a
Linux computer 4.19.58 #1 SMP Wed Jul 10 14:01:16 CDT 2019 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
So, while 4.19.75 is installed, it seems I'm actually running 4.19.58? I'm trying to figure out how I get to running ~.75 and I searched the forum. I found this. I also came across something in SlackDocs or the slackpkg manual that said I should blacklist any kernel packages, so I did.
Anyway, I guess I need to use
Code:
upgradepkg kernel-*-4.19.75-x86_64-1
for each relevant package? Then I need to run
Code:
grub-mkconfig -o /boot/grub/grub.cfg
again to make sure I get the new kernel as an option to boot? Or will that just make the new kernel the only option to boot? I'm still not clear on how to customize GRUB2 exactly. I currently have Slackware 14.2+, Advanced Slackware boot options, and Windows bootloader as menu options when the computer boots and I don't know how I add another menu item to have multiple kernels to boot from, in case the new kernel doesn't like something on my computer.
When I
Code:
less /boot/grub/grub.cfg
, there is a section in there for 4.4.14 and that's not an option in the GRUB2 menu at boot. I bring that up, because the presence of the old kernel in grub.cfg and not on the GRUB2 boot menu makes me think that the boot menu only allows one kernel visible at a time. I don't want the old kernel, just using that to make my point about what shows in the boot menu.
It just occurs to me: maybe I just need to run grub-mkconfig... now, without bothering with the upgradepkg? Then GRUB2 will recognize and boot from the new kernel? I'm still not sure how I can have multiple kernels in the boot menu, if there is a problem with the new kernel for some reason.
Last edited by deretsigernu; 10-03-2019 at 11:53 AM.
Reason: slackbooks to SlackDocs
There's a good practice to not upgrade straight forward a working kernel and install along the new one. Until next upgrade.
Your grub thing might have a few origins :
What is the name of the section might not be the name of the kernel.
The way grub is told to boot can be : this or that number of the list or last booted one
Anyway, the grub-mkconfig command should list all available kernels.
IIRC, you'll have to take a look at /etc/default/grub to see how /boot/grub/grub.cfg will be built.
I agree with @Tonus. This is boot loader issue. Show us
Code:
$ ls -l /boot
and
Code:
ls -l /lib/modules
kernel modules must be the same as running kernel. You can have multiple different kernels. Myself I am using lilo. I can't help with proper grub setup.
@Tonus
The suggestion to run grub-mkconfig might work? I don't know if it will commit me to making a choice between kernels? I don't know the script well. I'll look at the man/help.
bash-5.0$ ls -l /lib/modules
total 8
drwxr-xr-x 3 root root 4096 Aug 9 03:29 4.19.58
drwxr-xr-x 3 root root 4096 Sep 30 08:52 4.19.75
Since you state it's a boot loader issue, it seems my second hunch in prior post might have been right: I have to jump to running
Quote:
grub-mkconfig...
and not deal with the "updatepkg kernel.*" step to get the new kernel in place. I understand the caution that you and Tonus are giving and I agree. It's not a good idea to just run a new kernel without knowing how the system will react to it. I don't want to do that exactly. I want the GRUB2 boot menu to list both kernels, the one I'm currently using that I know works (~.58) and the new one (~.75). This way I can reboot, select the new kernel, make sure everything works with it and then use that. And if ~.75 doesn't work, I can force a shut-down and restart and go back to ~.58 and wait for a newer kernel and/or solve the problem in ~.75.
Unrelated: I see your location as Wroclaw. An old friend of mine lives there. I visited a few years back and really enjoyed Poland. I think that "thank you" is proscze? ... Maybe that's "please" ... dzen kuyue?
I've been using slackroll instead of slackpkg to track -current. slackroll has specific commands for upgrading the kernel (kernel-upgrade, which just installs the new kernel, and kernel-clean, which uninstalls the old kernel). You'd run kernel-upgrade, create a new initrd followed by whatever you need to do to update your bootloader, and then reboot. If the new kernel works, run kernel-clean.
@Tonus
The suggestion to run grub-mkconfig might work? I don't know if it will commit me to making a choice between kernels? I don't know the script well. I'll look at the man/help.
Without the output option, result is to stdout.
If you redirect to a dummy file, it still will show the kernel available.
Now at boot, the GRUB2 menu looks the same, but the default option is for the new kernel, 4.19.75. If I select "Advanced Options", the 2nd menu item, I get a list of all the possible kernels there. I was hoping that I could have that list on the main menu. I need to learn more about customizing the GRUB2 boot menu.
I don't know much about grub2. But I can see a few possibilities here. First I'm assuming you rebooted after updating your kernel? Perhaps it is trite to say but a reboot is required after a kernel update for it to take effect.
Secondly, I'm going to assume you're using GPT (UEFI) as opposed to legacy MBR booting.
I'm using elilo with GPT as I have for a few years now, and in my experience the kernel image ("vmlinuz") is copied as opposed to linked to /boot/efi/EFI/Slackware (or what have you). So it could be that an old version of the kernel is still lying around in /boot/efi and that is what is actually being booted. I would try running md5sum on the kerbel image sitting in /boot/efi against the vmlinuz file you're expecting to boot from /boot and see if they match.
Now at boot, the GRUB2 menu looks the same, but the default option is for the new kernel, 4.19.75. If I select "Advanced Options", the 2nd menu item, I get a list of all the possible kernels there. I was hoping that I could have that list on the main menu. I need to learn more about customizing the GRUB2 boot menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.