Ask Your Question
0

dual boot with archliux and fedora 29: bootloader question

asked 2019-01-06 20:38:44 -0500

lenovolobo933 gravatar image

hello i am using archlinux with systemd-boot and going to install fedora 29.

i would like to ask if if it more convenient to skip installing the grub bootloader in the fedora installation or proceed with the bootloader installation and remove it later after systemd-boot has been setup to load fedora.

1 thing i am not sure is does the vmlinuz kernel and init.img files exist both on the efi and root partition or only on the root partition? because when i browse the root partition in archlinux(sda9), it contains boot and boot/efi subdirectory which seems to belong to the efi partition(sda1). and would installing grub bootloader in the fedora setup create an automatic hook which updates the fedora kernel in efi partition whenever there are any changes to the kernel files on the root partition.

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-07 04:25:48 -0500

villykruse gravatar image

On Fedora the EFI file system is mounted on /boot/efi and the grub efi loader is found in /boot/efi/EFI/Fedora. The kernel and initrd is located, not in the efi file system, but on the /boot directory, which usually is another file system.

You can convert the Fedora system to use the systemd booter by removing all grub and grubbby packages as well as the shim packages. You also have to remove the /boot/loader directory and its contents. You can then run

rpm -q --scripts kernel-core | grep add

That will show something like

/bin/kernel-install add 4.19.13-300.fc29.x86_64 /lib/modules/4.19.13-300.fc29.x86_64/vmlinuz || exit $?

Run that script which will build the boot configuration files in /boot/efi/loader and install the vmlinuz and initrd in the efi file system. Leave out the || exit $? part, though.

The existence of /boot/loader causes the loader configuration files to be generated in the wrong place.

If you can have a dedicated disk unit for your Fedora system, then you can install Fedora normally creating another EFI file system on the second disk. If the UEFI firmware works properly, you can chose to boot using the grub loader from the second disk and Fedora would boot normally.

edit flag offensive delete link more

Comments

it sounds more complicated than i initially thought.

what problems will i run into if i skip the bootloader installation and add a manual entry for Fedora under systemd-boot?

thanks

lenovolobo933 gravatar imagelenovolobo933 ( 2019-01-08 00:54:35 -0500 )edit

I am not sure you have that option.

The Fedora loader should be able to co-exist in the EFI file system just fine, except you may want to save the file EFI/BOOT/BOOTX64.EFI. In Fedora that file is a copy of the shim pre-loader and currently is probably a copy of the systemd-boot loader. It is only used of the UEFI firmware gets confused.

I would expect you can create a manual entry for Fedora after copying the kernel and initrd into the EFI file system.

villykruse gravatar imagevillykruse ( 2019-01-08 02:43:56 -0500 )edit

Also consider that Fedora releases new kernels quite frequently.

villykruse gravatar imagevillykruse ( 2019-01-08 02:45:02 -0500 )edit

due to the limitations of my 384kbps connection, i chose the custom package installation of about 270mb. also, i proceeded without installing the bootloader. after adding the manual entry in systemd-boot, it shows error.

so the kernel and initrd of fedora exist on both the ESP partition and the root partition, and the boot directory in root is a mirror of the ESP partition?

how do i proceed to rescue the installation, eg installing the fedora bootloader, without downloading everything again?

thanks

lenovolobo933 gravatar imagelenovolobo933 ( 2019-01-09 01:16:27 -0500 )edit

The EFI file system just contains these entries:

/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/EFI/fedora/BOOTX64.CSV
/boot/efi/EFI/fedora/grub.cfg
/boot/efi/EFI/fedora/grub.cfg.bak
/boot/efi/EFI/fedora/grubenv
/boot/efi/EFI/fedora/grubx64.efi
/boot/efi/EFI/fedora/mmx64.efi
/boot/efi/EFI/fedora/shim.efi
/boot/efi/EFI/fedora/shimx64-fedora.efi
/boot/efi/EFI/fedora/shimx64.efi

I would expect to find /boot/efi/EFI/systemd/systemd-bootx64.efi from your Arch system boot loader plus the Arch kernels and boot config files.

villykruse gravatar imagevillykruse ( 2019-01-09 06:07:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-01-06 20:38:44 -0500

Seen: 222 times

Last updated: Jan 07