Clover

From ArchWiki
Jump to navigation Jump to search

Clover EFI is a boot loader developed to boot OS X (Hackintoshes), Windows and Linux in legacy or UEFI mode.

The main advantages of Clover are:

  • Emulate UEFI on legacy BIOS systems
  • Boot Linux kernels with EFISTUB support
  • Supports native resolution GUI on wide screens people commonly use today
  • Easy of use
  • Easily customizable

Installation

Mount EFI system partition to /boot. This is the preferred method when directly booting an EFISTUB kernel from UEFI.

Generate initial ramdisk environment with mkinitcpio

Download Clover Bootable ISO from here.

Extract the archive Clover-*-X64.iso.7z and find the Clover-*-X64.iso file, mount it to directory like /mnt/iso. It should be noted all file/folder names will be displayed in lower case in Linux, which is different from Windows and Mac OS.

Copy the whole /mnt/iso/efi folder to your EFI system partition. The tree for /boot should look likes the following

/boot/efi
/boot/efi/boot
/boot/efi/clover
/boot/initramfs-linux-fallback.img
/boot/initramfs-linux.img
/boot/vmlinuz-linux

Configuration

Configuration is done through an xml file config.plist under path EFI/CLOVER from the UEFI partition.

A tool is now available to easily edit your config.plist in any OS: Cloud Clover Editor (CCE)

For the meaning of each key, please reference their wiki for custom entries. The key Volume should be the PARTUUID of the EFI partition and must be in upper case. The minimal initramfs initramfs-linux.img in Argumentsand the Linux kernel executable vmlinuz-linux in Path are relative to the EFI partition. Backslashes should be used in accordance with EFI standards. For other arguments in Arguments, please reference EFISTUB and Kernel parameters#Parameter list.

In this example, the initramfs and kernel files are placed at the root of the EFI partition, at the same level as the efi directory. The EFI partition is mounted at /boot

/boot/efi/clover/config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>GUI</key>
  <dict>
    <key>Custom</key>
    <dict>
      <key>Entries</key>
      <array>
        <dict>
          <key>Arguments</key>
          <string>initrd=\initramfs-linux.img root=PARTUUID=d5d0fceb-c58e-c745-a7ff-f2f1b2824e66 rw add_efi_memmap</string>
          <key>Path</key>
          <string>\vmlinuz-linux</string>
          <key>Title</key>
          <string>Arch Linux</string>
          <key>Type</key>
          <string>Linux</string>
          <key>Volume</key>
          <string>33BA6C23-4772-294D-9053-72A49FCAEF39</string>
          <key>VolumeType</key>
          <string>Internal</string>
        </dict>
        <dict>
          <key>Arguments</key>
          <string>initrd=\initramfs-linux-fallback.img root=PARTUUID=d5d0fceb-c58e-c745-a7ff-f2f1b2824e66 rw debug add_efi_memmap</string>
          <key>Path</key>
          <string>\vmlinuz-linux</string>
          <key>Title</key>
          <string>Arch Linux Rescue Mode</string>
          <key>Type</key>
          <string>Linux</string>
          <key>Volume</key>
          <string>33BA6C23-4772-294D-9053-72A49FCAEF39</string>
          <key>VolumeType</key>
          <string>Internal</string>
        </dict>
      </array>
    </dict>
  </dict>
</dict>
</plist>

chainload systemd-boot

If you need a bootloader for BIOS systems that follows The Boot Loader Specification, then systemd-boot can be pressed into service on BIOS systems. This is the configuration file needed make Clover chainload systemd-boot.

/boot/efi/clover/config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Boot</key>
	<dict>
		<key>DefaultVolume</key>
		<string>EFI</string>
		<key>DefaultLoader</key>
		<string>\EFI\systemd\systemd-bootx64.efi</string>
		<key>Fast</key>
		<true/>
	</dict>
	<key>GUI</key>
	<dict>
		<key>Custom</key>
		<dict>
			<key>Entries</key>
			<array>
				<dict>
					<key>Hidden</key>
					<false/>
					<key>Disabled</key>
					<false/>
					<key>Image</key>
					<string>os_arch</string>
					<key>Volume</key>
					<string>EFI</string>
					<key>Path</key>
					<string>\EFI\systemd\systemd-bootx64.efi</string>
					<key>Title</key>
					<string>Arch Linux</string>
					<key>Type</key>
					<string>Linux</string>
				</dict>
			</array>
		</dict>
	</dict>
</dict>
</plist>

See also