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.
Great suggestions all around. I've done this a few times now and settled on fallback and default entries in elilo.conf, where fallback is the huge kernel and default is the generic kernel. It's all working swell. Question though, after doing the upgrade, I can just cp the kernel, edit elilo.conf and reboot. If I want to use generic though, it's tricky. I tried using mkinitrd, but it complained that modules weren't loaded and wouldn't give me a line to create the initrd. However, if I booted of the new huge, it will generate the line and I can generate the initrd, copy it and the generic kernel over, tweak the conf file and reboot and be running generic pretty quick.
If you are running generic, and do an upgrade, what steps do you take to activate the new generic kernel. Apparently, mkinitrd doesn't work until you boot into a matching kernel or at least it seems that way.
Great suggestions all around. I've done this a few times now and settled on fallback and default entries in elilo.conf, where fallback is the huge kernel and default is the generic kernel. It's all working swell. Question though, after doing the upgrade, I can just cp the kernel, edit elilo.conf and reboot. If I want to use generic though, it's tricky. I tried using mkinitrd, but it complained that modules weren't loaded and wouldn't give me a line to create the initrd. However, if I booted of the new huge, it will generate the line and I can generate the initrd, copy it and the generic kernel over, tweak the conf file and reboot and be running generic pretty quick.
If you are running generic, and do an upgrade, what steps do you take to activate the new generic kernel. Apparently, mkinitrd doesn't work until you boot into a matching kernel or at least it seems that way.
mkinitrd has a lot of options and flexibility to determine what modules actually get put into it. For starters, Slackware 15.0 includes a new script called "geninitrd" that automates this. One of the README files laying around probably still has the old mkinitrd command if you want to do it yourself.
The trick is to generate the new initrd every time you update the kernel, and BEFORE you reboot. I run geninitrd immediately after 'slackpkg upgrade-all', then issue 2 cp commands to move the new vmlinuz and initrd to my EFI partition. This all has to be done in lockstep.
If I may risk a suggestion...Use dracut instead of mkinitrd, and grub instead of efibootmgr. This is done in Slint (see my sig), also keeping the running kernel in addition to the new one when upgrading. I never had a complaint like "kernel panic after an upgrade" from a Slint user since doing that (but as we do not use slackpkg, rather slapt-get with a wrapper script to build an intramfs and update grub upon kernel updates, some adaptation could be needed).
PS We only use a generic kernel. Also we very recently switched to an all-in-one kernel package, including the kernel itself, the associated modules and sanitized headers, but I digress.
Last edited by Didier Spaier; 02-13-2023 at 02:43 PM.
Reason: PS added.
Yeah, having everything broken down into pieces is nice as a learning opportunity but I still screw this up sometimes. I should probably stop entering the commands manually and write a script or something.
I'm on a pretty new desktop mobo, but I still use spinning rust, boot with Lilo, and the computer has a DVD drive.
Lilo can do either the huge or generic kernels. I can boot to huge and build anything I need for generic if it fails - and I can always go back to my Slack 15.0 install DVD and boot from there if I have to.
With Slackware I use grub with a huge kernel, setup grub at installation I'm done. No need to create an initrd, no need to run lilo, no need to copy files to the efi partition when the kernel is upgraded.
Last edited by colorpurple21859; 02-13-2023 at 03:31 PM.
It certainly is admirable that people try to help others the best way they know how but I thin k it is prudent to consider that many including this OP are obviously using elilo which implies they made the move from lilo not grub and the two are very different. I'm not knocking Greub2 because I'm quite aware that it is very flexible and powerful. My main gripe is entirely subjective and not a little from sheer habit in that I don't want, and certainly don't need a boot loader to do moire than just boot operating systems.
Somewhere a whole lot closer to lilo and elilo configuration but able to probe for any potentially bootable kernel and with a lot of flexibility if you want that is rEFInd. Compare a sample from the two bootloader configs below and decide for yourself which seems simpler, or at the vewry least more like what you are used to.
Note: A much simpler stanza works just fine but I included one that demonstrates some flexibility options
--- OR ---
Code:
### grub
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.
# Uncomment to set your own custom distributor. If you leave it unset or empty, the default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-uuid/7196f698-6b1f-4937-bf94-ce36e3b251ae mitigations=auto quiet"
GRUB_CMDLINE_LINUX=""
# Uncomment to automatically save last booted menu entry in GRUB2 environment
# variable `saved_entry'
# GRUB_SAVEDEFAULT="true"
#Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL="gfxterm"
# The resolution used on graphical terminal
#note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="auto"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true
#Uncomment to disable generation of recovery mode menu entries
# GRUB_DISABLE_RECOVERY="true"
#Uncomment to get a beep at grub start
# GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING="true"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="false"
GRUB_ENABLE_CRYPTODISK="n"
GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"
They both work as do some others but what works best for any individual is usually the path of least resistance, and that seems subjective.
Yes, under the hood grub2 is complex and most other distros have made grub2 more complicated than what it needs to be.
grub-mkconfig does make a complicated looking config file. However one can create a simple grub.cfg file similar to this that boots.
I really suggest not using eliloconfig after the first time! elilo.conf changes work without running eliloconfig. It is better to copy over the new kernels and initrd after each upgrade. The reason why is that occasionally there is a kernel upgrade that causes eliloconfig to break the efibootmgr boot order. You can still find your boot loader at your computers boot screen by pressing F8 for advanced boot options.
To generalize, from specific lilo habits (but can be extended to elilo, grub, or whatever)
If you only have one kernel and one configuration to boot, you have created a single point of failure. When it does not work, you are screwed, and recovery will be painful.
By having multiple options (generic + huge kernels, upgraded kernel + last successful one, whatever), you have fallbacks to resume more or less normal operation when something fails.
When you have everything automated, and something borks, you may find it hard to know where it borked. For critical systems (eg, the kernel), you may wish to do more steps manually (e.g, blacklist or greylist them in your automatic update tool). This way, you know what is getting updated, and when, and you'll know exactly what needs to be undone to fix things.
If you only have one kernel and one configuration to boot, you have created a single point of failure. When it does not work, you are screwed, and recovery will be painful.
Fair enough, I will add a stanza for Last Known Working (LKW)!
I really suggest not using eliloconfig after the first time! elilo.conf changes work without running eliloconfig. It is better to copy over the new kernels and initrd after each upgrade. The reason why is that occasionally there is a kernel upgrade that causes eliloconfig to break the efibootmgr boot order. You can still find your boot loader at your computers boot screen by pressing F8 for advanced boot options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.