- Joined
- Jul 24, 2015
- Messages
- 2,204
- Motherboard
- MSI H81i
- CPU
- i5-4570
- Graphics
- RX 580
Clover can boot linux without the need for chain-loading of bootloaders e.g. GRUB. This is possible because for some time (>3.3) the kernel has contained its own EFI bootloader. Clover loads the kernel as an EFI executable.
Arch Linux
Example steps using an existing EFI system partition (e.g. same one as Clover). Using the EFI partition in this way means we don't need additional file system drivers.
First, discover some partition UUIDs, and edit /etc/fstab so that the EFI partition mounts at boot time on /boot.
Unmount whatever is mounted on /boot
We need 2 partition UUIDs (PARTUUID), one for the root volume (for the kernel command line) and one for the EFI partition (from where the kernel itself will be loading). Copy them for later use.
List partitions with blkid
PARTUUIDs obtained from 'blkid' output that will be used in this example:
EFI: 3ecfa8d5-8c7f-485e-a90e-a917f1fa7da5
Root: c8c7afb0-55c6-4065-bf3d-dd39cbd39e69
Edit existing or create new fstab entry for /boot
Use the EFI partition UUID you obtained earlier e.g.
Save the file, and mount the partition
Next configure kernel and ramdisk updates so both of these get located at /boot (i.e. root of EFI partition). See your distro's documentation, steps for Arch:
mkinitcpio: Backup + edit linux.preset
Verify contents of mkinitcpio 'linux' preset, if no changes needed that is fine
Install the kernel package with the new configuration + /boot mount point
Verify that the kernel and ramdisk are now present in the root of our EFI partition:
Edit Clover's config.plist, creating a custom entry for the Linux kernel
The custom entry should look something like this. We are still using the same UUIDs obtained earlier, pay attention to the EFI-style path (\ separator) in the Clover 'Path' property vs the POSIX-style path (/ separator) in the kernel command line.
With the kernel now loadable from the EFI partition you could also add an option in the firmware boot menu with efibootmgr. EFISTUB on ArchWiki
Arch Linux
Example steps using an existing EFI system partition (e.g. same one as Clover). Using the EFI partition in this way means we don't need additional file system drivers.
First, discover some partition UUIDs, and edit /etc/fstab so that the EFI partition mounts at boot time on /boot.
Unmount whatever is mounted on /boot
Code:
sudo umount /boot
We need 2 partition UUIDs (PARTUUID), one for the root volume (for the kernel command line) and one for the EFI partition (from where the kernel itself will be loading). Copy them for later use.
List partitions with blkid
Code:
sudo blkid
PARTUUIDs obtained from 'blkid' output that will be used in this example:
EFI: 3ecfa8d5-8c7f-485e-a90e-a917f1fa7da5
Root: c8c7afb0-55c6-4065-bf3d-dd39cbd39e69
Edit existing or create new fstab entry for /boot
Code:
sudo nano /etc/fstab
Use the EFI partition UUID you obtained earlier e.g.
Code:
PARTUUID=3ecfa8d5-8c7f-485e-a90e-a917f1fa7da5 /boot vfat
Save the file, and mount the partition
Code:
sudo mount PARTUUID=3ecfa8d5-8c7f-485e-a90e-a917f1fa7da5 /boot
Next configure kernel and ramdisk updates so both of these get located at /boot (i.e. root of EFI partition). See your distro's documentation, steps for Arch:
mkinitcpio: Backup + edit linux.preset
Code:
sudo cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/linux.backup
sudo nano /etc/mkinitcpio.d/linux.preset
Verify contents of mkinitcpio 'linux' preset, if no changes needed that is fine
# mkinitcpio preset file for the 'linux' package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"
Install the kernel package with the new configuration + /boot mount point
Code:
sudo pacman -S linux
Verify that the kernel and ramdisk are now present in the root of our EFI partition:
Code:
ls /boot
Edit Clover's config.plist, creating a custom entry for the Linux kernel
Code:
sudo nano /boot/efi/clover/config.plist
The custom entry should look something like this. We are still using the same UUIDs obtained earlier, pay attention to the EFI-style path (\ separator) in the Clover 'Path' property vs the POSIX-style path (/ separator) in the kernel command line.
<dict>
<key>Arguments</key>
<string>initrd=/initramfs-linux.img root=PARTUUID=c8c7afb0-55c6-4065-bf3d-dd39cbd39e69 rw quiet</string>
<key>Path</key>
<string>\vmlinuz-linux</string>
<key>Type</key>
<string>Linux</string>
<key>Volume</key>
<string>3ECFA8D5-8C7F-485E-A90E-A917F1FA7DA5</string>
</dict>
With the kernel now loadable from the EFI partition you could also add an option in the firmware boot menu with efibootmgr. EFISTUB on ArchWiki
Last edited: