X-Git-Url: https://code.delx.au/refind/blobdiff_plain/1b45ba3611945b291e468f1b5d3b5452f99766ba..e0f6b77e5692ec112bb803202ae27f8c5d55de50:/docs/refind/installing.html diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 57dcf0b..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: -11/7/2012, referencing rEFInd 0.4.7

+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:

@@ -251,10 +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.
  • @@ -366,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:

      @@ -428,8 +436,6 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

      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.

      -

      If your computer seems to insist on booting an EFI boot loader called EFI/Microsoft/BOOT/bootmgfw.efi, be aware that it might not actually be looking for that filename, but for a boot manager with the EFI description Microsoft Boot Manager. Changing the description of the "real" EFI/Microsoft/BOOT/bootmgfw.efi using efibootmgr and then giving rEFInd that description, even when rEFInd is installed in a more conventional location, may work. I've received a report that at least one Lenovo model has this peculiar affliction.

      -

      Upgrading rEFInd

      @@ -528,6 +534,47 @@ $ 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:

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