X-Git-Url: https://code.delx.au/refind/blobdiff_plain/7c898f4a26b66344e4cc8ed5c2e272d5ea0a71dc..e0f6b77e5692ec112bb803202ae27f8c5d55de50:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 5c71b28..0a2f848 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

+11/15/2012, referencing rEFInd 0.4.7

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!

@@ -99,7 +99,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

-

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.

+

If you're using Linux or Mac OS X, the easiest way to install rEFInd is to use the install.sh script. This script automatically copies rEFInd's files to your ESP or other target location and makes changes to your firmware's NVRAM settings so that rEFInd will start the next time you boot. If you've booted to OS X or in EFI mode to Linux on a UEFI-based PC, install.sh will probably do the right thing, so you can get by with the quick instructions. If your setup is unusual, though, or if you want to create a USB flash drive with rEFInd on it, you should read the extra instructions for this utility.

+ +

Quick install.sh Instructions

+ +

Under Linux, the install.sh 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.

@@ -135,15 +139,16 @@ 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!! -NOTE: If you want to boot an OS via BIOS emulation (such as Windows or some -Linux installations), you *MUST* edit the ///EFI/refind/refind.conf -file's 'scanfor' line to include the 'hdbios' option, and perhaps -'biosexternal' and 'cd', as well. - 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 either case, the details of the output differ depending on your existing configuration and how you ran the program. Unless you see an obvious warning or error, you shouldn't be concerned about minor deviations from these examples. If you run into such a situation, or if you want to install in an unusual way, read on....

+ + +

Extra install.sh Instructions

+
+ +

Some details that can affect how the script runs include the following:

@@ -232,8 +257,10 @@ Filesystem 1K-blocks Used Available Use% Mounted on
  • 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.
  • + + -
  • 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 need to install this program on some systems; it's a standard part of most distributions' repositories.
  • +
  • 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.
  • 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.
  • @@ -327,6 +354,12 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi unless you're certain you do not have an Advanced Format hard disk. +
  • If you don't want to reboot immediately after installing rEFInd, you + may optionally unmount the ESP by typing sudo + umount /dev/disk0s1 or sudo umount + /Volumes/esp. This step isn't strictly required, but if you want + to keep the ESP out of your directory tree, it can be useful.
  • +

    When you reboot, your Mac should bring up the rEFInd menu, and should continue to do so thereafter. If you make changes that break this association, you can re-run the bless command (if necessary, restoring the rEFInd files first). This might be necessary after installing system updates from Apple or if you upgrade rEFInd to a newer version.

    @@ -339,6 +372,8 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

    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:

      @@ -481,6 +516,65 @@ $ 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

      +
      + +

      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:

      + +
        + +
      1. Boot into Linux.
      2. + +
      3. Type efibootmgr as root to obtain a list of your boot loader entries. Each entry includes a boot number, as in Boot0003 or Boot0027.
      4. + +
      5. Remove all of the boot loader entries except rEFInd's by using efibootmgr's -b bootnum option to specify the boot entry and -B to delete it. For instance, typing efibootmgr -b 0027 -B as root deletes boot entry Boot0027. Issue a separate efibootmgr command for each boot entry.
      6. + +
      7. Re-install rEFInd using the install script. It's unclear from the original post if this meant installing from Linux or from OS X.
      8. + +
      + + +

      Uninstalling rEFInd

      +
      + +

      If you decide you don't want to keep rEFInd, you can uninstall it. Doing so is a matter of removing the rEFInd files from your ESP (or from your OS X boot partition, if you installed the program there). In Linux, a command like the following, typed as root, should do the trick:

      + +
      +# rm -r /boot/efi/EFI/refind
      +
      + +

      This example assumes that your ESP is mounted at /boot/efi and that rEFInd is installed in EFI/refind on that partition. If you've mounted your ESP elsewhere, or installed rEFInd elsewhere, you should adjust the command appropriately.

      + +

      The same procedure works in OS X, with the caveat that the ESP isn't normally mounted in OS X and rEFInd is installed to the OS X boot partition by default. You'll also need to use sudo to acquire root privileges. Thus, you'd probably use a command like the following in OS X:

      + +
      +$ sudo rm -r /EFI/refind
      +
      + +

      Many variants of both of these commands are possible on both OS X and Linux. For instance, you'd probably use sudo on Ubuntu; and if you installed rEFInd to your ESP on a Mac, you'd need to first mount the ESP and include its path in the rm command.

      + +

      From Windows, you must reverse the directions for installing in Windows—type mountvol S: /S to mount your ESP as S:, then navigate to the S:\EFI directory and delete the refind subdirectory.

      + +

      In any of these cases, when the computer boots and cannot find the rEFInd files, it should move on to the next boot loader in its list. In my experience, some EFI firmware implementations remove boot loaders they can't find from their NVRAM lists, so nothing else will be required, provided you have another working boot loader in your firmware's list. If your firmware doesn't automatically clean up its NVRAM entries, rEFInd's entry will do little harm; however, you can delete it with the efibootmgr utility in Linux:

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

      This example shows use of efibootmgr's --verbose (-v) option to display boot loaders so as to identify which one is rEFInd, followed by --delete-bootnum (-B) to delete a boot program and --bootnum (-b) to identify which one to delete. Of course, in this example there's not much else left, so you'd presumably want to install another boot loader at this point! If you already have another one installed, you may want to check the BootOrder line to determine which one will take precedence when you reboot. If you don't like what it shows, you can adjust it with the --bootorder (-o) option; consult efibootmgr's man page for details.

      + +

      If you're not using Linux, you may be able to find a utility that serves a similar function. The OS X bless utility (or its GUI equivalent, the Startup Disk item in System Preferences) should do the trick; but Macs pick up standard OS X boot loaders when they boot and find that a configured non-standard boot loader is missing, so this shouldn't be necessary on Macs. Under Windows, the bcdedit command, described in the section on installing rEFInd under Windows, may work, although I've not attempted this.

      +

      copyright © 2012 by Roderick W. Smith