LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 11-27-2019, 07:17 PM   #16
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253

Now do you parse lilo.conf?
 
Old 11-27-2019, 08:11 PM   #17
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by Lockywolf View Post
Now do you parse lilo.conf?
It's part of the customization of lilo.conf shown in the "autoslackpkg -h lilo" help screen.

When a new kernel is installed, lilo.conf is appended with lines that contain the new release number. sed is used to change the default kernel line.

When an old kernel is removed, sed is used to delete the old release lines and another sed changes the default kernel line.

This is the required lilo.conf format for the bootable partition section...
Code:
# Linux bootable partition config begins
default=Gen4.4.201-smp
image=/boot/vmlinuz-generic-smp-4.4.199-smp
  initrd=/boot/initrd-4.4.199-smp.gz
  label=Gen4.4.199-smp
  read-only #4.4.199-smp
image=/boot/vmlinuz-huge-smp-4.4.199-smp
  label=Hug4.4.199-smp
  read-only #4.4.199-smp
image=/boot/vmlinuz-generic-smp-4.4.201-smp
  initrd=/boot/initrd-4.4.201-smp.gz
  label=Gen4.4.201-smp
  read-only #4.4.201-smp
image=/boot/vmlinuz-huge-smp-4.4.201-smp
  label=Hug4.4.201-smp
  read-only #4.4.201-smp

Last edited by Chuck56; 11-27-2019 at 08:17 PM.
 
2 members found this post helpful.
Old 11-27-2019, 08:17 PM   #18
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,718

Rep: Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857
OP, very interesting, nice job and thanks for sharing. Perhaps a blog post is in order for those that might be inclined to utilize your script.
 
1 members found this post helpful.
Old 11-27-2019, 08:28 PM   #19
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by ChuangTzu View Post
...Perhaps a blog post is in order for those that might be inclined to utilize your script.
That's a good idea but let's see if it attracts enough attention before I commit to a blog.
 
Old 11-27-2019, 09:32 PM   #20
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Tonus View Post
That looks great. I might use it more for people I install Slackware for (I don't want to bother with any crappy distribution nor Microsoft outside work)! Looking forward to grub support...

For myself, I keep my personal copy of the package tree with custom rsync script derived from Alien Bob's and upgrade by hand.
Still, I am lazy and use slackpkg after that to check for *.new files...
I use slackroll to do updates on most of my machines now and I have a helper script to create my initrd as well as run grub (slackroll allows you to jump to a shell to run whatever you want when it detects a kernel upgrade).

Please don't view the above comment as anything negative about @Chuck56's script! (It's just how I do stuff now.) He wrote something that he found useful and shared it with the rest of us. That's a very good thing and I have absolutely no wish to discourage others from doing something similar.
 
2 members found this post helpful.
Old 11-30-2019, 06:08 PM   #21
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Ran "autoslackpkg -m dialog" and captured a few of the screens (not all of them) on the -current Sat Nov 30 21:17:21 UTC 2019 upgrade.

Kernel 5.4.1 was the star of this upgrade. I left 4.19.86 on the machine and removed 4.19.85 in the process.
Code:
Linux slacker 5.4.1 #1 SMP Sat Nov 30 14:09:29 CST 2019 x86_64 AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G AuthenticAMD GNU/Linux
All seems to running well this evening including ktown.
Attached Thumbnails
Click image for larger version

Name:	install_new_kernel.png
Views:	78
Size:	23.5 KB
ID:	32009   Click image for larger version

Name:	efi_discovered.png
Views:	72
Size:	7.9 KB
ID:	32010   Click image for larger version

Name:	efi_after.png
Views:	76
Size:	44.4 KB
ID:	32011   Click image for larger version

Name:	remove_kernel.png
Views:	73
Size:	15.7 KB
ID:	32012   Click image for larger version

Name:	efi_after_remove.png
Views:	67
Size:	31.8 KB
ID:	32013  


Last edited by Chuck56; 12-01-2019 at 06:00 AM.
 
7 members found this post helpful.
Old 12-01-2019, 04:21 PM   #22
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196
I wish you the best of success, maybe I'll use it someday. So far, I err on the side of caution, weighing the inconvenience of updating vs letting the script do it.
So far I am not inconvenienced enough to try automation, because if something goes wrong then I'd like to be there, consciously.

Like that one time I accidentally deleted my home partition and could stop it just in time (not related to slackpkg updates, but, an example) and it only ate my virtualbox images, phew.
Granted, there's backups for that, but blehhhhHHHHHHHhhhhHHhhHHhhHH.
 
Old 12-01-2019, 04:47 PM   #23
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
autoslackpkg - a way to automate slackpkg

No problem. If I only had 1 or 2 systems I would do the same. Updating many systems is when automation really pays off.
 
2 members found this post helpful.
Old 12-02-2019, 02:47 PM   #24
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
One of the things that I had been intending to do was to write a script to do what autoslackpkg does. So when I read this post I was quite interested. I installed autoslackpkg on 12/1/19, after I had done the updates of that date, including the 5.4.1 kernel. autoslackpkg handled the updates of 12/1/19 with no problems at all.
I have another -current installation in vbox, which had not been updated to the 11/30/19 changes. This update contained a kernel update & autoslackpkg choked on the kernel update. All worked well until the reboot in the middle of the update process, & elilo failed on the reboot. I rebooted with the install disk, then chrooted into my system. The new kernel has been installed properly, the new initrd has been installed, & all have been copied into the /boot/efi/EFI/Slackware directory. However, elilo.conf is strange:
Code:
$ cat elilo.conf 
prompt
timeout=60
default=Gen#slackpkgupdate
image=vmlinuz-generic-5.4.0
label=Gen5.4.0
initrd=initrd-5.4.0.gz
read-only #5.4.0
append="root=/dev/sda2 ro" #5.4.0
image=vmlinuz-huge-5.4.0
label=Hug5.4.0
#        initrd=initrd-5.4.0.gz
read-only #5.4.0
append="root=/dev/sda2 ro" #5.4.0
image=vmlinuz-generic-#slackpkgupdate
label=Gen#slackpkgupdate
initrd=initrd-#slackpkgupdate.gz
read-only ##slackpkgupdate
append="root=/dev/sda2 ro" ##slackpkgupdate
image=vmlinuz-huge-#slackpkgupdate
label=Hug#slackpkgupdate
initrd=initrd-#slackpkgupdate.gz
read-only ##slackpkgupdate
append="root=/dev/sda2 ro" ##slackpkgupdate
I'm sure I'm doing something wrong, but what?
 
1 members found this post helpful.
Old 12-02-2019, 03:39 PM   #25
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
autoslackpkg - a way to automate slackpkg

Did you edit elilo.conf before launching autoslackpkg? For sure the default line is a mess. I'll look at it some more later today. I need some recovery time from the morning out in the snow.
 
Old 12-02-2019, 05:36 PM   #26
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
Yes. I modified all files before running autoslackpkg. elilo.conf looked like the first part of what I posted, down through the first two stanzas, except for the Default line. Thanks.
Bill
 
Old 12-02-2019, 07:38 PM   #27
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by TSquaredF View Post
...default=Gen#slackpkgupdate...
I wonder how "#slackpkgupdate" got inserted as the release number instead of "5.4.0". I'm impressed! The kernel_search function does the heavy lifting for those values. I'm not sure yet how that value was introduced.
 
Old 12-02-2019, 10:41 PM   #28
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
Quote:
Originally Posted by Chuck56 View Post
I wonder how "#slackpkgupdate" got inserted as the release number instead of "5.4.0". I'm impressed! The kernel_search function does the heavy lifting for those values. I'm not sure yet how that value was introduced.
I have no clue. I do intend to crawl through the script to try to figure how it works, but haven't done any bash scripting except for simple ones for my own use (I used to make a living programming in C++, but haven't done that for 20 years). I did go back in & modified elilo.conf to have the last two stanzas refer to 5.4.1, as they should, & now the vm boots as it should, I can select either Generic or Huge from either 5.4.0 or 5.4.1. The 12/2 upgrades were posted before I finished, so ran autoslackpkg again. It worked perfectly without the kernel upgrades.
Regards,
Bill
 
Old 12-03-2019, 06:47 AM   #29
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
The script is designed to ignore kernels from testing. I’ll take a look at what happens when a testing kernel is already installed like in your case. Thanks for giving it a go!
 
Old 12-03-2019, 12:07 PM   #30
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
OK. I hadn't even thought that I was updating a testing kernel. If I have time, I will install a 4.19.X kernel in the vbox system & see how the upgrade from that to 5.4.1 goes. I keep the vbox system pristine for for compiling programs for my main systems.
Thanks again,
Bill
 
  


Reply



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
having trouble after upgrading 14.1 slackware using slackpkg and slackpkg+ [solved] slackartist Slackware 1 12-28-2015 07:28 AM
[SOLVED] Slackpkg, Slackpkg Plus, Slackware 14.1 x86_64 install.log delay or slow to write bamunds Slackware 7 04-22-2014 11:12 AM
[SOLVED] typos in latest /etc/slackpkg/mirrors(.new) [slackpkg-2.82.0-noarch-8.tgz] wailingwailer Slackware 4 09-22-2012 04:04 AM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/dialog-functions.sh michelino Slackware 4 03-20-2007 12:22 PM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM

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

All times are GMT -5. The time now is 05:26 PM.

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
Open Source Consulting | Domain Registration