LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ELILO and Kernel Upgrade (https://www.linuxquestions.org/questions/slackware-14/elilo-and-kernel-upgrade-4175609579/)

VisionIncision 07-10-2017 12:30 PM

ELILO and Kernel Upgrade
 
Hi all,
I just installed Slackware to my second SSD and everything went smoothly. So I did the usual process of first selecting a mirror and running
Code:

slackpkg update && slackpkg upgrade-all
After some time, I was prompted to update LILO to point to the new kernel(4.4.14). So I did that and rebooted, thinking that it would work for ELILO too.

However, when I now boot, I get no USB, no network etc and an error message:-

Code:

depmod: ERROR: could not open directory /lib/modules/4.4.14: No such file or directory
.

On BIOS systems with an MBR bootloader I have never had a problem. How does one handle kernel updates with EFI? Did I do something wrong/not do something, or is it just bad luck?

This is a freshly installed system.

VisionIncision 07-10-2017 12:40 PM

UPDATE:

I realised that on my EFI partition, vmlinuz was still the old kernel. I literally copied the new kernel across from /boot with the live DVD and now everything is fine.

Still, I would like to know if there is a tool to do this after updates rather than manually.

phenixia2003 07-10-2017 12:40 PM

Hello,

http://www.linuxquestions.org/questi...4/#post5729822

--
SeB

laprjns 07-10-2017 07:03 PM

Quote:

Originally Posted by VisionIncision (Post 5733260)
Still, I would like to know if there is a tool to do this after updates rather than manually.

After updating, run eliloconfig as root, not lilo.

laprjns 07-10-2017 07:43 PM

Quote:

Originally Posted by VisionIncision (Post 5733253)
After some time, I was prompted to update LILO to point to the new kernel(4.4.14). So I did that and rebooted, thinking that it would work for ELILO too.

This appears to be a bug or oversight in slackpkg. The "post-functions.sh" function used by slackpkg check to see if the kernel has been updates and if so suggest that you run lilo. It does not appear to consider UEFI systems.

Here is the "lookkernel" function include in the slackpkg library post-functions
Code:

lookkernel() {
        NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
        if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
                if [ -x /sbin/lilo ]; then
                        echo -e "\n
Your kernel image was updated.  We highly recommend you run: lilo
Do you want slackpkg to run lilo now? (Y/n)"
                        answer
                        if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
                                /sbin/lilo
                        fi
                else
                        echo -e "\n
Your kernel image was updated and lilo is not found on your system.
You may need to adjust your boot manager(like GRUB) to boot appropriate
kernel."
                fi
        fi
}


Darth Vader 07-10-2017 09:06 PM

Quote:

Originally Posted by laprjns (Post 5733369)
This appears to be a bug or oversight in slackpkg.

Nope. There is no such bug; it is just "the curse of the automated/advanced tools", graphical or not. In all its glory.

Long story short: the user expects from the damned application to think instead of him.

So, let's write several megabytes of code, to compute if the System booted with LILO, ELILO, SYSLINUX or GRUB, preferable with absolute precision on detection, just as the user to not have to think 5 seconds. Right?

You know what I consider to be the best way to change this code?

Leaving just a warning: "Bro, I updated your kernel right now. You may or may not need to update your bootloader as consequence of this action."

Putting in another way: WHY THE HECK a package manager/updater should mess with your bootloader? That's very UN-Slackware! ;)

slackb0t 07-10-2017 10:14 PM

I think that answer is a bit extreme.. lol

But I do like this:

Quote:

"Bro, I updated your kernel right now. You may or may not need to update your bootloader as consequence of this action."

laprjns 07-11-2017 05:15 AM

Quote:

Originally Posted by Darth Vader (Post 5733395)
Putting in another way: WHY THE HECK a package manager/updater should mess with your bootloader? That's very UN-Slackware! ;)

I don't disagree with this and was surprise to find out that the suggestion to update lilo came from slackpkg and not from the kernel package's slack-desc or doinst.sh


All times are GMT -5. The time now is 09:38 AM.