X-Git-Url: https://code.delx.au/refind/blobdiff_plain/b1ba9f9e7edcf78bb9bfeb5451bff0ecf1752f90..aa35c85cb9289e9c92f96811099b384aa44defd4:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index bbb3fba..d58e38e 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: -12/8/2014, referencing rEFInd 0.8.4

+3/1/2015, referencing rEFInd 0.8.7

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!

@@ -186,21 +186,35 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Fixing Windows Boot Problems
  • -
  • Uninstalling rEFInd
  • +
  • Uninstalling rEFInd - +
  • @@ -208,13 +222,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Installing rEFInd Using an RPM or Debian Package File

    -

    I provide RPM and Debian package files for rEFInd; and starting with version 0.8.4, 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:

    +

    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.4-1.x86_64.rpm
    +
    # rpm -Uvh refind-0.8.7-1.x86_64.rpm

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

    -
    # dpkg -i refind_0.8.4-1_amd64.deb
    +
    # dpkg -i refind_0.8.7-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.

    @@ -246,7 +260,7 @@ $ sudo apt-get install refind

    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.

    -

    Prior to version 0.8.4, install.sh installed rEFInd to the OS X root partition by default. I changed this because the default configuration for OS X 10.10 ("Yosemite") makes this placement unusable. Instead, install.sh now installs to the ESP under OS X, just as it does under Linux; however, the default installation location under OS X is EFI/BOOT/ rather than EFI/refind/. This difference accommodates a quirk of Apple's EFI, which sometimes imposes a 30-second delay when using anything but the EFI/BOOT location. If you're upgrading a working install of rEFInd to the OS X root partition, it's best to pass the --notesp option to install.sh. This option is described in more detail shortly.

    +

    Prior to version 0.8.4, install.sh installed rEFInd to the OS X root partition by default. I changed this because the default configuration for OS X 10.10 ("Yosemite") makes this placement unusable. Instead, install.sh now installs to the ESP under OS X, just as it does under Linux. If you're upgrading a working install of rEFInd to the OS X root partition, it's best to pass the --notesp option to install.sh. This option is described in more detail shortly.

    A sample run under Linux looks something like this:

    @@ -460,7 +474,7 @@ 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. (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.

    @@ -562,8 +576,8 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi -

    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.

    +

    I've recently acquired a 2014 MacBook Air, but I haven't yet had the chance to try to reproduce this problem and find a workaround. It's on my to-do list, though.

    + +
    +

    Fixing a Failure to Find Linux

    +
    + +

    Some users report that rEFInd doesn't detect Linux, or won't boot it when it is found. Broadly speaking, there are two common causes of this problem:

    + + + +

    If you suspect that your hybrid MBR is damaged, you can try re-creating it with my GPT fdisk (gdisk) program. The GPT fdisk hybrid MBR documentation covers this procedure in detail. You can run gdisk from either OS X or Linux, although you may need to install it, particularly in OS X.

    + +

    If you suspect driver problems, you'll need to mount your ESP (as described in the manual OS X installation instructions), locate the rEFInd drivers_x64 directory, and adjust its contents. Make sure you have a driver for the filesystem that holds your Linux kernel. If you don't know what filesystem this is, it's probably ext4fs. rEFInd ships with several filesystem drivers, including one for ext4fs. You should also remove unnecessary filesystem drivers. I've seen several reports of one driver interfering with others' operation. The biggest culprit seems to be the HFS+ driver when used on Macs.

    + +

    Fixing Windows Boot Problems

    @@ -1073,27 +1120,103 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

    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:

    +

    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). The exact details of how to do this vary from one OS to another, though; and in some cases there are alternatives to completely uninstalling rEFInd that are easier to implement.

    + + +

    Uninstalling rEFInd from Linux

    +
    + +

    In Linux, a command like the following, typed as root, should remove rEFInd:

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

    +

    You must type this command as root (or use sudo in some environments, such as under Ubuntu). 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. Thus, you must first mount the ESP, as described earlier, in the section on manually installing rEFInd in OS X. (You can forego this step if you installed to the OS X root partition.) You'll also need to use sudo to acquire root privileges. Thus, you'd probably use a command like the following in OS X:

    +

    If you installed via an RPM or Debian package in Linux, using your package manager will remove the package files, but not the files that the installer places on your ESP. Thus, you must uninstall those files manually, as just described. To complete the job, you'll also have to remove /boot/refind_linux.conf, and perhaps the /etc/refind.d directory.

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

    Uninstalling rEFInd from OS X

    +
    -

    Many variants of both of these commands are possible on both OS X and Linux. For instance, you'd probably use sudo on Ubuntu.

    +

    The easiest way to restore the standard OS X boot loader on a Mac is not to uninstall rEFInd; it's to bypass it. This can be accomplished with the Startup Disk item in the System Preferences panel:

    -

    If you installed via an RPM or Debian package in Linux, using your package manager will remove the package files, but not the files that the installer places on your ESP. Thus, you must uninstall those files manually, as just described. To complete the job, you'll also have to remove /boot/refind_linux.conf, and perhaps the /etc/refind.d directory.

    +
    The OS X Startup Disk tool enables you to reset a Mac
+    to use the standard OS X boot loader.

    + +

    Select your startup disk (Macintosh HD OS X, 10.10.1 in this example) and then click Restart. The computer should reboot into OS X, bypassing rEFInd.

    + +

    I recommend stopping here, because the procedure for completely removing rEFInd from a Mac depends on your installation method and tends to be challenging for many Mac users, who are unfamiliar with the necessary command-line tools. Basically, you must reverse the steps described earlier, in Installing rEFInd Manually Using Mac OS X:

    + +
      + +
    1. You must first determine where rEFInd is installed. This can be any of + several locations: + +
        + +
      • If you installed rEFInd 0.8.3 or earlier with the default options, + or if you used the --notesp option with rEFInd 0.8.4 or + later, it will be /EFI/refind on your main partition
      • + +
      • If you installed rEFInd 0.8.4 or later with the default options, or + if you used the --esp option with rEFInd 0.8.3 or earlier, + it will be in EFI/refind or EFI/BOOT on the + ESP.
      • + +
      • If you used the --ownhfs option to install.sh, + rEFInd will be in the System/Library/CoreServices + directory on the volume you specified.
      • + +
      • If you installed rEFInd manually, it will be wherever you put + it.
      • + +
      • In all cases, there could be duplicate (inactive) rEFInd files in + unexpected places. This is particularly true if you tried + installing rEFInd multiple times, each with different options to + install.sh. Thus, if you delete rEFInd and it still comes + up, you may have deleted the wrong files. (Note that dragging files + to the Trash may have no effect, though—at least, not until + you empty the Trash.)
      • + +
      + +
    2. If necessary, mount the ESP or rEFInd-specific HFS+ volume, as + described in Installing rEFInd Manually Using Mac OS + X.
    3. + +
    4. Verify that rEFInd is installed in the directory noted in step #1. If a + refind.conf file is present, rEFInd is almost certainly + installed in that directory. If not, it's not rEFInd there and you + should not proceed. Be extra cautious about deleting the + System/Library/CoreServices directory, since that's + the default location of the OS X boot loader! Never delete this + directory from your OS X root (/) partition, only from the + partition you specified to install.sh using the + --ownhfs option.
    5. + +
    6. Once you've identified the rEFInd directory, delete it, or at least the + rEFInd boot file. This file may be called refind_x64.efi, + bootx64.efi, boot.efi, or conceivably something else. + You may need to use sudo rm at the command line to accomplish + this task, as in sudo rm -r + /Volumes/esp/EFI/refind.
    7. + +
    + + +

    Uninstalling rEFInd from Windows

    +

    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:

    + +

    Post-Uninstallation Activity (UEFI-Based PCs)

    +
    + +

    On a UEFI-based PC, 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
    @@ -1110,11 +1233,14 @@ Boot0007* CD/DVD Drive

    This example shows use of efibootmgr's --verbose (-v) option to display boot programs 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 program 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.

    +

    If you're not using Linux, you may be able to find a utility that serves +a similar function. Under Windows, the bcdedit command, described +in the section on installing rEFInd under Windows, +may work, although I've not attempted this.


    -

    copyright © 2012–2014 by Roderick W. Smith

    +

    copyright © 2012–2015 by Roderick W. Smith

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