X-Git-Url: https://code.delx.au/refind/blobdiff_plain/2eb4a9ca3c35a44bb35b7a0998ff036797a8580e..65eb839a6d8d68a439056473a0d3728dfd39d2c4:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index ee18e52..0b28864 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -11,10 +11,11 @@

The rEFInd Boot Manager:
Installing rEFInd

-

by Roderick W. Smith, by Roderick W. Smith, rodsmith@rodsbooks.com

-

Originally written: 3/14/2012; last Web page update: 4/24/2012, referencing rEFInd 0.3.0

+

Originally written: 3/14/2012; last Web page update: +5/20/2012, referencing rEFInd 0.4.0

I'm a technical writer and consultant specializing in Linux technologies. 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!

@@ -91,21 +92,97 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

-

Once you've uncompressed a rEFInd binary zip file, you can copy the entire refind directory into your EFI System Partition's (ESP's) EFI directory on UEFI-based PCs, so that rEFInd resides in EFI/refind. If you've tried rEFInd using a CD-R image file, you can copy the files from the EFI/refind directory on the CD to create an equivalent directory on the ESP. To avoid confusion, though, you should delete the rEFInd binary file for the CPU type your computer does not use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the refind_x64.efi binary and delete the refind_ia32.efi binary. Most Intel-based Macs also have 64-bit EFI implementations, so you should do the same thing; 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:

+

Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's 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. For Linux and Mac OS X, you can use the installation script, install.sh, which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for Linux and Mac OS X. Installation under Windows also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in a section on this topic. If you're upgrading rEFInd, see the section on upgrading. Finally, I describe how to install some additional components you might find useful. Note that this page describes installing the main rEFInd program; if you want to use the EFI filesystem drivers included with rEFInd, you should consult the page on using drivers with rEFInd.

+ + +

Installing rEFInd Using install.sh under Linux or Mac OS X

+ + + +

If you're using Linux or Mac OS X, the easiest way to install rEFInd is to use the install.sh script. Under Linux, this script installs rEFInd to your disk's ESP. Under Mac OS X, the script installs rEFInd to your current OS X boot partition by default; but you can install to your ESP instead by passing the script the esp option.

+ +

Before running this script under Linux, you should ensure that your ESP is 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.) This precaution isn't necessary under OS X.

+ +

A sample run under Linux looks something like this:

-$ ioreg -l -p IODeviceTree | grep firmware-abi
-
+# ./install.sh +Installing rEFInd on Linux.... +ESP was found at /boot/efi using vfat +Copied rEFInd binary file refind_x64.efi + +Copying sample configuration file as refind.conf; edit this file to configure +rEFInd. + -

The result should read either EFI32 or EFI64, indicating that you should use the refind_ia32.efi or refind_x64.efi binary, respectively.

+Installation has completed successfully. -

Of course, before you can install the files, you must be able to access the ESP. The details of this task vary from one OS to another. If you have a choice, I recommend using Linux for rEFInd installation on UEFI PCs and OS X on Macs. (On Macs, you can optionally use OS X's main partition rather than the ESP for this purpose.) Windows provides relatively primitive tools for accessing the ESP and manipulating the EFI's boot list. I also describe some options for naming rEFInd that may be useful on some systems. Finally, I describe how to install some extra tools that you may find useful but that are not included with rEFInd.

+

The output under OS X is a bit different:

+ +
+$ ./install.sh
+Not running as root; attempting to elevate privileges via sudo....
+Password:
+Installing rEFInd on OS X....
+Installing rEFInd to the partition mounted at '/'
+Copied rEFInd binary file refind_ia32.efi
+
+Copying sample configuration file as refind.conf; edit this file to configure
+rEFInd.
+
+
+WARNING: If you have an Advanced Format disk, *DO NOT* attempt to check the
+bless status with 'bless --info', since this is known to cause disk corruption
+on some systems!!
+
+
+Installation has completed successfully.
+ +

In either case, the details of the output differ depending on your existing configuration and how you ran the program. Some details that can affect how the script runs include the following:

+ + + +

In any event, you should peruse the script's output to ensure that everything looks OK. install.sh displays error messages when it encounters errors, such as if the ESP is mounted read-only or if you run out of disk space. You may need to correct such problems manually and re-run the script. In some cases you may need to fall back on manual installation, which gives you better control over details such as which partition to use for installation.

-

Installing rEFInd Using Linux

+

Installing rEFInd Manually Using Linux

-

Accessing the ESP is easiest from Linux: The ESP is usually mounted at /boot/efi. You can verify that this is the case by using the df command:

+

On a UEFI-based PC, you'll normally install rEFInd to the ESP, which is usually mounted at /boot/efi. You can verify that this is the case by using the df command:

 $ df /boot/efi
@@ -113,19 +190,21 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 /dev/sda1         191284 16604    174681   9% /boot/efi
 
- + -

This example shows that /dev/sda1 is mounted at /boot/efi, which is a typical configuration. (The ESP can be on another disk or partition, but /dev/sda1 is the most common place for an ESP.) If your output shows /boot or / under the Mounted on column, then your ESP isn't mounted. If you get a df: `/boot/efi': No such file or directory error message, then the /boot/efi directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my EFI Boot Loader Installation page.

+

This example shows that /dev/sda1 is mounted at /boot/efi, which is a typical configuration. (The ESP can be on another disk or partition, but /dev/sda1 is the most common place for an ESP.) If your output shows /boot or / under the Mounted on column, then your ESP isn't mounted. (An exception is if you're mounting the ESP at /boot. This is an unusual configuration. If you're using it, you can proceed, making suitable adjustments to subsequent commands.) If you get a df: `/boot/efi': No such file or directory error message, then the /boot/efi directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my EFI Boot Loader Installation page.

Assuming the ESP is mounted at /boot/efi, you can install the rEFInd files as follows (you must be root to issue these commands, or precede each of them with sudo):

    -
  1. Type cp -r refind /boot/efi/EFI/ from the refind-version directory in which the refind directory exists. This copies all the files that rEFInd needs to work.
  2. +
  3. Type cp -r refind /boot/efi/EFI/ from the refind-version directory in which the refind directory exists. This copies all the files that rEFInd needs to work. Note that this includes all of rEFInd's drivers.
  4. Type cd /boot/efi/EFI/refind to change into rEFInd's new directory on the ESP.
  5. -
  6. Type rm refind_ia32.efi to remove the IA32 binary if you're using an x86-64 (64-bit) system; or type rm refind_x64.efi to remove the x86-64 binary if you're using an x86 (32-bit) system. You can optionally rename the binary you keep as refind.efi, but this isn't required.
  7. +
  8. Type rm refind_ia32.efi to remove the IA32 binary if you're using an x86-64 (64-bit) system; or type rm refind_x64.efi to remove the x86-64 binary if you're using an x86 (32-bit) system. You can optionally rename the binary you keep as refind.efi, but this isn't required. (Note that you must keep the version that's the correct bit width for your EFI; if you've installed a 32-bit Linux on a 64-bit PC with a 64-bit EFI, you'd keep refind_x64.efi.
  9. + +
  10. Optionally, type rm -r drivers_ia32 to remove the x86 drivers from an x86-64 system, or rm -r drivers_x64 to remove the x86-64 drivers from a 32-bit x86 system. You may also want to remove some or all of the drivers for the architecture you are using; if you don't need them, they'll slow down the start process. See the page on drivers for more on this topic.
  11. Rename the configuration file by typing mv refind.conf-sample refind.conf. Consult the Editing the rEFInd Configuration File page for information on how to adjust your options.
  12. @@ -142,10 +221,18 @@ Filesystem 1K-blocks Used Available Use% Mounted on

    On some systems, efibootmgr won't do what you expect. On such systems, you may have better luck renaming the rEFInd files, as described in the Alternative Naming Options section.

    -

    Installing rEFInd Using Mac OS X

    +

    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:

    + +
    +$ ioreg -l -p IODeviceTree | grep firmware-abi
    +
    + +

    The result should include either EFI32 or EFI64, indicating that you should use the refind_ia32.efi or refind_x64.efi binary, respectively.

    + +

    The procedure for installing rEFInd on a Mac is similar to that for installing it under Linux, except that you can (and probably should) install it to OS X's system partition or some other HFS+ partition rather than to the ESP, and you must use the bless utility rather than efibootmgr. To be precise, you should follow these steps:

    @@ -183,6 +270,15 @@ Filesystem 1K-blocks Used Available Use% Mounted on 64-bit EFI or sudo rm /efi/refind/refind_x64.efi on a Mac with a 32-bit EFI. +
  13. Optionally, remove the drivers directory for the architecture you're + not using—/efi/refind/drivers_ia32 or + /efi/refind/drivers_x64, as appropriate. You may also want to + remove some or all of the drivers for the architecture you are using; + if you don't need them, they'll slow down the start process. See the page on drivers for more on this topic. Note + that Apple's firmware includes its own HFS+ driver, so the HFS+ driver + provided with rEFInd is useless on Macs.
  14. +
  15. If this is your first installation, type sudo mv /efi/refind/refind.conf-sample /efi/refind/refind.conf (adjusting the path as necessary) to rename the sample configuration @@ -216,7 +312,7 @@ Filesystem 1K-blocks Used Available Use% Mounted on

    If you want to remove rEFInd from your system, you can delete its files. The Mac will revert to booting using whatever standard boot loader it can find. Alternatively, you can use bless to bless another EFI boot loader. The GUI Startup Disk utility in System Preferences provides a simplified interface that enables you to select which OS X installation to boot, but it doesn't look for non-Apple boot loaders, so you can't use it to enable rEFInd.

    -

    Installing rEFInd Using Windows

    +

    Installing rEFInd Manually Using Windows

    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:

    @@ -237,6 +333,8 @@ Filesystem 1K-blocks Used Available Use% Mounted on
  16. Type del refind_ia32.efi to delete the unused 32-bit version of rEFInd. (Windows only supports EFI boots on 64-bit EFI implementations and in 64-bit versions of Windows.)
  17. +
  18. Optionally type rd /s drivers_ia32 to delete the drivers_ia32 directory and its contents. You may also want to selectively delete some of the drivers in the drivers_x64 directory, depending on your needs. Unnecessary drivers may slow the rEFInd start process. See the page on drivers for more on this topic.
  19. +
  20. Type rename refind.conf-sample refind.conf to rename rEFInd's configuration file.
  21. 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.
  22. @@ -279,6 +377,42 @@ Filesystem 1K-blocks Used Available Use% Mounted on

    When you reboot, rEFInd should come up. With any luck, it will detect your old boot loader as an option, if one was installed before.

    + +

    Upgrading rEFInd

    +
    + +

    If you've installed an earlier version of rEFInd, you can upgrade a bit more easily than you can install directly:

    + + + +

    In all cases, if the new version includes new or altered configuration file options, you may need to manually update your configuration file. Alternatively, if you've used the default configuration file, you can replace your working refind.conf with refind.conf-sample from the rEFInd zip file. (When using install.sh, this file will be copied to rEFInd's installation directory under its original name, so you can rename it within that directory to replace the old file.

    +

    Installing Additional Components

    @@ -307,10 +441,12 @@ Filesystem 1K-blocks Used Available Use% Mounted on href="http://refit.sourceforge.net">original rEFIt package.
  23. Drivers—You can install drivers to extend the capabilities - of the EFI. Most notably, filesystem drivers for ext2fs and ReiserFS - are available. These can enable you to boot a Linux kernel with EFI - stub support from an ext2fs, ext3fs, or ReiserFS partition. See the Using EFI Drivers page for more on this + of the EFI. rEFInd ships with filesystem drivers for ext2fs and + ReiserFS, which can enable you to boot a Linux kernel with EFI stub + support from an ext2fs, ext3fs, or ReiserFS partition. (rEFInd also + provides ISO-9660 and HFS+ drivers.) You can find additional drivers + from other sources, although they're still on the scarce side. See the + Using EFI Drivers page for more on this topic.