LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2019, 11:50 AM   #1
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 104

Rep: Reputation: 4
kernel install versus kernel update


I am using -current x86_64. When I check slackpkg, it says this:

Quote:
bash-5.0# slackpkg search kernel


NOTICE: pkglist is older than 24h; you are encouraged to re-run 'slackpkg update'

Looking for kernel in package list. Please wait... DONE

The list below shows all packages with name matching "kernel".

[ Status ] [ Repository ] [ Package ]
installed slackware64 kernel-firmware-20190926_c0590d8-noarch-1
installed slackware64 kernel-generic-4.19.75-x86_64-1
installed slackware64 kernel-headers-4.19.75-x86-1
installed slackware64 kernel-huge-4.19.75-x86_64-1
installed slackware64 kernel-modules-4.19.75-x86_64-1
installed slackware64 kernel-source-4.19.75-noarch-1
... 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
 
Old 10-03-2019, 02:28 PM   #2
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 515
Blog Entries: 3

Rep: Reputation: 139Reputation: 139
kernel install versus kernel update

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.
 
1 members found this post helpful.
Old 10-04-2019, 08:52 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,344
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 10-04-2019, 11:54 AM   #4
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 104

Original Poster
Rep: Reputation: 4
@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.


@igadoter

Quote:
bash-5.0$ ls -l /boot
total 59017
lrwxrwxrwx 1 root root 38 Sep 30 09:03 README.initrd -> /usr/doc/mkinitrd-1.4.11/README.initrd
lrwxrwxrwx 1 root root 23 Sep 30 08:52 System.map -> System.map-huge-4.19.75
-rw-r--r-- 1 root root 3507625 Jul 10 12:12 System.map-generic-4.19.58
-rw-r--r-- 1 root root 3553809 Sep 21 13:36 System.map-generic-4.19.75
-rw-r--r-- 1 root root 4943780 Jul 10 12:11 System.map-huge-4.19.58
-rw-r--r-- 1 root root 5017089 Sep 21 13:35 System.map-huge-4.19.75
-rw-r--r-- 1 root root 426 Apr 13 2018 coffee.dat
lrwxrwxrwx 1 root root 23 Sep 30 08:52 config -> config-huge-4.19.75.x64
-rw-r--r-- 1 root root 185310 Jul 10 12:12 config-generic-4.19.58.x64
-rw-r--r-- 1 root root 185281 Sep 21 13:36 config-generic-4.19.75.x64
-rw-r--r-- 1 root root 185310 Jul 10 12:09 config-huge-4.19.58.x64
-rw-r--r-- 1 root root 185281 Sep 21 13:33 config-huge-4.19.75.x64
drwxr-xr-x 3 root root 1024 Dec 31 1969 efi
-rwxr-xr-x 1 root root 216219 Jun 12 2018 elilo-ia32.efi
-rwxr-xr-x 1 root root 238531 Jun 12 2018 elilo-x86_64.efi
drwxr-xr-x 4 root root 4096 Jul 5 11:26 grub
drwxr-xr-x 14 root root 4096 Aug 9 03:42 initrd-tree
-rw-r--r-- 1 root root 10840195 Aug 9 03:42 initrd.gz
-rw-r--r-- 1 root root 22578 Apr 13 2018 inside.bmp
-rw-r--r-- 1 root root 432 Apr 13 2018 inside.dat
-rw-r--r-- 1 root root 6878 Apr 13 2018 onlyblue.bmp
-rw-r--r-- 1 root root 424 Apr 13 2018 onlyblue.dat
-rw-r--r-- 1 root root 15634 Mar 26 2011 slack.bmp
-rw-r--r-- 1 root root 33192 Apr 13 2018 tuxlogo.bmp
-rw-r--r-- 1 root root 423 Apr 13 2018 tuxlogo.dat
lrwxrwxrwx 1 root root 20 Sep 30 08:52 vmlinuz -> vmlinuz-huge-4.19.75
lrwxrwxrwx 1 root root 23 Sep 30 08:52 vmlinuz-generic -> vmlinuz-generic-4.19.75
-rw-r--r-- 1 root root 6055808 Jul 10 12:13 vmlinuz-generic-4.19.58
-rw-r--r-- 1 root root 6076288 Sep 21 13:36 vmlinuz-generic-4.19.75
lrwxrwxrwx 1 root root 20 Sep 30 08:52 vmlinuz-huge -> vmlinuz-huge-4.19.75
-rw-r--r-- 1 root root 9529216 Jul 10 12:12 vmlinuz-huge-4.19.58
-rw-r--r-- 1 root root 9570176 Sep 21 13:36 vmlinuz-huge-4.19.75


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?
 
Old 10-04-2019, 04:13 PM   #5
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,470

Rep: Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813
grub2 can show both kernels, if they are both present.

https://github.com/Richard-Cranium/SlackwareGrub2 may help with that, but it isn't required. All it does is match up a versioned initrd with a versioned generic kernel.

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.
 
2 members found this post helpful.
Old 10-05-2019, 03:38 AM   #6
Tonus
Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 515
Blog Entries: 3

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by deretsigernu View Post
@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.

Have a look to grub-reboot and grub-set-default.
 
Old 10-09-2019, 10:50 PM   #7
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.1/-current
Posts: 104

Original Poster
Rep: Reputation: 4
I ran
Quote:
grub-mkconfig -o /etc/grub/grub.cfg
.

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.
 
1 members found this post helpful.
Old 10-10-2019, 01:08 PM   #8
Poprocks
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: Slackware
Posts: 470

Rep: Reputation: 246Reputation: 246Reputation: 246
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.
 
Old 10-10-2019, 01:19 PM   #9
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 62

Rep: Reputation: Disabled
Quote:
Originally Posted by deretsigernu View Post
I ran .

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.
You can edit /etc/default/grub to set your default from that list. This page has a basic explanation of the options: https://www.gnu.org/software/grub/ma...iguration.html Check out the 'GRUB_DEFAULT' section.
 
  


Reply

Tags
grub, grub boot menu, grub config, kernel upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux AntiX versus Puppy Linux versus Slackware for old PCs? patrick295767 Linux - Distributions 12 01-18-2016 07:38 AM
LXer: OpenOffice versus LibreOffice versus The World LXer Syndicated Linux News 0 03-05-2013 11:30 PM
LXer: TLWIR 35: Open Versus Closed Mobility ‚?? The Nokia N900 Versus The Nokia Lumia 900 LXer Syndicated Linux News 0 04-07-2012 06:31 PM
[SOLVED] bash - versus --perl - versus python ow1 Linux - Software 2 05-03-2010 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration