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.
I ran into a problem today upgrading my kernel which I had not encountered before and which required the help of a live slackware drive to fix.
My PC is over 8 years old and back then the way I found to set up dual booting was to have the vmlinuz kernels on the EFI partition itself. This requires mounting the EFI partition to copy over the files; I do not have the partition mounted by default.
This time round I found that after I had installed the kernel using slackpkg I could not mount the EFI drive. I was getting an error that vfat was an unknown type. I don't really understand why that should have happened (perhaps some kernel module has to be loaded)but in future I will make sure the EFI drive is mounted before upgrading the kernel. If I haven't upgraded my PC by then.
I ran into a problem today upgrading my kernel which I had not encountered before and which required the help of a live slackware drive to fix.
My PC is over 8 years old and back then the way I found to set up dual booting was to have the vmlinuz kernels on the EFI partition itself. This requires mounting the EFI partition to copy over the files; I do not have the partition mounted by default.
This time round I found that after I had installed the kernel using slackpkg I could not mount the EFI drive. I was getting an error that vfat was an unknown type. I don't really understand why that should have happened (perhaps some kernel module has to be loaded)but in future I will make sure the EFI drive is mounted before upgrading the kernel. If I haven't upgraded my PC by then.
I've experienced this before, but with ext2 vs. ext4 file systems.
What happens is that since the EFI hasn't been mounted, the running kernel hasn't loaded the vfat module. Then when you "slackpkg upgrade," it removes the module tree from /lib/modules/{RUNNING KERNEL VERSION}. When you try to mount the EFI partition, the kernel can't find its own vfat module.
For everything to go smoothly, you must either A) mount your vfat partition (or any other file system of a type different from your main partition) before performing the upgrade, or B) re-install the kernel-modules package that corresponds to the version of the un-updated running kernel. (If you haven't rebooted yet, option B should allow you to go ahead and mount the vfat and proceed normally.)
EDIT:
Technically speaking, you don't have to mount the partition before upgrading the kernel--as long as the vfat module is loaded before you upgrade. (E.g., via modprobe.) In my case, I just include the vfat module in the initrd, then EFI is always available to mount, before or after the upgrade...
Last edited by JayByrd; 11-30-2022 at 01:37 PM.
Reason: Second thoughts...
I was about to suggest again dracut (associated with GRUB of course) but I know, NIH syndrome et all. And we would miss all these "I can't reboot after a kernel upgrade" threads...
@GazL: no port of lilo or elilo for CRUX? What a shame!
Last edited by Didier Spaier; 11-30-2022 at 05:59 PM.
I was about to suggest again dracut (associated with GRUB of course) but I know, NIH syndrome et all. And we would miss all these "I can't reboot after a kernel upgrade" threads...
@GazL: no port of lilo or elilo for CRUX? What a shame!
No, no elilo/lilo in CRUXland. Initially I borrowed Slackware's elilo and mkinitrd to boot CRUX, but later moved away from that. I boot CRUX using the kernel's EFI_STUB direct from the EFI firmware boot menu, with no additional boot-manager at all. As for the initrds, CRUX doesn't officially support one, and that sort of thing is left to the user/admin to sort out ( There's a lot of that with CRUX! ).
There is a build of dracut in CRUX's "opt" package build collection, and I did try it, and it did indeed work, but I decided to write and use my own, driven by a simple makefile.
In contrast, my Slackware 15.0 install still uses elilo and Slackware's mkinitrd.
P.S. It's never been about NIH for me, it's an aversion to complexity.
I boot CRUX using the kernel's EFI_STUB direct from the EFI firmware boot menu, with no additional boot-manager at all.
...
There is a build of dracut in CRUX's "opt" package build collection, and I did try it, and it did indeed work, but I decided to write and use my own, driven by a simple makefile.
Amzingly, there are these two options of dracut:
Code:
--uefi
Instead of creating an initramfs image, dracut will create an UEFI executable, which can be executed
by an UEFI BIOS. The default output filename is
<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi. <EFI> might be /efi, /boot or /boot/efi
depending on where the ESP partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
/usr/lib/os-release or if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or
empty.
--uefi-stub <FILE>
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and kernel command line
and boots the kernel. The default is
$prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub
I guess you don't need that
Maybe I will try --uefi-stub some day if I am really bored...
--uefi
Instead of creating an initramfs image, dracut will create an UEFI executable, which can be executed
by an UEFI BIOS. The default output filename is
<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi. <EFI> might be /efi, /boot or /boot/efi
depending on where the ESP partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
/usr/lib/os-release or if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or
empty.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.