LinuxQuestions.org
Help answer threads with 0 replies.
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 04-21-2021, 09:14 PM   #1
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 75

Rep: Reputation: Disabled
Slackpkg again , Press the "Enter" key to continue...


From a script in cron , that would be a VERY concerning message .

#!/bin/bash
slackpkg -batch=on -default_answer=y upgrade-all


Code:
Your kernel image was updated, and lilo does not appear to be used on 
your system.  You may need to adjust your boot manager (like GRUB) to 
boot the appropriate kernel (after generating an initrd if required).
Press the "Enter" key to continue...
Hth , JimL
 
Old 04-22-2021, 02:16 AM   #2
quickbreakfast
Member
 
Registered: Oct 2015
Location: brisbane australia
Distribution: slackware 14.2
Posts: 249

Rep: Reputation: Disabled
I don't see your problem, because your electronic marvel is telling you the kernel has been updated and the new kernel will need a new initrd to boot into Slackware.

So after you've created the new initrd file, either edit either lilo (which your electronic marvel can't find) to point to the new kernel and initrd files, and run lilo, or your grub file.

Unless you have blacklisted your current kernel, it's likely to have been removed.
 
Old 04-22-2021, 03:40 AM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,306

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
you don't run slackpkg upgrade-all in cron, especially during development cycle
 
1 members found this post helpful.
Old 04-22-2021, 05:16 AM   #4
lovemeslk
Member
 
Registered: Feb 2020
Location: none of your business
Distribution: Slackware
Posts: 82

Rep: Reputation: Disabled
Quote:
Originally Posted by willysr View Post
you don't run slackpkg upgrade-all in cron, especially during development cycle
Your right Willy. Mine runs slackpkg install-new then upgrade-all'
Before geninitrd came out my script made the initrd.gz.
But now it also downlads the latest nvidia driver and installs it.
I been running current many years. This current has been Kernel king
for updates.
I love the new Slackpkg because it doesn't wipe your mirror as before.
This allow me to make that choice in my spare time. Nothing is perfect but
at least the next cron cycle it restarts the upgrade again.
But I also keep a sync of slackware on hard drive.
That gets synced first in case you lose internet do to an upgrade.
Nothing is perfect.
Keep up your wonderful work on SBOPKG.

Last edited by lovemeslk; 04-22-2021 at 05:30 AM.
 
Old 04-22-2021, 06:13 AM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,919

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
Quote:
Originally Posted by willysr View Post
you don't run slackpkg upgrade-all in cron, especially during development cycle
I would go one step further, you shouldn't run slackpkg in cron if you are using -current. To many ways things can go wrong.
 
Old 04-22-2021, 06:35 AM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,063

Rep: Reputation: Disabled
Perhaps we're missing the point here.

I think the real question posed by the OP is: Should -default_answer=y also cover the "Press ENTER" prompt (which is purely informational) when the kernel is updated?

I'd say yes, but add that it would be great if it would also be possible for a script to detect that this condition was detected by slackpkg (an exit code, a semaphore file in /tmp or /run, or whatever).
 
2 members found this post helpful.
Old 04-22-2021, 10:04 AM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,919

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
Quote:
Originally Posted by Ser Olmy View Post
Perhaps we're missing the point here.

I think the real question posed by the OP is: Should -default_answer=y also cover the "Press ENTER" prompt (which is purely informational) when the kernel is updated?

I'd say yes, but add that it would be great if it would also be possible for a script to detect that this condition was detected by slackpkg (an exit code, a semaphore file in /tmp or /run, or whatever).
Sure, agree, script should continue.

That brings up what should it do when slackpkg is upgraded and it drops you out, to restart the process?

I still say upgrading -current is via cron is asking for problems.
 
1 members found this post helpful.
Old 04-22-2021, 11:30 AM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,627

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Quote:
you don't run slackpkg upgrade-all in cron, especially during development cycle
I do see a use case for this. Consider someone maintaining a bank of identical machines who updates a master then wants to push that out to the rest.
Quote:
I think the real question posed by the OP is: Should -default_answer=y also cover the "Press ENTER" prompt (which is purely informational) when the kernel is updated?
Easy enough to do. Create an executable file, say xx_lookkernel in /usr/libexec/slackpkg/functions.d containing
Code:
lookkernel() {
        NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
        if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
                if [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] && grep -q initrd /etc/lilo.conf ; then
                        echo -e "\n
Your kernel image was updated, and your /etc/lilo.conf indicates
the use of an initrd for at least one of your kernels. Be sure to
regenerate the initrd for the new kernel and handle any needed 
updates to your bootloader.
"
                        answer
                elif [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] ; then
                        echo -e "\n
Your kernel image was updated.  Be sure to handle any needed updates
to your bootloader (possibly as simple as running /sbin/lilo).
"
                        answer
                else
                        echo -e "\n
Your kernel image was updated, and lilo does not appear to be used on 
your system.  You may need to adjust your boot manager (like GRUB) to 
boot the appropriate kernel (after generating an initrd if required)."
                fi
                echo -e "Press the \"Enter\" key to continue...\n "
                answer
        fi
}
This will replace the existing lookkernel() function with one that respects the batch=on option.

Last edited by allend; 04-22-2021 at 11:32 AM.
 
1 members found this post helpful.
Old 04-22-2021, 05:22 PM   #9
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 75

Original Poster
Rep: Reputation: Disabled
Hello ALL , Thank you . @"Ser Olmy" , Exactly .

Especially @allend , Had to find the real differences in your version of lookkernel function , The section of post-functions.sh that contains lookkernel also used "answer" but I was confused ...
As the name 'answer' is a valid command at /usr/bin/answer and is a part of elm . Has completely different usage .
So I did some grep'ng around the paths below post-functions to see if there was a function named 'answer' defined and found that the changes you posted used the function 'answer' from core-functions.sh .

Yes , I understand , NOT using this in a cron script . Sorry . For the present it must be .
Tnx , again . JimL
 
Old 06-10-2021, 07:13 PM   #10
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 75

Original Poster
Rep: Reputation: Disabled
Hello ALL , As of slackpkg-15.0.5-noarch-1 (& Possibly earlier) the concern mentioned in this thread is fixed .
Marking SOLVED .
 
  


Reply


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
[SOLVED] "Give root password for maintenance or press CTRL+D to continue" problem enter root password ag33k Slackware - ARM 9 01-12-2017 04:23 PM
Cannot sequentially press Alt key then menu accelerator, must press both concurrently Woodsman Slackware 1 03-21-2013 03:21 PM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 02:46 PM
Press enter for maintenance (or type Control-D to continue) scg03 Linux - Newbie 2 10-05-2008 12:24 AM
"Disk boot failure. Enter system disk and press enter" Fear58 Linux - Hardware 3 06-25-2004 05:17 PM

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

All times are GMT -5. The time now is 04:00 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