On Wed, May 22, 2019 at 11:16 AM Kevin Wilson <wkevils(a)gmail.com> wrote:
Hi all,
I had installed Fedora 30, on a dual boot machine which has a second
partition with Fedora 28.
Fedora 30 comes by default with a new boot loader spec.
I found under /boot/loader/entries/ the following:
ls /boot/loader/entries/
ec1b8b7719964c8b9a1d8db430c63fd6-0-rescue.conf
ec1b8b7719964c8b9a1d8db430c63fd6-5.0.9-301.fc30.x86_64.conf0
I want to be able to boot by default into Fedora 28.
There are a couple of ways to do this. I have't tested any of them, so
I'm not sure which is the most reliable. On Fedora 28 do you have
/usr/sbin/grub2-switch-to-blscfg ?
If so, one option is to convert Fedora 28 to use BLS - and then it's
possible for Fedora 28 and Fedora 30 to share a single /boot where all
the kernels and drop-in bootloader .conf files go. The one tricky
thing is, if this is UEFI, we would probably want to make sure Fedora
28 /etc/fstab does not mount the EFI System partition on /boot/efi
because we'll want to prevent the older Fedora 28 EFI bootloader
packages from overwriting the contents of the EFI system partition.
It's fine for the packages to get installed on Fedora 28 though.
Another strategy is to edit the Fedora 30 grub.cfg (strictly speaking
should using either /etc/grub.d/40_custom or /etc/grub.d/41_custom) so
that there is a single "forwarding" entry to Fedora 28's grub menu.
That menu entry uses the GRUB 'configfile' command and points to the
Fedora 28 grub.cfg. Now Fedora 28 goes on updating its grub.cfg
normally.
It should be possible to give this forwarding menu entry a proper
title that can be set as the saved_entry in the grubenv so that GRUB
will use it by default. I know, it seems a little bit Rube Goldberg
but at least it'd all be self-describing.
Thing is, each strategy does differ on the details depending on
firmware type: BIOS or UEFI. On BIOS, the grub.cfg is self contained
in the /boot for that particular version of Fedora. Whereas with UEFI,
the grub.cfg goes on /boot/efi/EFI/fedora/ no matter the Fedora
version, which happens to be on the EFI system partition. So out of
the box, two Fedora bootloaders cannot co-exist on UEFI, F28 will
always try to step on the grub.cfg there, where F30 never updates it.
I'm also not really sure that Fedora 28's GRUB blscfg.mod is getting
all the latest updates and bug fixes. It's going EOL in 5 days.
Is there a way by some utility to generate entries under
/boot/loader/entries/ for the
Fedora 28 and choose Fedora 28 as the default ?
Dual Fedoras has never exactly been easy. It requires some esoteric
knowledge of GRUB as well as update and upgrade handling to know the
path of least resistance.
(I say that from a system with six or seven Fedoras on a single Btrfs
volume, each in their own subvolume, and if i want to flip to one of
the others, I just hand edit the menu entry changin the
'rootflags=subvol=root30' to use root29 or root28 or rootraw or
whatever. The gotcha of course is those roots don't necessarily have
matching kernel modules for the /boot kernel + initramfs. Since I'm
using Fedora 30 95% of the time, I just manually 'cp -a --reflink'
copy the latest modules from F30 to the proper location in the rootX
subvolume for the Fedora version I want to boot.)
The nice thing about BLS going forward is with minimal effort it is
possible for Fedora 29, 30, 31 to share a single /boot, they all drop
their kernels, initramfs, and matching bls snippets there, and they
all appear in the same GRUB menu. The one thing to change is
/etc/fstab so older Fedora's doing GRUB updates don't overwrite
/boot/efi/EFI/fedora with old bootloader binaries (not really the end
of the world if it did happen I guess).
Or should I disable the boot loader spec in order to boot to Fedora
28
on this machine ?
I'm not sure that really helps get you closer to what you want. Anyway
it's best if you tell us what your plan is for Fedora 28 going EOL
this week. Are you making Fedora 30 primary in the near future? Or are
you going to upgrade the Fedora 28 installation to Fedora 29? That
sorta matters strategy wise. Maybe.
--
Chris Murphy