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.
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?
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.
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
}
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!
Last edited by Darth Vader; 07-11-2017 at 01:41 AM.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.