My apporach on how to keep Slackware-current upgraded
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.
checked and there is only 1 version of kernel in a/
For your previous question, I chose the "Quit" option in the 2 dialog boxes.
OK, the Quit option will indeed set the return code to 1.
I'll try the script myself on a "-current" system once I install it on my laptop, and let you know what happens.
I have just installed slackware64-current on my laptop, blacklisted all kernel packages, configured my local repository mirror, and run a slackpkg update cycle--i.e.:
Next, I ran my upgrade-kernel.sh script. It worked fine and it updated the kernel from 6.1.7 to 6.1.8.
So far, so good. However, to be sure whether or not the script really does work fine, I'll wait for another kernel upgrade, and see what happens next.
In the meantime, I listed the "initrd" and "vmlinuz" files in my "/boot" directory, and this is what I got:
Code:
$ ls -ld /boot/{initrd,vmlinuz}*
lrwxrwxrwx 1 root root 23 Jan 30 16:44 /boot/initrd-generic -> initrd-generic-6.1.8.gz
-rw-r--r-- 1 root root 9918087 Jan 29 14:57 /boot/initrd-generic-6.1.7.gz
-rw-r--r-- 1 root root 9927649 Jan 30 16:42 /boot/initrd-generic-6.1.8.gz
lrwxrwxrwx 1 root root 23 Jan 30 16:44 /boot/initrd-generic-prev -> initrd-generic-6.1.7.gz
drwxr-xr-x 14 root root 4096 Jan 30 16:42 /boot/initrd-tree
lrwxrwxrwx 1 root root 21 Jan 30 16:44 /boot/vmlinuz-generic -> vmlinuz-generic-6.1.8
-rw-r--r-- 1 root root 8095456 Jan 19 01:10 /boot/vmlinuz-generic-6.1.7
-rw-r--r-- 1 root root 8095360 Jan 24 20:56 /boot/vmlinuz-generic-6.1.8
lrwxrwxrwx 1 root root 21 Jan 30 16:44 /boot/vmlinuz-generic-prev -> vmlinuz-generic-6.1.7
lrwxrwxrwx 1 root root 18 Jan 30 16:44 /boot/vmlinuz-huge -> vmlinuz-huge-6.1.8
-rw-r--r-- 1 root root 11993088 Jan 19 01:07 /boot/vmlinuz-huge-6.1.7
-rw-r--r-- 1 root root 11993120 Jan 24 20:53 /boot/vmlinuz-huge-6.1.8
lrwxrwxrwx 1 root root 18 Jan 30 16:44 /boot/vmlinuz-huge-prev -> vmlinuz-huge-6.1.7
There is a new kernel version available in the slackware-current repository now: 6.1.9.
I have just sync'ed my local mirror, run an system update, and finally run my update-kernel.sh script. Everything worked fine.
So, I'm afraid I cannot reproduce the problem you're having. Would you mind trying the update cycle and rerunning my script, to see how it behaves? If it keeps failing, then, as a first step towards diagnosing the problem, could you then run the following command:
Code:
grep '^[^#]' /etc/slackpkg/mirrors
and verify that it produces a single line pointing to your local mirror?
Then, if that looks OK, to display the first few lines of the changelog:
Code:
head "$(sed --silent --expression='s@^file:/*@/@p' /etc/slackpkg/mirrors)"'/ChangeLog.txt'
Now I'm here to expand on how I keep up with Slacware-current evolution in a safe manner, i.e. by avoiding system breakage between upgrades. Keep in mind that even if all this works perfectly for me and I haven't had not a single glitch in this process in the past couple years, it is solely my approach to the task. I have no intention at all that this may become an ultimate approach to it. It's just my way of doing things that could eventually help others with ideas.
1_mirror.sh: this is my mirroring script. It runs everyday on my NAS to keep up with Slackware-current and AlienBOB's Ktown. It also performs a very important task to anyone avoiding bad things to happen: package preservation.
2_minskyup.sh: this one upgrades Slackware-current according to the best practices exposed in Upgrading Slackware to a New Release. There are different functions for system and kernel upgrades. The later includes automation to preserve the last working kernel version so you can have a working system if the new kernel don't boot. It also includes the recovery and memtest images from Slackware's usbboot.img, meaning that if something goes really, really wrong, you'll have the tools to fix it right there. There are also functions to upgrade many of the tools of my daily workflow, that for one reason or another I decided to use the upstream binaries instead of a ready made package or SlackBuild out there: virtualbox, vagrant, docker, aws-cli, cli53, (git)hub, jq, ngrok, phpmyadmin, spectre-meltdown-checker, testssl, asciinema, calibre, pup, Synology Drive and zoom.
3_minskyup_completion.sh: this one goes in /etc/bash_completion.d/ to offer tab completion for minskyup.
4_lilo.conf: an example of my boot entries so the kernel upgrades works as expected.
But how it works? Whenever a see a new Slackware64 -current ChangeLog entry, or anytime I want, I run:
This will upgrade any packages but kernel. When there is a ktown upgrade, I go to init 3 and run it without --force as it's not advisable to upgrade KDE stuff with X running.
If the changelog entry also contains a new kernel version, then I run:
Code:
$ sudo minskyup kernel
This command will ask me to confirm all the changes it detects, so I have the information I need to decide where or not is safe to move on.
As for the other minskyup options, they are pretty self explanatory. For instance, to upgrade virtualbox:
Code:
$ sudo minskyup virtualbox
It'll detect the currently installed version and the latest one from Oracle. If the installed one is outdated, it moves on and upgrades.
But there are some other tools that do not provide a way to discover which the latest version is. In that case you have to check first, but it's quite simple too:
Code:
$ sudo minskyup docker
Docker CE version is required. Example:
minskyup docker 18.06.0
See https://download.docker.com/linux/static/stable/x86_64/ for available versions.
Currently installed: Docker version 18.06.0-ce
$ sudo minskyup docker 18.06.3
And so on...
So, this is how I do it. WFM. Damn, really WFM!
PS: why minskyup? My box is named after Marvin Minsky.
Hi I realise it's been a good while since you made this post I was curious if your scripts were still available, as you github page is not offering them.
Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.