]> code.delx.au - refind/blobdiff - docs/refind/drivers.html
Documentation update
[refind] / docs / refind / drivers.html
index 178906aa51f42311b61a5a1e7364c29cdb02caeb..7dc23119e4c861f57ab433f58799d8fb52f37dc0 100644 (file)
@@ -8,6 +8,8 @@
   <link href="../Styles/styles.css" rel="stylesheet" type="text/css" />
 </head>
 
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
 <body>
   <h1>The rEFInd Boot Manager:<br />Using EFI Drivers</h1>
 
@@ -15,7 +17,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-2/8/2015, referencing rEFInd 0.8.6</p>
+4/24/2016, referencing rEFInd 0.10.3</p>
 
 
 <p>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!</p>
@@ -41,8 +43,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="amount" value="1.00">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td>
 
@@ -56,8 +57,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="amount" value="2.50">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td>
 
@@ -72,8 +72,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="amount" value="5.00">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td>
 
@@ -87,8 +86,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="amount" value="10.00">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td>
 
@@ -102,8 +100,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="amount" value="20.00">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td>
 
@@ -116,8 +113,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <input type="hidden" name="currency_code" value="USD">
 <input type="hidden" name="item_name" value="rEFInd Boot Manager">
 <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest">
-<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
-<img alt="Donate with PayPal" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+<input type="image" src="donate.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 </form>
 </td></tr>
 </table>
@@ -189,19 +185,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
-<li><b>ReiserFS</b>&mdash;This driver originated with rEFIt. It's useful
+<li><b>Ext2fs</b>&mdash;This driver originated with rEFIt. It's useful
     for reading Linux kernels from a separate <tt>/boot</tt> partition, or
-    even from a root (<tt>/</tt>) filesystem, if you use ReiserFS on it.
-    <b>Caution:</b> If you use this driver, you should use the
-    <tt>notail</tt> option in Linux's <tt>/etc/fstab</tt> file for the
-    partition(s) you want the EFI to read. This is because the driver
-    doesn't properly handle ReiserFS's "tail-packing" feature, so files can
-    seem to be corrupted in EFI if you use this feature, which is disabled
-    by <tt>notail</tt>.</li>
-
-<li><b>Ext2fs</b>&mdash;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.</li>
+    even from a root (<tt>/</tt>) filesystem, if you use ext2fs on it.
+    Although it's called an "ext2fs" driver, it also works with ext3fs.</li>
 
 <li><b>Ext4fs</b>&mdash;Stefan Agner <a
     href="https://github.com/falstaff84/rEFInd">modified the rEFIt/rEFInd
@@ -221,22 +208,34 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     changing <tt class="userinput"><i>/dev/sda2</i></tt> to your
     filesystem's device.</li>
 
+<li><b>ReiserFS</b>&mdash;This driver originated with rEFIt. It can be used
+    in the same way as the ext2fs and ext4fs drivers. <b>Caution:</b> If you
+    use this driver, you should use the <tt>notail</tt> option in Linux's
+    <tt>/etc/fstab</tt> file for the partition(s) you want the EFI to read.
+    This is because the driver doesn't properly handle ReiserFS's
+    "tail-packing" feature, so files can seem to be corrupted in EFI if you
+    use this feature, which is disabled by <tt>notail</tt>.</li>
+
 <li><b>Btrfs</b>&mdash;</b>Samuel Liao contributed this driver, which is
     based on the rEFIt/rEFInd driver framework and algorithms from the GRUB
-    2.0 Btrfs driver. I've tested this driver with a simple one-partition
-    filesystem and with a filesystem that spans two physical devices
-    (although I've made no attempt to ensure that the driver can actually
-    read files written to both devices). Lamuel Liao has used the driver
-    with a compressed Btrfs volume. The driver will handle subvolumes, but
-    you may need to add kernel options if you're booting a Linux kernel
-    directly from a filesystem that uses subvolumes. For instance, on a
-    test installation of Ubuntu 14.04 alpha on such a system, I needed to
-    set <tt>also_scan_dirs + @/boot</tt> in <tt>refind.conf</tt> and add
-    <tt>rootflags=subvol=@</tt> to the kernel options in my
-    <tt>refind_linux.conf</tt> file. Without the first of these options,
-    rEFInd could not locate my kernel; and without the second, the boot
-    failed with a message to the effect that the initial RAM disk could not
-    find <tt>/sbin/init</tt>.</li>
+    2.0 Btrfs driver. I've tested this driver with simple one-partition
+    filesystems on several installations, and with a filesystem that spans
+    two physical devices on one (although I've made no attempt to ensure
+    that the driver can actually read files written to both devices). Samuel
+    Liao has used the driver with a compressed Btrfs volume. The driver will
+    handle subvolumes, but you may need to add kernel options if you're
+    booting a Linux kernel directly from a filesystem that uses subvolumes.
+    For instance, when booting Ubuntu from Btrfs, <tt>also_scan_dirs +
+    @/boot</tt> must be set in <tt>refind.conf</tt> and
+    <tt>rootflags=subvol=@</tt> must be added to the kernel options in
+    <tt>refind_linux.conf</tt>. Without the first of these options, rEFInd
+    can not locate the kernel; and without the second, the boot fails with a
+    message to the effect that the initial RAM disk could not find
+    <tt>/sbin/init</tt>. rEFInd 0.10.0 adds <tt>@/boot</tt> as a standard
+    option to <tt>also_scan_dirs</tt>, and its <tt>refind-install</tt> and
+    <tt>mkrlconf</tt> scripts should pick up the root flags, assuming the
+    system is booted into the regular installation. These additions make it
+    easier to set up rEFInd to work with Btrfs.</li>
 
 <li><b>ISO-9660</b>&mdash;This driver originated with rEFIt's author, but
     he never released a final version. Its code was improved by Oracle for
@@ -247,25 +246,31 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     one can be helpful; however, you may need to install it on your hard
     disk before you can read an optical disc.</li>
 
-<li><b>HFS+</b>&mdash;Oracle seems to have written this driver, apparently
-    with some code taken from open source Apple examples. It was then
-    further modified by the Clover authors. I expect this driver to have
-    limited appeal to most rEFInd users. Macs don't need it, since Apple's EFI
-    implementation provides its own HFS+ driver, and HFS+ isn't normally
-    used on UEFI-based PCs. Some CDs are mastered with both ISO-9660 and
-    HFS+, or even with HFS+ alone, and it's conceivable that an HFS+ driver
-    would be useful when accessing such discs. I'm providing the driver
-    mainly because it compiled cleanly with no extra work, aside from
-    providing a Makefile entry for it.</li>
+<li><b>HFS+</b>&mdash;Oracle wrote this driver, apparently with some code
+    taken from open source Apple examples. It was then further modified by
+    the Clover authors. I expect this driver to have limited appeal to most
+    rEFInd users. Macs don't need it, since Apple's EFI implementation
+    provides its own HFS+ driver, and HFS+ isn't normally used on
+    UEFI-based PCs. Some CDs are mastered with both ISO-9660 and HFS+, or
+    even with HFS+ alone, and it's conceivable that an HFS+ driver would be
+    useful when accessing such discs. Also, one unusual feature of this
+    driver is that it can read files from within an Apple LVM setup, which
+    Apple's own EFI HFS+ driver can't do. The upshot of this feature is
+    that if you load this driver on a Mac that uses Apple's LVM, rEFInd is
+    likely to show two OS X boot options. Ordinarily this is pointless, but
+    it could be helpful if your Recovery HD volume becomes damaged. I'm
+    providing the driver mainly because it compiled cleanly with no extra
+    work, aside from providing a Makefile entry for it.</li>
+
+<p class="sidebar"><b>Warning:</b> I've received multiple reports of system hangs when using the NTFS driver; however, I've been unable to replicate the problem. (The problem is probably triggered either by interactions with specific EFIs or by unique features of the "problem" NTFS volumes.) I therefore recommend avoiding the NTFS driver unless it's absolutely necessary. I've added a couple of checks to the driver code in rEFInd 0.9.1 that <i>may</i> fix this problem, but these checks may also have no effect.</p>
 
 <li><b>NTFS</b>&mdash;Samuel Liao contributed this driver, which uses the
-    rEFIt/rEFInd driver framework. My own testing of it is limited, but it
-    does work for me. Note that this driver is <i><b>not</b></i> required
-    to boot Windows with rEFInd, since Windows stores its EFI boot loader
-    on the (FAT) ESP, and the BIOS boot process (generally used when
-    dual-booting on a Mac) relies only on the partition's boot sector,
-    which is read without the benefit of this driver. Reasons to use this
-    driver include:
+    rEFIt/rEFInd driver framework. Note that this driver is
+    <i><b>not</b></i> required to boot Windows with rEFInd, since Windows
+    stores its EFI boot loader on the (FAT) ESP, and the BIOS boot process
+    (generally used when dual-booting on a Mac) relies only on the
+    partition's boot sector, which is read without the benefit of this
+    driver. Reasons to use this driver include:
     <ul>
     <li>If you want to store large boot files to be read from EFI, such as
         RAM disk images, from Windows.</li>
@@ -280,7 +285,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer.</p>
 
-<p class="sidebar"><b>Note:</b> rEFInd's <tt>install.sh</tt> script, when run from Linux, installs the driver required to read the <tt>/boot</tt> directory. Under OS X, the <tt>install.sh</tt> script installs the ext4fs driver if the script detects a Linux partition&mdash;but you might need to change this driver if you use another filesystem. The script installs all the available drivers if you pass it the <tt>--alldrivers</tt> option. (I do <i>not</i> recommend using this feature except for creating general-purpose USB flash drives with rEFInd, since having too many drivers can cause various problems.) See the <a href="installing.html">Installing rEFInd</a> page for details.</p>
+<p class="sidebar"><b>Note:</b> rEFInd's <tt>refind-install</tt> script, when run from Linux, installs the driver required to read the <tt>/boot</tt> directory. Under OS X, the <tt>refind-install</tt> script installs the ext4fs driver if the script detects a Linux partition&mdash;but you might need to change this driver if you use another filesystem. The script installs all the available drivers if you pass it the <tt>--alldrivers</tt> option. (I do <i>not</i> recommend using this feature except for creating general-purpose USB flash drives with rEFInd, since having too many drivers can cause various problems.) See the <a href="installing.html">Installing rEFInd</a> page for details.</p>
 
 <p>If you want to use one or more of these drivers, you can install them from the rEFInd binary package from the <tt>refind/drivers_<tt class="variable">arch</tt></tt> directory, where <tt class="variable">arch</tt> is a CPU architecture code&mdash;<tt>x64</tt> or <tt>ia32</tt>. The files are named after the filesystems they handle, such as <tt>ext4_x64.efi</tt> for the 64-bit ext4fs driver. You should copy the files for the filesystems you want to use to the <tt>drivers</tt> or <tt>drivers_<tt class="variable">arch</tt></tt> 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.</p>
 
@@ -289,7 +294,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <p>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 <tt>/drivers</tt> on the ESP's root. You can then load these drivers manually with the EFI shell's <tt>load</tt> command if the need arises in the future. You can then tell the shell to re-assign drive identifiers with <tt>map -r</tt>:</p>
 
 <pre class="listing">
-fs0: <tt class="userinput">load reiserfs_x64.efi</tt>
+fs0: <tt class="userinput">load btrfs_x64.efi</tt>
 fs0: <tt class="userinput">map -r</tt>
 </pre>
 
@@ -330,6 +335,20 @@ 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.</p>
 
+<p>Although I know of no readily-available hardware drivers, I do know of a couple of non-hardware non-filesystem drivers:</p>
+
+<ul>
+
+<li><a href="https://github.com/NikolajSchlej/CrScreenshotDxe"><b>CrScreenshot</b></a>&mdash;This driver adds a screenshot capability to any EFI. Note that it's available only as source code that requires the Tianocore EDK2 to build. I have not tested it. (Note also that rEFInd provides its own screen shot capability; pressing F10 takes a screen shot within rEFInd.)</li>
+
+<li><a href="https://github.com/rcpao-enmotus/RamDiskPkg"><b>RamDiskPkg</a></b>&mdash;This is a rudimentary RAM disk driver. It must be compiled with a RAM disk image; the resulting binary is hard-coded with a fixed RAM disk image. It's therefore useful mostly for developers.</li>
+
+</ul>
+
+<p>Both of these drivers are useful mainly for developers.</p>
+
+</ul>
+
 <p>Driver availability could increase in the future. If you know of
 additional EFI drivers, please <a href="mailto:rodsmith@rodsbooks.com">tell
 me about them,</a> so I can share the information here. Likewise if you
@@ -342,6 +361,8 @@ controller card.</p>
 <h2>Notes on Specific Drivers</h2>
 </a>
 
+<p class="sidebar"><b>Warning:</b> When compiled with GNU-EFI, rEFInd's drivers hang when run on my 32-bit Mac Mini. The TianoCore-compiled versions are fine, and the GNU-EFI-built binaries are fine on a 32-bit VirtualBox. The 64-bit GNU-EFI-built versions are fine on a MacBook Pro. Thus, the problem is very limited in scope. The problem can be quite serious if you run into it, though, since you must bypass rEFInd to boot the computer. In debugging the problem, I found that a key funtion was being entered mid-function, which suggests either an EFI bug or a problem with the compiler or related tools. In any event, the solution is simple: Use driver binaries built with TianoCore if you have a 32-bit Mac.</p>
+
 <p>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&mdash;but Agner's derivative ext4fs
@@ -368,7 +389,7 @@ ways.</p>
 
 <hr />
 
-<p>copyright &copy; 2012&ndash;2015 by Roderick W. Smith</p>
+<p>copyright &copy; 2012&ndash;2016 by Roderick W. Smith</p>
 
 <p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>