[systemd-devel] howto switch from grub2-bios to systemd-boot
Reindl Harald
h.reindl at thelounge.net
Fri Sep 4 15:10:34 UTC 2020
Am 04.09.20 um 16:58 schrieb Lennart Poettering:
> On Mo, 22.06.20 16:01, Reindl Harald (h.reindl at thelounge.net) wrote:
>
>> what is the best way to get a Fedora using legacy-boot to UEFI and at
>> the same time switch from grub2 to systemd-boot?
>>
>> * how to get in installed from a live-iso to
>> the existing setup on disk
>> * how to get the config files right at the first try
>> * how does it work with kernel-updates
>> * how to get GRUB_CMDLINE_LINUX over
>> * is it possible to not kill grub2 for the time beeing
>> to boot back into BIOS-mode in case of emergency
>
> we should probably write this down somewhere in clean form, but
> basically what you have to do is this:
>
> 0. Remove grub, grubby and all that stuff
> 1. Mount your ESP to /boot, /efi or /boot/efi
> 2. If you have it mount your XBOOTLDR partition to /boot (consider
> changing your partition type uuid of your pre-existing /boot
> partition to the XBOOTLDR one, if you have it)
> 3. Run "bootctl install"
> 4. Manually invoke "kernel-install add" for all kernels that are
> currently installed.
>
> The 4th step is only necessary because the grub RPM fucks up the
> kernel-install script systemd ships and generates snippets that are
> invalid. After removing grub you thus need to rerun "kernel-install"
> to regenerate the correct snippets.
>
> In an ideal world Fedora would just use boot loader spec compliant
> snippets anyway, so that step 4 wouldn't be ncessary. And step 1+2 would
> not be necessary either, if everything is was mounted and tagged
> properly from the beginning.
>
> Kernel command line you can configure in /etc/kernel/cmdline. That's
> where kernel-install picks it up. When you change that file, rerun
> kernel-install for the relevant kernels.
>
>> can /boot holding the kernel itself still be a Linux RAID1 or classical
>> ext4 partition or is it required that the kernel and initrd live on the
>> EFI partition too?
>
> No, that's not supported in sd-boot. A boot loader is a boot loader,
> it should contain a fragile storage stack. It's kinda what sd-boot is
> supposed to do better than grub.
well, a boot loader should just *load* and not write anything so RAID1
is technically no problem and it shouldn't matter which of the 1, 2, 3
or 4 disks is there unless one survived
without having the kernel redundant a RAID setup is completly pointless
and that's why the whole UEFI stuff is broken by design as broken as
smomething can be
More information about the systemd-devel
mailing list