I'm rEFInd's maintainer.
This is a filesystem driver issue. For reasons I don't fully understand, some of rEFInd's filesystem drivers (especially the ext2_x64.efi
driver) are slow on some computers. I added a crude readahead cache to the driver code several years ago, and this helped a lot -- under VirtualBox, the speed improved from about a 3-minute load time to a few tens of seconds, IIRC. Some computers continue to have problems even with this cache, though.
The solution is to change to another filesystem. rEFInd's ext4fs driver is much faster than its ext2/3fs driver, and the Btrfs and ReiserFS drivers are faster still. (Note that the ext4fs driver can read ext2fs, but will provide little or no speed improvement that way; it needs to read an actual ext4 filesystem to provide a speed improvement.) In a worst-case scenario, you could use FAT, which requires no special driver (it's built into all EFIs); or on a Mac, you could use HFS+. (There's also an HFS+ driver that comes with rEFInd, so in principal you could use HFS+ even on a non-Mac PC, but there's little or no point to doing so.) Moving outside of a standard Linux filesystem is inadvisable, though. Ubuntu relies on symbolic links for some (but not all) kernel updates, making FAT a poor choice; and although HFS+ should work, it's not officially supported by Ubuntu. Even ReiserFS is not an option in the Ubuntu installer, so I'd steer clear of it for Ubuntu. That leaves ext4fs and Btrfs.
Switching is fairly straightforward, but not risk-free -- if you make a mistake, your system might be rendered unbootable. The bare-bones procedure is:
- Copy the new filesystem driver to the rEFInd
drivers
or drivers_x64
subdirectory (/boot/efi/EFI/refind/drivers
or /boot/efi/EFI/refind/drivers_x64
, probably). Removing the old ext2_x64.efi
file from that location will reduce rEFInd's load time by a second or so.
- Unmount the ESP (
/boot/efi
).
- Back up the
/boot
partition. You can use zip
, tar
, cp
, or some other file-level tool for this.
- Unmount
/boot
.
- Create a new filesystem on the
/boot
partition.
- Type
sudo blkid /dev/sda{x}
(changing /dev/sda{x}
to the identifier for your /boot
partition) to learn its new UUID value.
- Edit
/etc/fstab
to change the UUID value and filesystem type for the /boot
partition.
- Type
sudo mount -a
to mount the new /boot
partition. (It will likely complain that there's no /boot/efi
mount point. You can ignore this warning.)
- Restore the backed-up
/boot
files to the new /boot
filesystem.
At this point, you should be able to reboot and it will work better. A mistake, though, could cause the system to be unbootable. To reduce that risk, you can copy at least one working kernel, initrd file, and refind_linux.conf
from /boot
to /boot/efi
and test your ability to boot the kernel from the ESP before you begin. This will give you a fallback way of booting in case of a problem. If there are no problems, you can of course delete the kernel from the ESP once you're done.
For more on rEFInd's drivers, see its documentation on this subject:
http://www.rodsbooks.com/refind/drivers.html