boot an alternate kernel
Ralf Mardorf
kde.lists at yahoo.com
Fri May 27 13:46:27 UTC 2022
Hi,
don't edit or auto-generate the bootloader config after each kernel
upgrade. Grub doesn't force to do that.
Since I'm using syslinux, I've got the kernels of all installed Linux
distros on one partition, to avoid chain loading. I bind mount ...
blah blah ... not relevant in your case. Since grub is smarter than
syslinux in this regard and a few other regards, you can keep all
Linux kernels on different partitions, without the need to chainload.
Now I describe what's relevant in your situation.
If the kernels don't contain the version number, you don't need to do
anything, once a bootlaoder menu was manually edited.
For example, this is how a KISS principle distro does it
vmlinuz-linux
vmlinuz-linux-rt
vmlinuz-linux-rt-foo
the same for the init thingy (initramfs, initrd).
If they contain the version number and unfortunately Ubuntu's kernels
from official repos do so, Ubuntu doesn't follow the KISS principle,
than manually change links instead of editing the bootloader menu.
For example
initrd.img-4.4.0-210-lowlatency
System.map-4.4.0-210-lowlatency
vmlinuz-4.4.0-210-lowlatency
links
initrd.img-lowlatency -> initrd.img-4.4.0-210-lowlatency
vmlinuz-lowlatency -> vmlinuz-4.4.0-210-lowlatency
System.map is irrelevant, so a link isn't required.
IOW the bootloader config you edited one time does not contain an
entries such as "vmlinuz-4.4.0-210-lowlatency", it contains
"vmlinuz-lowlatency". You only change links, so you don't need to care
to what install a grub menu.cfg belongs to.
There are many bootloaders available and to my knowledge grub is the
only one that provides to auto-generate the menu. This approach comes
with countless issues, hence grub doesn't force users to use the
auto-generate feature. Note, grub has got a lot of pros, but also cons
compared to other bootloaders. Due to the pros I will not encourage to
chose another bootloader unless you know what you are doing, but I
strongly recommend to handle the menu in a different way, than it's
done by a default Ubuntu install. The os-prober and the way the menu is
generated suffer from countless issues, since they aren't "psychic"
either and often fail to detect an OS correctly or to generate a plain
menu.
Regards,
Ralf
More information about the ubuntu-users
mailing list