LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Instructions for Updates to Generic Kernel (https://www.linuxquestions.org/questions/slackware-14/instructions-for-updates-to-generic-kernel-4175647961/)

alpage2 02-09-2019 01:22 PM

Instructions for Updates to Generic Kernel
 
Is there a clear set of blow-by-blow instructions available for installing routine kernel upgrades for someone running with the generic kernel? I have searched in the forums and the slack docs, but couldn't find exactly this.

The slackware beginners_guide has a great set of instructions for switching to the generic kernel, and it is something in this detail that I am looking for so that I don't end up with an unbootable system every time a routine kernel upgrade comes along.

Thanks in anticipation.
Alan

willysr 02-09-2019 02:04 PM

upgrade kernel
run /usr/share/mkinitrd/mkinitrd_command_generator.sh -k <kernel-version>
execute the output of the above command
run lilo or grub-mkconfig

Okie 02-09-2019 02:05 PM

building your own kernel is a risky endeavor, and if you dont do it just right you can end up with a slackware install that wont boot, or the very least something wont work,

what i do once i get the kernel source installed i cd to /usr/src/linux, run make localmodconfig, then run make menuconfig and look through it to make sure the the things i need are selected which is a long and tedious chore then save & exit, run make then make install then make modules_install and recently grub wont boot my rebuilt kernel and i have since swiched back to lilo for a bootloader

like i said this is a risky thing to do if you are unfamiliar with building a kernel so do it at your own risk because if you dont do everything correctly you will have a unbootable system, and the benefits are basically just a slightly smaller kernel that boots a little faster so it is almost not worth the trouble, if you have plenty of disk space you might want to do another install of slackware and just dual boot slackware with another install of slackware for testing to learn building kernels on so if it goes badly you dont mess up your main working slackware install

good luck and may the source be with you

Richard Cranium 02-09-2019 10:46 PM

Quote:

Originally Posted by alpage2 (Post 5959867)
Is there a clear set of blow-by-blow instructions available for installing routine kernel upgrades for someone running with the generic kernel? I have searched in the forums and the slack docs, but couldn't find exactly this.

The slackware beginners_guide has a great set of instructions for switching to the generic kernel, and it is something in this detail that I am looking for so that I don't end up with an unbootable system every time a routine kernel upgrade comes along.

Thanks in anticipation.
Alan

Do you have intel processors on your machines or AMD?
Does your motherboard use BIOS boot or EFI boot?
Do you want to use lilo, elilo, or grub to boot?

rkfb 02-10-2019 07:00 AM

I would advocate installing the new kernel, rather than upgrading to it.

If you then leave your old working kernel as the default one to boot (in for instance lilo or grub) and have the new kernel as one you have to select to boot you should be able to guard against any issues with the new kernel failing.

alpage2 02-10-2019 07:41 AM

Instructions for Updates to Generic Kernel
 
Many thanks to all responders. I think my loose terminology has given the wrong impression in some cases. I was not referring to building my own kernel - just installing the routine updates by:

Code:

slackpkg update
followed by:

Code:

slackpkg upgrade-all
I am guessing that the commands offered by willysr are the answer that I was looking for?

Thanks again for all the help!
Alan

rkfb 02-10-2019 08:00 AM

Although this is where you could run in to problems if the new kernel won't boot.

Better to blacklist kernel updates (see the file /etc/slackpkg/blacklist for information (you may have to add kernel-headers)) then download the new kernel manually from your preferred source (find the various packages in a/, d/ and k/). You can then install them manually using installpkg rather than upgrading via slackpkg and if you follow my previous suggesion of leaving the old kernel as the default one to boot then if you do run in to any problems you will still have a working computer.

Tonus 02-10-2019 08:51 AM

Instructions for Updates to Generic Kernel
 
+1 for blacklisting kernel packages

You could automate the download of the new kernel with a rsync script and the install, and in the row parse the kernel version, build your initrd and update your lilo or grub.

Just saying : I do this by hand, assuming I mirror the Slackware repo and have a mkinitrd.conf that is well completed.
It's like :
Code:


installpkg /my_local_repo/*/kernel*.t?z
mkinitrd -F -k $kernel_version
grub-mkconfig -o /boot/grub/grub.cfg


bormant 02-10-2019 03:04 PM

@Tonus,
why rsync,
slackpkg download kernel
does the trick.

majekw 02-21-2019 10:48 AM

Get hook to slackpkg and all magic with mkinitrd will be done after kernel upgrade: https://github.com/majekw/slackpkg-initrd

Tonus 02-21-2019 10:55 AM

Instructions for Updates to Generic Kernel
 
@bormant
You're right...
Might be because I'm used to have my local repo...


All times are GMT -5. The time now is 09:16 PM.