X-Git-Url: https://code.delx.au/refind/blobdiff_plain/0d4453f9c0401fd1e434e3dab4185627585a9c6b..HEAD:/docs/refind/drivers.html diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index d406ebd..5fb8a72 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -8,6 +8,8 @@ + +

The rEFInd Boot Manager:
Using EFI Drivers

@@ -15,7 +17,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 4/19/2012; last Web page update: -4/20/2014, referencing rEFInd 0.7.9

+3/4/2017, referencing rEFInd 0.10.5

This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

@@ -41,8 +43,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -56,8 +57,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -72,8 +72,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -87,8 +86,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -102,8 +100,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -116,8 +113,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

- -Donate with PayPal + @@ -142,7 +138,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Why Should You Use Drivers?
  • -
  • Using rEFInd's EFI Drivers
  • +
  • Installing rEFInd's EFI Drivers
  • + +
  • Selecting an EFI Driver
  • Finding Additional Drivers
  • @@ -163,7 +161,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    -
  • You can load a filesystem driver to gain access to files on a filesystem other than FAT (or HFS+ on Macs or ISO-9660 on some systems). This is most likely to be useful on a Linux installation, since a filesystem driver can enable you to store a Linux kernel with EFI stub loader or for use by ELILO on a Linux-native filesystem if your ESP is getting crowded.
  • +
  • You can load a filesystem driver to gain access to files on a filesystem other than FAT (or HFS+ on Macs or ISO-9660 on some systems). This is most likely to be useful on a Linux installation, since a filesystem driver can enable you to store a Linux kernel with EFI stub loader or for use by ELILO on a Linux-native filesystem if your EFI System Partition (ESP) is getting crowded.
  • You can load a driver for a plug-in disk controller to give the EFI access to its disks. Note that this is not required if you place your boot loader (and perhaps your OS kernel) on another disk, or if the plug-in disk controller includes EFI-capable firmware. It could be handy, perhaps in conjunction with a filesystem driver, to enable the EFI to read a boot loader or kernel from a disk on a plug-in controller, though.
  • @@ -179,64 +177,114 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    As a side note, using an ISO-9660 driver can theoretically help you keep the size of a custom Linux boot CD/DVD down to a reasonable value. This is because EFI systems normally boot from optical discs by reading a FAT image file in El Torito format and treating that file as an ESP. If you need to store the kernel both in that file and directly in the ISO-9660 filesystem (to maintain bootability on BIOS systems), that can represent an unwanted extra space requirement. Placing rEFInd and an ISO-9660 driver in the FAT image file should enable you to store the kernel on the disc only once. Unfortunately, this doesn't work in practice. When the ISO-9660 driver is loaded from the El Torito image, the driver discovers that the optical disc is in use and refuses to access it. It's possible to use EFI shell commands to give the ISO-9660 driver access to the shell device, but this causes the El Torito access to go away, which means that anything loaded from the El Torito image (such as rEFInd) is likely to malfunction. Also, some EFI implementations include ISO-9660 drivers, so you might not need a separate ISO-9660 driver if you're building a disc for a particular computer.

    - -

    Using rEFInd's EFI Drivers

    +
    +

    Installing rEFInd's EFI Drivers

    +

    If you install rEFInd via the refind-install script or by installing an RPM or Debian package in a Linux distribution, the script should install the driver that matches the filesystem on which your kernels are stored automatically, with a couple of important caveats:

    + + + +

    rEFInd's filesystem drivers reside in the refind/drivers_arch subdirectory of the rEFInd .zip file, where arch is a CPU architecture code, such as x64 or ia32. If you installed rEFInd using an RPM or Debian package, chances are the relevant files will be stored in /usr/share/refind/refind/drivers_x64/ or a similar location. You can type find /usr/share/ -name "ext4*" to find the exact location, or use your package manager to list all the files installed from the refind package. The files are named after the filesystems they handle, such as ext4_x64.efi for the x86-64 ext4fs driver. You should copy the files for the filesystems you want to use to (You may need to create this subdirectory.)

    + +

    To install a driver, you must copy it from the package .zip file or from where the rEFInd RPM or Debian package placed it to the drivers or drivers_arch subdirectory of the main rEFInd installation directory. The main rEFInd directory is usually either EFI/refind or EFI/BOOT on the EFI System Partition (ESP). How to identify and access the ESP varies from one OS to another:

    + +

    Be careful to install drivers only for your own architecture. Attempting to load drivers for the wrong CPU type will cause a small delay at best, or may cause the computer to crash at worst. I've placed rEFInd's drivers in directories that are named to minimize this risk, but you should exercise care when copying driver files.

    + + + +

    When you reboot after installing drivers, rEFInd should automatically detect and use the drivers you install. There's likely to be an extra delay, typically from one to five seconds, as rEFInd loads the drivers and tells the EFI to detect the filesystems they handle. For this reason, and because of the possibility of drivers harboring bugs, I recommend installing only those drivers that you need. If you like, you can install drivers you don't plan on using to some other directory, such as /drivers on the ESP's root. You can then load these drivers manually with the EFI shell's load command if the need arises in the future. You can then tell the shell to re-assign drive identifiers with map -r:

    + +
    +fs0: load btrfs_x64.efi
    +fs0: map -r
    +
    + + +

    Selecting an EFI Driver

    +
    -
  • Ext2fs—This driver also originated with rEFIt. It can be - used in the same way as the ReiserFS driver. Although it's called an - "ext2fs" driver, it also works with ext3fs.
  • + + +

    Since version 0.4.0, rEFInd has shipped with a small collection of read-only EFI filesystem drivers. These are:

    + +

    All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer.

    - - -

    If you want to use one or more of these drivers, you can install them from the rEFInd binary package from the refind/drivers_arch directory, where arch is a CPU architecture code—x64 or ia32. The files are named after the filesystems they handle, such as ext4_x64.efi for the 64-bit ext4fs driver. You should copy the files for the filesystems you want to use to the drivers or drivers_arch subdirectory of the main rEFInd installation directory. (You may need to create this subdirectory.) Be careful to install drivers only for your own architecture. Attempting to load drivers for the wrong CPU type will cause a small delay at best, or may cause the computer to crash at worst. I've placed rEFInd's drivers in directories that are named to minimize this risk, but you should exercise care when copying driver files.

    - - - -

    When you reboot after installing drivers, rEFInd should automatically detect and use the drivers you install. There's likely to be an extra delay, typically from one to five seconds, as rEFInd loads the drivers and tells the EFI to detect the filesystems they handle. For this reason, and because of the possibility of drivers harboring bugs, I recommend installing only those drivers that you need. If you like, you can install drivers you don't plan on using to some other directory, such as /drivers on the ESP's root. You can then load these drivers manually with the EFI shell's load command if the need arises in the future. You can then tell the shell to re-assign drive identifiers with map -r:

    - -
    -fs0: load reiserfs_x64.efi
    -fs0: map -r
    -
    +

    Although Linux filesystems are all case-sensitive, these drivers treat them in a case-insensitive way. Symbolic links work; however, rEFInd 0.6.11 and later ignore symbolic links, since many distributions use them in a way that creates redundant or non-functional entries in the rEFInd menu. You should be able to use hard links if you want to use a single kernel file in multiple ways (say for two distributions).

    Finding Additional EFI Drivers

    -

    As already noted, I know of no EFI drivers for EFI hardware, aside from those that are built into motherboards' EFI implementations. I do, however, know of a few EFI filesystem drivers, in addition to those provided with rEFInd:

    +

    As already noted, I know of few EFI drivers for EFI hardware, aside from those that are built into motherboards' EFI implementations. I do, however, know of a few EFI filesystem drivers, in addition to those provided with rEFInd:

    -

    Most of these cross-project drivers appear to be related, and most of them have fed into rEFInd's drivers. I used the Clover package, which in turn was based on the VirtualBox drivers, as a starting point. Everybody else has dropped rEFIt's original ReiserFS driver, but I added that back. Of these drivers, only the Clover EFI Tools NTFS driver is missing from rEFInd. Specific versions can have their own quirks, though. For instance, the Clover (and I suspect VirtualBox) drivers don't return volume labels, which causes rEFInd to display loaders on those volumes as being on a disk called Unknown. (I fixed that bug for rEFInd's version, and it wasn't present in the original rEFIt drivers.) Most of these drivers also suffer from speed problems on some computers. This is worst with the ext2fs drivers under VirtualBox; on my main computer, that combination takes 3 minutes to load a Linux kernel and initial RAM disk file! Most real computers don't suffer nearly so badly, but some can take an extra five seconds or so to boot a kernel. I've fixed the speed problems in rEFInd's drivers as of version 0.7.0.

    +

    The rEFIt, Clover, and VirtualBox drivers are related, and all of them +have fed into rEFInd's drivers. Specific versions can have their own +quirks, though. For instance, the Clover (and I suspect VirtualBox) drivers +don't return volume labels, which causes rEFInd to display loaders on those +volumes as being on a disk called Unknown. (I fixed that bug for +rEFInd's version, and it wasn't present in the original rEFIt drivers.) +Most of these drivers also suffer from speed problems on some computers. +This is worst with the ext2fs drivers under VirtualBox; on my main +computer, that combination takes 3 minutes to load a Linux kernel and +initial RAM disk file! Most real computers don't suffer nearly so badly, +but some can take an extra five seconds or so to boot a kernel. I've fixed +the worst of the speed problems in rEFInd's drivers as of version 0.7.0; however, I still see occasional reports of speed problems on specific computers.

    + +

    Although I know of no readily-available hardware drivers, I do know of a couple of non-hardware non-filesystem drivers:

    -

    Driver availability could increase in the future. Source code to a wide variety of filesystems is available in GRUB Legacy, GRUB 2, Linux, various BSD kernels, and in other projects. Sooner or later somebody's likely to begin porting those drivers to EFI. If you do so, or if you know of additional EFI drivers, please tell me about it, so I can share the information here. Likewise if you know of a source for other EFI drivers—say, for a video card or disk controller card.

    + -

    I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) The Btrfs driver is the newest of the lot, and so I've tested it the least, but it's worked for me on two test systems. Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux /boot partition; however, if you're willing to use ext3fs, ext4fs, Btrfs, or ReiserFS on your root (/) filesystem, you can use the EFI drivers to read your kernel from it. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.

    +

    Both of these drivers are useful mainly for developers.

    -

    As noted earlier, rEFInd's drivers prior to version 0.7.0, as well as related drivers from rEFIt, Clover, and VirtualBox, suffer from speed problems. These problems are mostly minor, adding a second or two to boot times; but on some computers, the speed problems can be dramatic, boosting kernel-load times up to as much as three minutes (under VirtualBox). If you run into excessive boot times with such a driver, try switching to the latest rEFInd driver instead.

    + + +

    Driver availability could increase in the future. If you know of +additional EFI drivers, please tell +me about them, so I can share the information here. Likewise if you +know of a source for other EFI drivers—say, for a video card or disk +controller card.

    -

    Although ext2fs, ext3fs, ext4fs, and ReiserFS are all case-sensitive, these drivers treat them in a case-insensitive way. Symbolic links work; however, rEFInd 0.6.11 and later ignore symbolic links, since many distributions use them in a way that creates redundant or non-functional entries in the rEFInd menu. You should be able to use hard links if you want to use a single kernel file in multiple ways (say for two distributions).

    +

    Once you've obtained an EFI driver, you can install it in rEFInd just as you would install rEFInd's own drivers, as described earlier.


    -

    copyright © 2012–2014 by Roderick W. Smith

    +

    copyright © 2012–2017 by Roderick W. Smith

    This document is licensed under the terms of the GNU Free Documentation License (FDL), version 1.3.