X-Git-Url: https://code.delx.au/refind/blobdiff_plain/2f941c1b8c2d841cc62de2ef00108278cee7f280..463d49c9646ad30a500cc9a6305676b790871945:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 64a89cf..54ad51f 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -15,10 +15,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -1/6/2013, referencing rEFInd 0.6.3

+6/23/2014, referencing rEFInd 0.8.2

-

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!

+

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!

@@ -26,49 +26,87 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

+ - - - - + + -
Donate $2.50 Donate $5.00 Donate $10.00Donate $20.00 Donate another value
- + +
+ + - + + - + + + +Donate with PayPal -
- + +
+ + - + + - + + + +Donate with PayPal -
- + + +
+ + - + + - + + + +Donate with PayPal -
- + +
+ + - + + - + + + +Donate with PayPal + +
+ + + + + + + + + +Donate with PayPal +
@@ -82,7 +120,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Donate with PayPal
+
@@ -92,6 +130,8 @@ 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 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.

@@ -128,6 +168,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Installing rEFInd Manually Using an EFI Shell
  • +
  • Using OS X Whole-Disk Encryption
  • +
  • Alternative Naming Options -

    Note that the shell included in rEFInd's CD-R image version is a version 1 shell, so you can't use it for this purpose. You can, however, copy rEFInd's files from the CD-R. You can even launch the version 1 shell included with rEFInd and then use that to launch a version 2 shell. Once you've booted the shell, you can proceed as follows:

    +

    Note that the IA32 shell included in rEFInd's CD-R image version is a version 1 shell, so you can't use it for this purpose. You can, however, copy rEFInd's files from the CD-R. You can even launch the version 1 shell included with rEFInd and then use that to launch a version 2 shell. The x86-64 shell on the CD-R is the alternate shell, which should work on any x86-64 computer. Once you've booted the shell, you can proceed as follows:

      @@ -642,6 +713,20 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

      With any luck, rEFInd will start up at this point. If not, you can check your settings using a shell or an emergency system for your OS of choice. In an EFI shell, you might type bcfg boot dump -b to view your boot loader entries and verify that rEFInd appears at the top of the list. Be sure to check the pathname for typos. If you continue to have problems, you might look into giving rEFInd a fallback filename that your firmware will recognize.

      + +

      Using OS X Whole-Disk Encryption

      +
      + +

      If you're using OS X's Whole-Disk Encryption (WDE) feature, you must do two extra things:

      + +
        + +
      • You must install rEFInd to the ESP. Unfortunately, as described earlier, this can result in a delay (usually of 30 seconds) as the firmware launches rEFInd. See the upcoming section on fixing sluggish Mac boots if you run into this problem.
      • + +
      • You must uncomment the dont_scan_volumes line in refind.conf and ensure that "Recovery HD" is not among its options. (You can use a blank line or provide a dummy value if you want to scan all your volumes.) Alternatively, you can create a manual boot stanza to boot OS X.
      • + +
      +

      Alternative Naming Options

      @@ -771,7 +856,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi -

      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.

      +

      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.)

      If you're upgrading to rEFInd from rEFIt, you can simply run the install.sh script as described earlier or perform a manual installation. Once installed, rEFInd will take over boot manager duties. You'll still be able to launch rEFIt from rEFInd; a rEFIt icon will appear in rEFInd's menu. You can eliminate this option by removing the rEFIt files, which normally reside in /EFI/refit.

      @@ -779,13 +864,13 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

      Installing Additional Components

      -

      rEFInd includes the ability to launch any EFI program; however, rEFInd detects only certain programs. These include boot loaders in traditional locations and a handful of other programs. To launch these other programs, you must download and install them separately from rEFInd:

      +

      rEFInd includes the ability to launch any EFI program; however, rEFInd detects only certain programs. These include boot loaders in traditional locations and a handful of other programs. To launch most of these other programs, you must download and install them separately from rEFInd:

      • shell.efi—This - file, placed in the ESP's efi/tools directory, adds the + file, placed in the ESP's EFI/tools directory, adds the ability to launch a text-mode EFI shell from rEFInd. Note that the download link is to a 64-bit binary that must be renamed before rEFInd will recognize it. Additional shell download links appear on the ioreg -l -p IODeviceTree | grep firmware-abi Linux wiki, and on other sites; try a Web search if the shell you find doesn't work to your satisfaction.
      • -
      • gptsync.efi—This program creates a Memtest86—This + is a popular tool for performing basic hardware tests, and especially + memory tests. rEFInd recognizes this program when it is stored in the + EFI/tools, EFI/tools/memtest, + EFI/tools/memtest86, EFI/memtest, or + EFI/memtest86 directory, with a program filename of + memtest86.efi, memtest86_x64.efi, + memtest86x64.efi, or bootx64.efi. (Change + x64 to ia32 on IA-32 systems.) Be sure to download + the EFI version of the program. If you get the USB flash drive version, + you should mount the flash drive's ESP (partition 2) and copy the + EFI/BOOT directory to your own ESP's + EFI/tools/memtest or other Memtest86 directory name, as just + specified. rEFInd should then recognize it, provided the + showtools line includes the memtest or + memtest86 token.
      • + +
      • gptsync.efi or gptsync_arch.efi—This program creates a hybrid MBR from your regular GPT disk. A hybrid MBR is a dangerous hack that enables Windows and OS X to coexist on a Macintosh disk. If you're using a - UEFI-based PC, a hybrid MBR will be useless at best, so you shouldn't - create one, and it's safest to not install gptsync.efi. If - you're using a hybrid MBR to enable dual-booting Windows and OS X on a - Mac, though, placing this program file in the ESP's or Mac boot - partition's efi/tools directory will enable you to regenerate - your hybrid MBR should some other tool convert the MBR to a standard - protective MBR. You can obtain the file from the original rEFIt package.
      • + UEFI-based PC, a hybrid MBR is likely to be useless at best, so you + shouldn't create one, and it's safest to not install + gptsync.efi. If you're using a hybrid MBR to enable + dual-booting Windows and OS X on a Mac, though, placing this program + file in the ESP's or Mac boot partition's EFI/tools directory + will enable you to regenerate your hybrid MBR should some other tool + convert the MBR to a standard protective MBR. You can obtain the file + from the original rEFIt + package, or beginning with rEFInd 0.6.9, an updated version is + included in the rEFInd package. The rEFInd version of gptsync_arch.efi uses a more sophisticated algorithm + for determining what GPT partitions to duplicate in the MBR and it + includes additional safeguards to minimize the risk of damage should + you run the program on a disk that might have been damaged. The + original rEFIt version of the program usually goes by the filename + gptsync.efi, whereas the updated rEFInd version ships with an + architecture code, as in gptsync_x64.efi or + gptsync_ia32.efi. The rEFInd install.sh script + installs gptsync_arch.efi when run + under OS X, but not when run on Linux. In addition to installing the + program, you must edit refind.conf, uncomment the + showtools line, and add gptsync to its list of + options.
      • Drivers—You can install drivers to extend the capabilities - of the EFI. rEFInd ships with filesystem drivers for ext2fs and + of the EFI. rEFInd ships with filesystem drivers for ext2fs, ext4fs, and ReiserFS, which can enable you to boot a Linux kernel with EFI stub support from an ext2fs, ext3fs, ext4fs, or ReiserFS partition. (rEFInd also provides ISO-9660 and HFS+ drivers.) You can find additional drivers @@ -826,10 +945,34 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

        I've seen links to other versions of these tools from time to time on the Web, so if you try one of these programs and it crashes or behaves strangely, try performing a Web search; you may turn up something that works better for you than the one to which I've linked.

        -

        Fixing a Sluggish Macintosh Boot

        +

        Fixing Macintosh Boot Problems

        +
        + +

        I've received a few reports of a sluggish boot process (a delay of about 30 seconds before starting rEFInd) on some Macs after installing rEFInd, as well as some other Mac-specific peculiarities. I've been unable to replicate this problem myself, and its true cause remains mysterious to me. I have found three possible solutions, though: moving rEFInd to an HFS+ volume, using the fallback filename, and clearing NVRAM entries.

        + + +

        Moving rEFInd to an HFS+ Volume

        +
        + +

        Most of the reports of sluggish Macintosh boots I've seen note that the user installed rEFInd to the ESP rather than to the OS X root partition. Some users have reported that re-installing rEFInd to the OS X root partition clears up the problem. This is obviously a straightforward solution to the problem, if it works. Note that rEFInd can launch boot loaders that are stored on any partition that the EFI can read no matter where it's installed; therefore, you'll still be able to launch boot loaders stored on the ESP (or elsewhere) if you install it in this way.

        + +

        A variant of this solution is to create a small (~100MiB) HFS+ volume to be used exclusively by rEFInd. You can then install rEFInd to that volume with the --ownhfs option to install.sh, as in ./install.sh --ownhfs /dev/disk0s6 if the volume is /dev/disk0s6. This approach has the advantage that it can be managed via OS X's own Startup Disk tool in System Preferences.

        + +

        The biggest drawback to storing rEFInd on an HFS+ volume is that you won't be able to edit the rEFInd configuration file or move rEFInd-related binaries from an EFI shell if you install it in this way, since Apple's HFS+ driver for EFI is read-only. (The same is true of rEFInd's HFS+ driver, so it won't help you overcome this limitation.) You may also be limited in making changes to your rEFInd configuration from Linux or other OSes, too, since Linux's HFS+ drivers disable write support by default on volumes with an active journal. You can force write access by using the force option to mount; however, this procedure is noted as being risky in the Linux HFS+ documentation, so I don't recommend doing this on a regular basis on the OS X boot volume. This isn't as risky if you use a dedicated HFS+ rEFInd partition, though. You could even mount it as the Linux /boot partition, in which case it would also hold the Linux kernel and related files. If you use disk encryption, you can't store rEFInd on the OS X root (/) partition, but you could still use an (unencrypted) separate HFS+ partition.

        + +

        A variant of this solution is suggested in this blog post, which recommends placing rEFInd on an HFS+ volume on the first SATA channel. (In the blogger's case, that channel used to hold an optical drive, but that drive was replaced by a hard disk.)

        + + +

        Using the Fallback Filename

        +
        + +

        I've received a few reports that installing rEFInd to the ESP using the fallback filename (EFI/BOOT/bootx64.efi on most systems, or EFI/BOOT/bootia32.efi on very old Macs) can work around the problem.

        + + +

        Clearing the NVRAM Entries

        -

        I've received a few reports of a sluggish boot process (a delay of about 30 seconds before starting rEFInd) on some Macs after installing rEFInd. I've been unable to replicate this problem myself, and its true cause remains mysterious to me. I have found a Web forum post describing a possible fix. Be aware, though, that this procedure involves using the efibootmgr utility on Macs, which has been known to damage the firmware on some Macs. Other reports indicate that this problem has been fixed with 3.3.0 and later kernels. Thus, I present this information cautiously and with a strong "use at your own risk" warning. If you care to proceed, I recommend you update your Linux kernel to the latest possible version and then proceed as follows:

        +

        The first is a Web forum post that describes a possible fix. Be aware, though, that this procedure involves using the efibootmgr utility on Macs, which has been known to damage the firmware on some Macs. Other reports indicate that this problem has been fixed with 3.3.0 and later kernels. Thus, I present this information cautiously and with a strong "use at your own risk" warning. If you care to proceed, I recommend you update your Linux kernel to the latest possible version and then proceed as follows:

          @@ -845,6 +988,22 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

          Some sources suggest that delayed launches of rEFInd on Macs are more common when installing rEFInd to the ESP, so if you've done this, you could try re-installing it to your OS X boot partition.

          + +

          Fixing Wake Problems

          +
          + +

          Some people have reported that installing rEFInd causes problems with resuming from a suspended OS X session. I know of two workarounds to such problems:

          + +
            + +
          • Install rEFInd to an HFS+ volume using the --ownhfs option to install.sh. Unfortunately, this solution requires either creating a small HFS+ volume for rEFInd or using an already-existing non-bootable HFS+ volume (if you've got one for data storage, for example).
          • + +
          • Type sudo pmset -a autopoweroff 0 in a Terminal window. This solution is likely to work if sleep operations work normally up to a point, but fail after about three hours.
          • + +
          + +

          Unfortunately, I lack a recent Mac and so can't investigate these issues myself, so I'm dependent upon others (mostly non-programmers) to offer workarounds. This is the type of problem that really requires hands-on interactive debugging sessions with the code to stand any chance of finding a better solution.

          +

          Uninstalling rEFInd

          @@ -875,7 +1034,7 @@ $ sudo rm -r /EFI/refind # efibootmgr --verbose Timeout: 10 seconds BootOrder: 0000,0007 -Boot0000* rEFInd HD(2,1b8,64000,f1b7598e-baa8-16ea-4ef6-3ff3b606ac1e)File(\EFI\refind\refind.efi) +Boot0000* rEFInd HD(2,1b8,64000,f1b7598e-baa8-16ea-4ef6-3ff3b606ac1e)File(\EFI\refind\refind_x64.efi) Boot0007* CD/DVD Drive BIOS(3,0,00)PATA: HP DVD Writer 1040r . # efibootmgr --delete-bootnum --bootnum 0000 Timeout: 10 seconds @@ -890,7 +1049,7 @@ Boot0007* CD/DVD Drive
          -

          copyright © 2012–2013 by Roderick W. Smith

          +

          copyright © 2012–2014 by Roderick W. Smith

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