X-Git-Url: https://code.delx.au/refind/blobdiff_plain/aa35c85cb9289e9c92f96811099b384aa44defd4..e366a10e438344bd1331f2de89d177079a91ba76:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index d58e38e..8497bf8 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -8,6 +8,8 @@ + +

The rEFInd Boot Manager:
Installing rEFInd

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

Originally written: 3/14/2012; last Web page update: -3/1/2015, referencing rEFInd 0.8.7

+9/19/2015, referencing rEFInd 0.9.2

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!

@@ -132,7 +134,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Don't be scared by the length of this page! Only portions of this page apply to any given user, and most people can install rEFInd from an RPM or Debian package in a matter of seconds or by using the install.sh script in minute or two.

-

Once you've obtained a rEFInd binary file, you must install it to your computer's EFI System Partition (ESP) (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. See the Contents sidebar to the left for links to specific installation procedures. For most Linux users, an RPM or Debian package is the best way to go. If your Linux system doesn't support these formats, though, or if you're running OS X, using the install.sh script can be a good way to go. If you're using Windows, you'll have to install manually.

+

Once you've obtained a rEFInd binary file, as described on the preceding page, you must install it to your computer's EFI System Partition (ESP) (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. See the Contents sidebar to the left for links to specific installation procedures. For most Linux users, an RPM or Debian package is the best way to go. If your Linux system doesn't support these formats, though, or if you're running OS X, using the install.sh script can be a good way to go. If you're using Windows, you'll have to install manually.

@@ -224,11 +226,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

I provide RPM and Debian package files for rEFInd; and starting with version 0.8.1, I'm maintaining an Ubuntu PPA for rEFInd. If you have a working RPM-based or Debian-based Linux installation that boots in EFI mode, using one of these files is likely to be the easiest way to install rEFInd: You need only download the file and issue an appropriate installation command. In some cases, double-clicking the package in your file manager will install it. If that doesn't work, a command like the following will install the RPM on an RPM-based system:

-
# rpm -Uvh refind-0.8.7-1.x86_64.rpm
+
# rpm -Uvh refind-0.9.2-1.x86_64.rpm

On a Debian-based system, the equivalent command is:

-
# dpkg -i refind_0.8.7-1_amd64.deb
+
# dpkg -i refind_0.9.2-1_amd64.deb

Either command produces output similar to that described for using the install.sh script, so you can check it for error messages and other signs of trouble. The package file installs rEFInd and registers it with the EFI to be the default boot loader. The script that runs as part of the installation process tries to determine if you're using Secure Boot, and if so it will try to configure rEFInd to launch using shim; however, this won't work correctly on all systems. Ubuntu 12.10 users who are booting with Secure Boot active should be wary, since the resulting installation will probably try to use Ubuntu's version of shim, which won't work correctly with rEFInd. The shim program provided with more recent versions of Ubuntu should work correctly.

@@ -256,6 +258,8 @@ $ sudo apt-get install refind

Quick install.sh Instructions

+ +

By default, the install.sh script installs rEFInd to your disk's ESP. Under Mac OS X, you can instead install rEFInd to your current OS X boot partition by passing the script the --notesp option, or to a non-boot HFS+ partition by using the --ownhfs devicefile option. Under either OS, you can install to something other than the currently-running OS by using the --root /mountpoint option. (See Table 1 for details.)

Under Linux, install.sh will be most reliable if your ESP is already mounted at /boot or /boot/efi, as described in more detail in the Installing rEFInd Manually Using Linux section. (If you installed Linux in EFI mode, chances are your ESP is properly mounted.) If your ESP is not so mounted, install.sh will attempt to locate and mount an ESP, but this action is not guaranteed to work correctly. If you run install.sh from a BIOS/legacy-mode boot, particularly on a computer that also runs Windows, you should be aware that the tricks the script uses to install itself from BIOS mode are rather delicate. You can convert to a more conventional configuration using the mvrefind.sh script after you've booted in EFI mode.

@@ -399,13 +403,21 @@ Unmounting install dir refind_linux.conf, though—for instance, to add dolvm to the boot options on Gentoo systems that use LVM. +
  • If you pass the --shim option to the script (along with a + filename for a shim binary), the script sets up for a Secure Boot + configuration via shim. By default, this causes the rEFInd binary to be + renamed as grubx64.efi. Recent versions of shim support + passing the name of the follow-on program to shim via a parameter, + though. If you want to use this feature, you can pass the + --keepname option to install.sh.
  • +

    In addition to these quirks, you should be aware of some options that install.sh supports to enable you to customize your installation in various ways. The syntax for install.sh is as follows:

     install.sh [--notesp | --usedefault device-file | --root mount-point | \
    -            --ownhfs device-file ] \
    +            --ownhfs device-file ] [--keepname ] \
                [--nodrivers | --alldrivers] [--shim shim-filename] [--localkeys] [--yes]
     
    @@ -442,12 +454,16 @@ install.sh [--notesp | --usedefault device-file | --ro --shim shim-filename or --preloader preloader-filename - If you pass this option to install.sh, the script will copy the specified shim program file to the target directory, copy the MokManager.efi file from the shim program file's directory to the target directory, copy the 64-bit version of rEFInd as grubx64.efi, and register shim with the firmware. (If you also specify --usedefault, the NVRAM registration is skipped.) When the target file is identified as PreLoader, much the same thing happens, but install.sh copies HashTool.efi instead of MokManager.efi and copies rEFInd as loader.efi rather than as grubx64.efi. The intent is to simplify rEFInd installation on a computer that uses Secure Boot; when so set up, rEFInd will boot in Secure Boot mode, with one caveat: The first time you boot, MokManager/HashTool will launch, and you must use it to locate and install a public key or register rEFInd as a trusted application. The rEFInd public key file will be located in the rEFInd directory's keys subdirectory under the name refind.cer. Note that I'm not providing a shim binary myself, but you can download one from here. Some distributions also provide their own shim programs, so can point to them—for instance, in /boot/efi/EFI/fedora/shim.efi. + If you pass this option to install.sh, the script will copy the specified shim program file to the target directory, copy the MokManager.efi file from the shim program file's directory to the target directory, copy the 64-bit version of rEFInd as grubx64.efi, and register shim with the firmware. (If you also specify --usedefault, the NVRAM registration is skipped. If you also use --keepname, the renaming to grubx64.efi is skipped.) When the target file is identified as PreLoader, much the same thing happens, but install.sh copies HashTool.efi instead of MokManager.efi and copies rEFInd as loader.efi rather than as grubx64.efi. The intent is to simplify rEFInd installation on a computer that uses Secure Boot; when so set up, rEFInd will boot in Secure Boot mode, with one caveat: The first time you boot, MokManager/HashTool will launch, and you must use it to locate and install a public key or register rEFInd as a trusted application. The rEFInd public key file will be located in the rEFInd directory's keys subdirectory under the name refind.cer. Note that I'm not providing a shim binary myself, but you can download one from here. Some distributions also provide their own shim programs, so can point to them—for instance, in /boot/efi/EFI/fedora/shim.efi. --localkeys This option tells install.sh to generate a new Machine Owner Key (MOK), store it in /etc/refind.d/keys as refind_local.*, and re-sign all the 64-bit rEFInd binaries with this key before installing them. This is the preferable way to install rEFInd in Secure Boot mode, since it means your binaries will be signed locally rather than with my own key, which is used to sign many other users' binaries; however, this method requires that both the openssl and sbsign binaries be installed. The former is readily available in most distributions' repositories, but the latter is not, so this option is not the default. + + --keepname + This option is useful only in conjunction with --shim. It tells install.sh to keep rEFInd's regular filename (typically refind_x64.efi) when used with shim, rather than rename the binary to grubx64.efi. This change cuts down on the chance of confusion because of filename issues; however, this feature requires that shim be launched with a command-line parameter that points to the rEFInd binary under its real name. versions of shim prior to 0.7 do not properly support this feature. (Version 0.4 supports it but with a buggy interpretation of the follow-on loader specification.) If your NVRAM variables become corrupted or are forgotten, this feature may make rEFInd harder to launch. This option is incompatible with --usedefault and is unavailable when run under OS X or without the --shim option. If the script discovers an existing rEFInd installation under EFI/BOOT or EFI/Microsoft/Boot and no other rEFInd installation when this option is used, it will abort. + --yes This option causes the script to assume a Y input to every yes/no prompt that can be generated under certain conditions, such as if you specify --shim but install.sh detects no evidence of a Secure Boot installation. This option is intended mainly for use by scripts such as those that might be used as part of an installation via an RPM or Debian package. @@ -495,7 +511,7 @@ Filesystem 1K-blocks Used Available Use% Mounted on -
  • On a UEFI-based system, type efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd to add rEFInd to your EFI's list of available boot loaders, which it stores in NVRAM. Adjust the path to the binary as required if you install somewhere else. You may also need to include additional options if your ESP isn't on /dev/sda1 or if your configuration is otherwise unusual; consult the efibootmgr man page for details. You may need to install this program on some systems; it's a standard part of most distributions' repositories. Also, if you're installing in Secure Boot mode, you must normally register shim.efi rather than the rEFInd binary, and rename refind_x64.efi to grubx64.efi.
  • +
  • On a UEFI-based system, type efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd to add rEFInd to your EFI's list of available boot loaders, which it stores in NVRAM. Adjust the path to the binary as required if you install somewhere else. You may also need to include additional options if your ESP isn't on /dev/sda1 or if your configuration is otherwise unusual; consult the efibootmgr man page for details. You may need to install this program on some systems; it's a standard part of most distributions' repositories. Also, if you're installing in Secure Boot mode, you must normally register shim.efi rather than the rEFInd binary, and rename refind_x64.efi to grubx64.efi. Shim 0.7 and later enables you to keep rEFInd's usual name by adding a -u "shim.efi refind_x64.efi" option to your efibootmgr command line, though. Change the filenames to the ones used by your actual Shim and rEFInd binaries, respectively.
  • If other boot loaders are already installed, you can use efibootmgr to adjust their boot order. For instance, efibootmgr -o 3,7,2 sets the firmware to try boot loader #3 first, followed by #7, followed by #2. (The program should have displayed a list of boot loaders when you added yours in the preceding step.) Place rEFInd's number first to set it as the default boot program.
  • @@ -510,6 +526,8 @@ Filesystem 1K-blocks Used Available Use% Mounted on

    Installing rEFInd Manually Using Mac OS X

    + +

    Before installing rEFInd on a Mac, you must determine whether it uses a 32-bit or 64-bit EFI implementation. Most Intel-based Macs have 64-bit EFIs, so you should use the refind_x64.efi file with them; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the refind_ia32.efi file. You can determine whether your Mac needs the x86-64 or IA32 build by typing the following command in a Mac Terminal window:

    @@ -610,6 +628,12 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
     
     
     
    +

    I know relatively little about Windows EFI management tools; however, I do know that at least two relevant tools exist: the standard bcdedit and the third-party EasyUEFI.

    + +

    The EasyUEFI tool is a free (as in beer) GUI tool for managing EFI boot programs. I've only tried it once, and it seemed fairly intuitive and easy to use, but I don't have detailed instructions on how to use it. If you want to use EasyUEFI, you'll have to use it in place of bcdedit at the end of the following procedure.

    + + +

    Attempt this method of installation only on a UEFI-based PC; this method will not work on Windows that's installed on a Mac in BIOS/CSM/legacy mode. To install rEFInd under Windows, you must first find a way to access the ESP, which Windows normally hides from view. One way to accomplish this goal, and to proceed forward once the ESP is accessible, is as follows:

      @@ -630,6 +654,8 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
    1. Type rename refind.conf-sample refind.conf to rename rEFInd's configuration file.
    2. + +
    3. Type bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi to set rEFInd as the default EFI boot program. Note that {bootmgr} is entered as such; that's not a notation for a variable. Also, change refind_x64.efi to refind_ia32.efi on systems with 32-bit EFIs. Such computers are rare, and most of them are tablets. Check your Windows bit depth to determine which binary you should use.
    4. If you like, type bcdedit /set {bootmgr} description "rEFInd description" to set a description (change rEFInd description as you see fit).