]> code.delx.au - refind/blobdiff - docs/refind/secureboot.html
Made changes to fix some lintian issues
[refind] / docs / refind / secureboot.html
index 1def6325c30871f076e59e4825698e1441dca5cf..ef8b7c042f8f3bb49fc492b0ce26d5aef7a29e67 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 />Managing Secure Boot</h1>
 
@@ -15,7 +17,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 11/13/2012; last Web page update:
-3/1/2015, referencing rEFInd 0.8.7</p>
+11/8/2015, referencing rEFInd 0.10.0</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>
@@ -42,7 +44,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td>
 
@@ -57,7 +58,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td>
 
@@ -73,7 +73,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td>
 
@@ -88,7 +87,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td>
 
@@ -103,7 +101,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td>
 
@@ -117,7 +114,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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">
 </form>
 </td></tr>
 </table>
@@ -152,6 +148,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 </div>
 
+<p class="sidebar"><b>Note:</b> Macs don't (yet?) support Secure Boot, but
+as of version 10.11 ("El Capitan"), OS X uses its own new security feature,
+<i>System Integrity Protection (SIP),</i> which creates its own set of
+hoops through which rEFInd users must jump. See the <a
+href="sip.html">rEFInd and System Integrity Protection</a> page for
+details.</p>
+
 <p>If you're using a computer that supports Secure Boot, you may run into extra complications. This feature is intended to make it difficult for malware to insert itself early into the computer's boot process. Unfortunately, it also complicates multi-boot configurations such as those that rEFInd is intended to manage. This page describes some <a href="#basic">Secure Boot basics</a> and two specific ways of using rEFInd with Secure Boot: <a href="#shim">Using the Shim program</a> and <a href="#preloader">using the PreLoader program.</a> (My separate <a href="http://www.rodsbooks.com/efi-bootloaders/secureboot.html">EFI Boot Loaders for Linux page on Secure Boot</a> covers the additional topics of disabling Secure Boot and adding keys to the firmware's own set of keys.) This page concludes with a look at <a href="#caveats">known bugs and limitations</a> in rEFInd's Secure Boot features.</p>
 
 <a name="basic">
@@ -226,7 +229,7 @@ Windows 8, this isn't an option for it. Unfortunately, the Shim and PreLoader pr
 <h3>Installing Shim and rEFInd</h3>
 </a>
 
-<p class="sidebar"><b>Note:</b> rEFInd's <tt>install.sh</tt> script attempts to identify whether your computer was booted with Secure Boot active and, if it was, to locate existing Shim binaries and make use of whatever it finds. Thus, you may not need to explicitly set up Shim after you install rEFInd, although you will probably have to enroll rEFInd's key in your MOK list, as described shortly.</p>
+<p class="sidebar"><b>Note:</b> rEFInd's <tt>refind-install</tt> script attempts to identify whether your computer was booted with Secure Boot active and, if it was, to locate existing Shim binaries and make use of whatever it finds. Thus, you may not need to explicitly set up Shim after you install rEFInd, although you will probably have to enroll rEFInd's key in your MOK list, as described shortly.</p>
 
 <p>A working Secure Boot installation of rEFInd involves at least three programs, and probably four or more, each of which must be installed in a specific way:</p>
 
@@ -242,7 +245,7 @@ Windows 8, this isn't an option for it. Unfortunately, the Shim and PreLoader pr
 
 </ul>
 
-<p>If you've installed a distribution that provides Shim and can boot it with Secure Boot active, and if you then install rEFInd using the RPM file that I provide or by running <tt>install.sh</tt>, chances are you'll end up with a working rEFInd that will start up the first time, with one caveat: You'll have to use MokManager to add rEFInd's MOK to your MOK list, as described shortly. If you don't already have a working copy of Shim on your ESP, your task is more complex. Broadly speaking, the procedure should be something like this:</p>
+<p>If you've installed a distribution that provides Shim and can boot it with Secure Boot active, and if you then install rEFInd using the RPM file that I provide or by running <tt>refind-install</tt>, chances are you'll end up with a working rEFInd that will start up the first time, with one caveat: You'll have to use MokManager to add rEFInd's MOK to your MOK list, as described shortly. If you don't already have a working copy of Shim on your ESP, your task is more complex. Broadly speaking, the procedure should be something like this:</p>
 
 <ol>
 
@@ -260,19 +263,24 @@ Windows 8, this isn't an option for it. Unfortunately, the Shim and PreLoader pr
     version, though; as noted earlier, it's inadequate for use with
     rEFInd.)</li>
 
-<p class="sidebar"><b>Tip:</b> If you're running Linux, you can save some effort by using the <tt>install.sh</tt> script with its <tt>--shim <tt class="variable">/path/to/shim.efi</tt></tt> option rather than installing manually, as in steps 4&ndash;6 of this procedure. If you've installed <tt>openssl</tt> and <tt>sbsign</tt>, using <tt>--localkeys</tt> will generate local signing keys and re-sign the rEFInd binaries with your own key, too. You can then use <tt>sbsign</tt> and the keys in <tt>/etc/refind.d/keys</tt> to sign your kernels or boot loaders.</p>
+<p class="sidebar"><b>Tip:</b> If you're running Linux, you can save some effort by using the <tt>refind-install</tt> script with its <tt>--shim <tt class="variable">/path/to/shim.efi</tt></tt> option rather than installing manually, as in steps 4&ndash;6 of this procedure. If you've installed <tt>openssl</tt> and <tt>sbsign</tt>, using <tt>--localkeys</tt> will generate local signing keys and re-sign the rEFInd binaries with your own key, too. You can then use <tt>sbsign</tt> and the keys in <tt>/etc/refind.d/keys</tt> to sign your kernels or boot loaders.</p>
 
 <li>Copy the <tt>shim.efi</tt> and <tt>MokManager.efi</tt> binaries to the
     directory you intend to use for rEFInd&mdash;for instance,
     <tt>EFI/refind</tt> on the ESP.</li>
 
 <li>Follow the installation instructions for rEFInd on the <a
-    href="installing.html">Installing rEFInd</a> page; however, give rEFInd
-    the filename <tt>grubx64.efi</tt> and register <tt>shim.efi</tt> with
-    the EFI by using <tt>efibootmgr</tt> in Linux or <tt>bcdedit</tt> in
-    Windows. Be sure that rEFInd (as <tt>grubx64.efi</tt>),
-    <tt>shim.efi</tt>, and <tt>MokManager.efi</tt> all reside in the same
-    directory.</li>
+    href="installing.html">Installing rEFInd</a> page; however, you should
+    normally give rEFInd the filename <tt>grubx64.efi</tt> and register
+    <tt>shim.efi</tt> with the EFI by using <tt>efibootmgr</tt> in Linux or
+    <tt>bcdedit</tt> in Windows. Be sure that rEFInd (as
+    <tt>grubx64.efi</tt>), <tt>shim.efi</tt>, and <tt>MokManager.efi</tt>
+    all reside in the same directory. If you're using Shim 0.7 or later and
+    installing it under Linux, you may optionally keep rEFInd's
+    <tt>refind_x64.efi</tt> name; but you must then tell Shim to use rEFInd
+    by passing an additional <tt>-u "shim.efi refind_x64.efi"</tt> option
+    to <tt>efibootmgr</tt>. Change the filenames to the actual filenames
+    used by Shim and rEFInd, respectively.</li>
 
 <li>Copy the <tt>refind.cer</tt> file from the rEFInd package to your ESP,
     ideally to a location with few other files. (The rEFInd installation
@@ -326,7 +334,7 @@ Windows 8, this isn't an option for it. Unfortunately, the Shim and PreLoader pr
 <h3>Managing Your MOKs</h3>
 </a>
 
-<p>The preceding instructions provided the basics of getting rEFInd up and running, including using MokManager to enroll a MOK on your computer. If you need to sign binaries, though, you'll have to use additional tools. The OpenSSL package provides the cryptographic tools necessary, but actually signing EFI binaries requires additional software. Two packages for this are available: <tt>sbsigntool</tt> and <tt>pesign</tt>. Both are available in binary form from <a href="https://build.opensuse.org/project/show?project=home%3Ajejb1%3AUEFI">this OpenSUSE Build Service (OBS)</a> repository, and many distributions ship with at least one of them. The following procedure uses <tt>sbsigntool</tt>. To sign your own binaries, follow these steps (you can skip the first five steps if you've successfully used <tt>install.sh</tt>'s <tt>--localkeys</tt> option):</p>
+<p>The preceding instructions provided the basics of getting rEFInd up and running, including using MokManager to enroll a MOK on your computer. If you need to sign binaries, though, you'll have to use additional tools. The OpenSSL package provides the cryptographic tools necessary, but actually signing EFI binaries requires additional software. Two packages for this are available: <tt>sbsigntool</tt> and <tt>pesign</tt>. Both are available in binary form from <a href="https://build.opensuse.org/project/show?project=home%3Ajejb1%3AUEFI">this OpenSUSE Build Service (OBS)</a> repository, and many distributions ship with at least one of them. The following procedure uses <tt>sbsigntool</tt>. To sign your own binaries, follow these steps (you can skip the first five steps if you've successfully used <tt>refind-install</tt>'s <tt>--localkeys</tt> option):</p>
 
 <ol>
 
@@ -334,8 +342,8 @@ Windows 8, this isn't an option for it. Unfortunately, the Shim and PreLoader pr
     normally comes in a package called <tt>openssl</tt>.)</li>
 
 <li>If you did <i>not</i> re-sign your rEFInd binaries with
-    <tt>install.sh</tt>'s <tt>--localkeys</tt> option, type the following
-    two commands to generate your public and private keys:
+    <tt>refind-install</tt>'s <tt>--localkeys</tt> option, type the
+    following two commands to generate your public and private keys:
 
 <pre class="listing">
 $ <tt class="userinput">openssl req -new -x509 -newkey rsa:2048 -keyout refind_local.key \
@@ -355,7 +363,7 @@ $ <tt class="userinput">openssl x509 -in refind_local.crt -out refind_local.cer
     are equivalent, but are used by different
     tools&mdash;<tt>sbsigntool</tt> uses <tt>refind_local.crt</tt> to sign
     binaries, but MokManager uses <tt>refind_local.cer</tt> to enroll the
-    key. If you used <tt>install.sh</tt>'s <tt>--localkeys</tt> option,
+    key. If you used <tt>refind-install</tt>'s <tt>--localkeys</tt> option,
     this step is unnecessary, since these keys have already been created
     and are stored in <tt>/etc/refind.d/keys/</tt>.</li>