From: srs5694 Date: Sun, 1 Nov 2015 23:06:54 +0000 (-0500) Subject: Renamed support scripts: install.sh to refind-install, mvrefind.sh to X-Git-Url: https://code.delx.au/refind/commitdiff_plain/bfe73b5fa6321273b7cf86b02a3c2d114a167bc9 Renamed support scripts: install.sh to refind-install, mvrefind.sh to mvrefind, and mkrlconf.sh to mkrlconf. --- diff --git a/BUILDING.txt b/BUILDING.txt index f9d889c..4f65193 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -230,16 +230,16 @@ Installing rEFInd ================= With rEFInd compiled, you can install it. The easiest way to do this is -with the install.sh script, which works on both Linux and Mac OS X. +with the refind-install script, which works on both Linux and Mac OS X. Alternatively, you can type "make install" to install using this script. Note that this script copies files to the ESP and uses "efibootmgr" (on Linux) or "bless" (on OS X) to add rEFInd to the firmware's boot loader list. The docs/refind/installing.html file provides more details on this script and its use. -If install.sh doesn't work for you or if you prefer to do the job manually, -you may. On a UEFI-based system, you'll want to copy files on the ESP as -follows: +If refind-install doesn't work for you or if you prefer to do the job +manually, you may. On a UEFI-based system, you'll want to copy files on the +ESP as follows: * Create a directory for rEFInd, such as EFI/refind. * Copy refind/refind_ia32.efi or refind_x64.efi to the ESP's EFI/refind @@ -255,16 +255,16 @@ docs/refind/installing.html file for details. Note to Distribution Maintainers ================================ -The install.sh script, and therefore the "install" target in the Makefile, -installs the program directly to the ESP and it modifies the *CURRENT -COMPUTER's* NVRAM. Thus, you should *NOT* use this target as part of the -build process for your binary packages (RPMs, Debian packages, etc.). -(Gentoo could use it in an ebuild, though....) You COULD, however, install -the files to a directory somewhere (/usr/share/refind or whatever) and then -call install.sh as part of the binary package installation process. Placing -the files directly in /boot/efi/EFI/{distname}/refind and then having a -post-install script call efibootmgr is probably the better way to go, -but this assumes that the ESP is mounted at /boot/efi. +The refind-install script, and therefore the "install" target in the +Makefile, installs the program directly to the ESP and it modifies the +*CURRENT COMPUTER's* NVRAM. Thus, you should *NOT* use this target as part +of the build process for your binary packages (RPMs, Debian packages, +etc.). (Gentoo could use it in an ebuild, though....) You COULD, however, +install the files to a directory somewhere (/usr/share/refind or whatever) +and then call refind-install as part of the binary package installation +process. Placing the files directly in /boot/efi/EFI/{distname}/refind and +then having a post-install script call efibootmgr is probably the better +way to go, but this assumes that the ESP is mounted at /boot/efi. Compiling the EFI Filesystem Drivers @@ -282,10 +282,10 @@ builds with TianoCore. To install drivers, you can type "make install" in the "filesystems" directory. This copies all the drivers to the "/boot/efi/EFI/refind/drivers" directory. Alternatively, you can copy the -files you want manually. As of version 0.4.8, the install.sh script -includes an optional "--drivers" option that will install the drivers along -with the main rEFInd program, but to the drivers_{arch} subdirectory of the -main rEFInd installation directory. +files you want manually. The refind-install script includes an optional +"--drivers" option that will install the drivers along with the main rEFInd +program, but to the drivers_{arch} subdirectory of the main rEFInd +installation directory. *CAUTION:* Install drivers for your system's architecture *ONLY*. Installing drivers for the wrong architecture causes some systems to hang diff --git a/Makefile b/Makefile index c2616e8..f611cb9 100644 --- a/Makefile +++ b/Makefile @@ -54,10 +54,10 @@ clean: # binary packages (RPMs, Debian packages, etc.). (Gentoo could # use it in an ebuild, though....) You COULD, however, copy the # files to a directory somewhere (/usr/share/refind or whatever) -# and then call install.sh as part of the binary package +# and then call refind-install as part of the binary package # installation process. install: - ./install.sh + ./refind-install # DO NOT DELETE diff --git a/NEWS.txt b/NEWS.txt index 9f30ead..f122287 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,9 @@ 0.9.3 (??/??/2015): ------------------- +- Renamed support scripts: install.sh to refind-install, mvrefind.sh to + mvrefind, and mkrlconf.sh to mkrlconf. + - New icons! The old ones were getting to be a jumbled mess of styles, particularly for OS tags. I used the AwOken icon set (http://alecive.deviantart.com/art/AwOken-163570862) for the core icons, diff --git a/README.txt b/README.txt index e79447c..4f86cb6 100644 --- a/README.txt +++ b/README.txt @@ -13,9 +13,9 @@ following files and subdirectories: refind/drivers_ia32/ Subdirectory containing IA32 drivers refind/drivers_x64/ Subdirectory containing x86-64 drivers keys/ Subdirectory containing MOKs - install.sh Linux/MacOS installation script - mkrlconf.sh A script to create refind_linux.conf - mvrefind.sh A script to move a rEFInd installation + refind-install Linux/MacOS installation script + mkrlconf A script to create refind_linux.conf + mvrefind A script to move a rEFInd installation README.txt This file NEWS.txt A summary of program changes LICENSE.txt The original rEFIt license @@ -23,12 +23,12 @@ following files and subdirectories: CREDITS.txt Acknowledgments of code sources docs/ Documentation in HTML format -The easiest way of installing rEFInd is generally to use the install.sh +The easiest way of installing rEFInd is generally to use the refind-install script; however, you must be running under Linux or OS X to do this. If -you're using either of those OSes, simply typing "./install.sh" will +you're using either of those OSes, simply typing "./refind-install" will generally install rEFInd. If you have problems with this method, though, -you'll have to do a manual installation. The install.sh script supports a -number of options that you might want to use; consult the +you'll have to do a manual installation. The refind-install script supports +a number of options that you might want to use; consult the docs/refind/installing.html file for details. To install the binary package manually, you must first access your EFI @@ -66,6 +66,6 @@ Brief Installation Instructions (Source Package) rEFInd source code can be obtained from https://sourceforge.net/projects/refind/. Consult the BUILDING.txt file in the source code package for build instructions. Once you've built the -source code, you can use the install.sh script to install the binaries +source code, you can use the refind-install script to install the binaries you've built. Alternatively, you can duplicate the directory tree described above by copying the individual files and the icons directory to the ESP. diff --git a/debian/debinstall b/debian/debinstall index 6140c4b..6fc7d52 100755 --- a/debian/debinstall +++ b/debian/debinstall @@ -39,7 +39,7 @@ fi install -Dp -m0644 refind.conf-sample $BUILD_ROOT/usr/share/refind/refind/ cp -a icons $BUILD_ROOT/usr/share/refind/refind/ rm -rf $BUILD_ROOT/usr/share/refind/refind/icons/svg -install -Dp -m0755 install.sh $BUILD_ROOT/usr/share/refind/ +install -Dp -m0755 refind-install $BUILD_ROOT/usr/share/refind/ # Copy documentation to /usr/share/doc/refind mkdir -p $BUILD_ROOT/usr/share/doc/refind @@ -52,8 +52,8 @@ install -Dp -m0644 keys/* $BUILD_ROOT/etc/refind.d/keys # Copy scripts to /usr/sbin mkdir -p $BUILD_ROOT/usr/sbin -install -Dp -m0755 mkrlconf.sh $BUILD_ROOT/usr/sbin/ -install -Dp -m0755 mvrefind.sh $BUILD_ROOT/usr/sbin/ +install -Dp -m0755 mkrlconf $BUILD_ROOT/usr/sbin/ +install -Dp -m0755 mvrefind $BUILD_ROOT/usr/sbin/ # Copy banners and fonts to /usr/share/refind cp -a banners $BUILD_ROOT/usr/share/refind/ diff --git a/debian/postinst b/debian/postinst index af54dbe..af73308 100755 --- a/debian/postinst +++ b/debian/postinst @@ -37,14 +37,14 @@ declare OpenSSL=`which openssl 2> /dev/null` # their own local keys. if [[ $IsSecureBoot == "1" && -n $ShimFile ]] ; then if [[ -n $SBSign && -n $OpenSSL ]] ; then - ./install.sh --shim $ShimFile --localkeys --yes + ./refind-install --shim $ShimFile --localkeys --yes else - ./install.sh --shim $ShimFile --yes + ./refind-install --shim $ShimFile --yes fi else if [[ -n $SBSign && -n $OpenSSL ]] ; then - ./install.sh --localkeys --yes + ./refind-install --localkeys --yes else - ./install.sh --yes + ./refind-install --yes fi fi diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 9b99a00..a497a71 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -283,7 +283,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer.

- +

If you want to use one or more of these drivers, you can install them from the rEFInd binary package from the refind/drivers_arch directory, where arch is a CPU architecture code—x64 or ia32. The files are named after the filesystems they handle, such as ext4_x64.efi for the 64-bit ext4fs driver. You should copy the files for the filesystems you want to use to the drivers or drivers_arch subdirectory of the main rEFInd installation directory. (You may need to create this subdirectory.) Be careful to install drivers only for your own architecture. Attempting to load drivers for the wrong CPU type will cause a small delay at best, or may cause the computer to crash at worst. I've placed rEFInd's drivers in directories that are named to minimize this risk, but you should exercise care when copying driver files.

diff --git a/docs/refind/getting.html b/docs/refind/getting.html index f4720e9..c359222 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -158,11 +158,12 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

binary RPM file—If you use an RPM-based x86-64 Linux system such as Fedora or openSUSE, you can install the binary RPM package rather than use the binary zip file. (I don't provide an - equivalent 32-bit package.) This package runs the install.sh - script (described on the Installing - rEFInd page) as part of the installation process. Distribution - maintainers can examine the refind.spec file in the source - package and tweak it to their needs. The refind-install script (described on the Installing rEFInd page) as part of the + installation process. Distribution maintainers can examine the + refind.spec file in the source package and tweak it to their + needs. The source RPM file might or might not build on your system as-is; it relies on assumptions about the locations of the GNU-EFI development @@ -196,12 +197,12 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

+flash drive with a FAT32 partition, and then use the +refind-install program's --usedefault option, and perhaps +the --alldrivers option, as in bash +refind-install --usedefault /dev/sdd1 --alldrivers to install to the +first partition on /dev/sdd. This procedure should work even on a +BIOS-booted computer.

  • A diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 8497bf8..64821ac 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -132,9 +132,9 @@ 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.

    +

    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 refind-install script in minute or two.

    -

    Once you've obtained a rEFInd binary file, as described on the preceding page, you must install it to your computer's EFI System Partition (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.

    +

    Once you've obtained a rEFInd binary file, as described on the preceding page, you must install it to your computer's EFI System Partition (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 refind-install script can be a good way to go. If you're using Windows, you'll have to install manually.

    @@ -148,13 +148,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Installing rEFInd using an RPM or Debian package file
  • -
  • Installing rEFInd Using install.sh under Linux or Mac OS X +
  • Installing rEFInd Using refind-install under Linux or Mac OS X
  • @@ -174,7 +174,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    -

    In addition to these quirks, you should be aware of some options that install.sh supports to enable you to customize your installation in various ways. The syntax for install.sh is as follows:

    +

    In addition to these quirks, you should be aware of some options that refind-install supports to enable you to customize your installation in various ways. The syntax for refind-install is as follows:

    -install.sh [--notesp | --usedefault device-file | --root mount-point | \
    +refind-install [--notesp | --usedefault device-file | --root mount-point | \
                 --ownhfs device-file ] [--keepname ] \
                [--nodrivers | --alldrivers] [--shim shim-filename] [--localkeys] [--yes]
     

    The details of the options are summarized in Table 1. Broadly speaking, they come in four classes: installation location options (--notesp, --usedefault, and --root), driver options (--nodrivers and --alldrivers), Secure Boot options (--shim and --localkeys), and a user input option (--yes). Using some of these options in unusual conditions can generate warnings and prompts to confirm your actions. In particular, using --shim or --localkeys when you're not booted in Secure Boot mode, or failing to use --shim when you are booted in Secure Boot mode, will generate a query and a request to confirm your installation. Consult the Managing Secure Boot page for more on this topic.

    - +
    Table 1: Options to install.sh
    - + @@ -442,41 +442,41 @@ install.sh [--notesp | --usedefault device-file | --ro - + - + - + - + - + - + - +
    Table 1: Options to refind-install
    Option Explanation
    --notespThis option, which is valid only under OS X, tells install.sh to install rEFInd to the OS X root partition rather than to the ESP. This behavior was the default in rEFInd 0.8.3 and earlier, so you may want to use it when upgrading installations of that version, unless you used --esp (which is now the default behavior, although the --esp option no longer exists) or --ownhfs. You may also want to use --notesp on new installations if you're sure you're not using whole-disk encryption or logical volumes.This option, which is valid only under OS X, tells refind-install to install rEFInd to the OS X root partition rather than to the ESP. This behavior was the default in rEFInd 0.8.3 and earlier, so you may want to use it when upgrading installations of that version, unless you used --esp (which is now the default behavior, although the --esp option no longer exists) or --ownhfs. You may also want to use --notesp on new installations if you're sure you're not using whole-disk encryption or logical volumes.
    --usedefault device-file
    --root /mount-pointThis option is intended to help install rEFInd from a "live CD" or other emergency system. To use it, you should mount your regular installation at /mount-point, including your /boot directory (if it's separate) at /mount-point/boot and (on Linux) your ESP at that location or at /mount-point/boot/efi. The install.sh script then installs rEFInd to the appropriate location—on Linux, /mount-point/boot/EFI/refind or /mount-point/boot/efi/EFI/refind, depending on where you've mounted your ESP. Under OS X, this option is only useful in conjunction with --notesp, in which case rEFInd will install to /mount-point/EFI/refind. The script also adds an entry to your NVRAM for rEFInd at this location. You cannot use this option with --usedefault. Note that this option is not needed when doing a dual-boot Linux/OS X installation; just install normally in OS X.This option is intended to help install rEFInd from a "live CD" or other emergency system. To use it, you should mount your regular installation at /mount-point, including your /boot directory (if it's separate) at /mount-point/boot and (on Linux) your ESP at that location or at /mount-point/boot/efi. The refind-install script then installs rEFInd to the appropriate location—on Linux, /mount-point/boot/EFI/refind or /mount-point/boot/efi/EFI/refind, depending on where you've mounted your ESP. Under OS X, this option is only useful in conjunction with --notesp, in which case rEFInd will install to /mount-point/EFI/refind. The script also adds an entry to your NVRAM for rEFInd at this location. You cannot use this option with --usedefault. Note that this option is not needed when doing a dual-boot Linux/OS X installation; just install normally in OS X.
    --nodriversOrdinarily install.sh attempts to install the driver required to read /boot on Linux. This attempt works only if you're using ext2fs, ext3fs, ext4fs, or ReiserFS on the relevant partition. If you want to forego this driver installation, pass the --nodrivers option. This option is the implicit when you use --usedefault.Ordinarily refind-install attempts to install the driver required to read /boot on Linux. This attempt works only if you're using ext2fs, ext3fs, ext4fs, or ReiserFS on the relevant partition. If you want to forego this driver installation, pass the --nodrivers option. This option is the implicit when you use --usedefault.
    --alldriversWhen you specify this option, install.sh copies all the driver files for your architecture. You may want to remove unused driver files after you use this option, especially if your computer uses Secure Boot. Note that some computers hang or fail to work with any drivers if you use this option, so use it with caution.When you specify this option, refind-install copies all the driver files for your architecture. You may want to remove unused driver files after you use this option, especially if your computer uses Secure Boot. Note that some computers hang or fail to work with any drivers if you use this option, so use it with caution.
    --shim shim-filename or --preloader preloader-filenameIf you pass this option to install.sh, the script will copy the specified shim program file to the target directory, copy the MokManager.efi file from the shim program file's directory to the target directory, copy the 64-bit version of rEFInd as grubx64.efi, and register shim with the firmware. (If you also specify --usedefault, the NVRAM registration is skipped. If you also use --keepname, the renaming to grubx64.efi is skipped.) When the target file is identified as PreLoader, much the same thing happens, but install.sh copies HashTool.efi instead of MokManager.efi and copies rEFInd as loader.efi rather than as grubx64.efi. The intent is to simplify rEFInd installation on a computer that uses Secure Boot; when so set up, rEFInd will boot in Secure Boot mode, with one caveat: The first time you boot, MokManager/HashTool will launch, and you must use it to locate and install a public key or register rEFInd as a trusted application. The rEFInd public key file will be located in the rEFInd directory's keys subdirectory under the name refind.cer. Note that I'm not providing a shim binary myself, but you can download one from here. Some distributions also provide their own shim programs, so can point to them—for instance, in /boot/efi/EFI/fedora/shim.efi.If you pass this option to refind-install, the script will copy the specified shim program file to the target directory, copy the MokManager.efi file from the shim program file's directory to the target directory, copy the 64-bit version of rEFInd as grubx64.efi, and register shim with the firmware. (If you also specify --usedefault, the NVRAM registration is skipped. If you also use --keepname, the renaming to grubx64.efi is skipped.) When the target file is identified as PreLoader, much the same thing happens, but refind-install copies HashTool.efi instead of MokManager.efi and copies rEFInd as loader.efi rather than as grubx64.efi. The intent is to simplify rEFInd installation on a computer that uses Secure Boot; when so set up, rEFInd will boot in Secure Boot mode, with one caveat: The first time you boot, MokManager/HashTool will launch, and you must use it to locate and install a public key or register rEFInd as a trusted application. The rEFInd public key file will be located in the rEFInd directory's keys subdirectory under the name refind.cer. Note that I'm not providing a shim binary myself, but you can download one from here. Some distributions also provide their own shim programs, so can point to them—for instance, in /boot/efi/EFI/fedora/shim.efi.
    --localkeysThis option tells install.sh to generate a new Machine Owner Key (MOK), store it in /etc/refind.d/keys as refind_local.*, and re-sign all the 64-bit rEFInd binaries with this key before installing them. This is the preferable way to install rEFInd in Secure Boot mode, since it means your binaries will be signed locally rather than with my own key, which is used to sign many other users' binaries; however, this method requires that both the openssl and sbsign binaries be installed. The former is readily available in most distributions' repositories, but the latter is not, so this option is not the default.This option tells refind-install to generate a new Machine Owner Key (MOK), store it in /etc/refind.d/keys as refind_local.*, and re-sign all the 64-bit rEFInd binaries with this key before installing them. This is the preferable way to install rEFInd in Secure Boot mode, since it means your binaries will be signed locally rather than with my own key, which is used to sign many other users' binaries; however, this method requires that both the openssl and sbsign binaries be installed. The former is readily available in most distributions' repositories, but the latter is not, so this option is not the default.
    --keepnameThis option is useful only in conjunction with --shim. It tells install.sh to keep rEFInd's regular filename (typically refind_x64.efi) when used with shim, rather than rename the binary to grubx64.efi. This change cuts down on the chance of confusion because of filename issues; however, this feature requires that shim be launched with a command-line parameter that points to the rEFInd binary under its real name. versions of shim prior to 0.7 do not properly support this feature. (Version 0.4 supports it but with a buggy interpretation of the follow-on loader specification.) If your NVRAM variables become corrupted or are forgotten, this feature may make rEFInd harder to launch. This option is incompatible with --usedefault and is unavailable when run under OS X or without the --shim option. If the script discovers an existing rEFInd installation under EFI/BOOT or EFI/Microsoft/Boot and no other rEFInd installation when this option is used, it will abort.This option is useful only in conjunction with --shim. It tells refind-install to keep rEFInd's regular filename (typically refind_x64.efi) when used with shim, rather than rename the binary to grubx64.efi. This change cuts down on the chance of confusion because of filename issues; however, this feature requires that shim be launched with a command-line parameter that points to the rEFInd binary under its real name. versions of shim prior to 0.7 do not properly support this feature. (Version 0.4 supports it but with a buggy interpretation of the follow-on loader specification.) If your NVRAM variables become corrupted or are forgotten, this feature may make rEFInd harder to launch. This option is incompatible with --usedefault and is unavailable when run under OS X or without the --shim option. If the script discovers an existing rEFInd installation under EFI/BOOT or EFI/Microsoft/Boot and no other rEFInd installation when this option is used, it will abort.
    --yesThis option causes the script to assume a Y input to every yes/no prompt that can be generated under certain conditions, such as if you specify --shim but install.sh detects no evidence of a Secure Boot installation. This option is intended mainly for use by scripts such as those that might be used as part of an installation via an RPM or Debian package.This option causes the script to assume a Y input to every yes/no prompt that can be generated under certain conditions, such as if you specify --shim but refind-install detects no evidence of a Secure Boot installation. This option is intended mainly for use by scripts such as those that might be used as part of an installation via an RPM or Debian package.
    -

    After you run install.sh, 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.

    +

    After you run refind-install, you should peruse the script's output to ensure that everything looks OK. refind-install 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 Manually

    -

    Sometimes the install.sh script just won't do the job, or you may need to install using an OS that it doesn't support, such as Windows. In these cases, you'll have to install rEFInd the old-fashioned way, using file-copying commands and utilities to add the program to your EFI's boot loader list. I describe how to do this with Linux, OS X, Windows, and the EFI shell.

    +

    Sometimes the refind-install script just won't do the job, or you may need to install using an OS that it doesn't support, such as Windows. In these cases, you'll have to install rEFInd the old-fashioned way, using file-copying commands and utilities to add the program to your EFI's boot loader list. I describe how to do this with Linux, OS X, Windows, and the EFI shell.

    Installing rEFInd Manually Using Linux

    @@ -803,16 +803,16 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi -

    If you need to use one of these names, or something more exotic, you can do so in either of two ways: You can use the mvrefind.sh script to move your installation in one step, or you can move and rename your files manually.

    +

    If you need to use one of these names, or something more exotic, you can do so in either of two ways: You can use the mvrefind script to move your installation in one step, or you can move and rename your files manually.

    -

    Using mvrefind.sh

    +

    Using mvrefind

    -

    The easiest way to move a rEFInd installation, at least in Linux, is to use the mvrefind.sh script. If you installed from one of my RPM or Debian packages, this script should be installed in /usr/sbin, so you can use it like a regular Linux command; otherwise you'll need to install it to your path yourself or type its complete path. Either way, it works much like the Linux mv command, but you pass it the directory in which a rEFInd installation appears and a target location:

    +

    The easiest way to move a rEFInd installation, at least in Linux, is to use the mvrefind script. If you installed from one of my RPM or Debian packages, this script should be installed in /usr/sbin, so you can use it like a regular Linux command; otherwise you'll need to install it to your path yourself or type its complete path. Either way, it works much like the Linux mv command, but you pass it the directory in which a rEFInd installation appears and a target location:

    -# mvrefind.sh /boot/efi/EFI/BOOT /boot/efi/EFI/refind
    +# mvrefind /boot/efi/EFI/BOOT /boot/efi/EFI/refind
     

    This example moves rEFInd from /boot/efi/EFI/BOOT to /boot/efi/EFI/refind. It differs from mv in several ways: @@ -820,7 +820,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

    • The script renames rEFInd in a way that's sensitive to its source and - destination directories—for instance, mvrefind.sh knows + destination directories—for instance, mvrefind knows that rEFInd (or shim, for Secure Boot installations) must be called bootx64.efi on a 64-bit installation in /boot/efi/EFI/BOOT, so it looks for rEFInd under that name @@ -841,7 +841,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
    -

    The mvrefind.sh script is likely to be useful in resolving boot problems—if your system won't boot, you can try copying the installation to /boot/efi/EFI/BOOT, /boot/efi/EFI/Microsoft/Boot, and /boot/efi/EFI/refind in turn, testing the boot process after each attempt. (These filenames all assume your ESP is mounted at /boot/efi.) You could also copy a BIOS-mode install from /boot/efi/EFI/BOOT or /boot/efi/EFI/Microsoft/Boot to /boot/efi/EFI/refind to make it more robust against Windows repairs (assuming your firmware isn't broken).

    +

    The mvrefind script is likely to be useful in resolving boot problems—if your system won't boot, you can try copying the installation to /boot/efi/EFI/BOOT, /boot/efi/EFI/Microsoft/Boot, and /boot/efi/EFI/refind in turn, testing the boot process after each attempt. (These filenames all assume your ESP is mounted at /boot/efi.) You could also copy a BIOS-mode install from /boot/efi/EFI/BOOT or /boot/efi/EFI/Microsoft/Boot to /boot/efi/EFI/refind to make it more robust against Windows repairs (assuming your firmware isn't broken).

    Renaming Files Manually

    @@ -890,24 +890,24 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
  • In OS X, if you copy over the original file with the new one, you'll probably have to re-bless it to make it work.
  • -
  • Under Linux or OS X, you can re-run the install.sh script. In +
  • Under Linux or OS X, you can re-run the refind-install script. In most cases this works fine, but you'll end up with a duplicate of the icons directory (icons-backup, which holds the original icons, whereas icons holds the icons from the new package). Normally this just wastes some disk space; but if you've customized your icons, you'll need to copy your altered icons back. Under Linux, versions - 0.6.2 and later of install.sh search for rEFInd in several + 0.6.2 and later of refind-install search for rEFInd in several locations on the ESP, and will upgrade whatever is found. The same is true with versions 0.8.5 and later under OS X when installing to the ESP. If you install to a location other than the ESP under OS X, be - sure to include the same option to install.sh + sure to include the same option to refind-install (--notesp or --ownhfs) to replace the original rather than create a new installation to the ESP.
  • Under an RPM- or Debian-based Linux distribution, you can use your package system to install a newer version of the RPM or Debian package that I provide. This will upgrade the files in your Linux filesystem - and re-run the install.sh script, so as with the previous + and re-run the refind-install script, so as with the previous options, you'll waste a little disk space on duplicated icons, but the process should otherwise work quite well.
  • @@ -917,14 +917,14 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi on how the package was created, though, this update might or might not install the update to the ESP; you might need to manually re-run the installation script. Consult your distribution's documentation for - details. My Ubuntu PPA will automatically run install.sh after + details. My Ubuntu PPA will automatically run refind-install after the package is installed. -

    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 refind-install, 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.

    +

    If you're upgrading to rEFInd from rEFIt, you can simply run the refind-install 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.

    Installing Additional Components

    @@ -984,7 +984,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi 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 + gptsync_ia32.efi. The rEFInd refind-install 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 @@ -1034,7 +1034,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi

    Using the --shortform Option

    -

    Prior to version 0.8.5, these instructions and the install.sh script omitted the --shortform option from the bless command when installing rEFInd to the ESP. An rEFInd user, however, discovered that using the option eliminated the 30-second delay, so it is now the default with 0.8.5's install.sh, and is specified in the instructions. If you installed rEFInd 0.8.4 or earlier, you may want to re-install or re-bless rEFInd using this option.

    +

    Prior to version 0.8.5, these instructions and the refind-install script omitted the --shortform option from the bless command when installing rEFInd to the ESP. An rEFInd user, however, discovered that using the option eliminated the 30-second delay, so it is now the default with 0.8.5's refind-install, and is specified in the instructions. If you installed rEFInd 0.8.4 or earlier, you may want to re-install or re-bless rEFInd using this option.

    There is one caveat, though: The man page for bless notes that --shortform notes that its use can come "at the expense of boot time performance." Thus, it's not clear to me that this option might not actually create problems on some computers. (It's eliminated the boot delay on my 2014 MacBook Air and has no detrimental effect on an old 32-bit Mac Mini that's never had a boot delay problem, though.) Thus, if you have problems with rEFInd 0.8.5 or later, you might try running bless, as described in Installing rEFInd Manually Using OS X's step 8, but omit the --shortform option.

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

    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 a sluggish boot problem. In fact, version 0.8.4's install.sh script copied the rEFInd binary to this name when run under OS X. (Version 0.8.5 switches to using --shortform with the more conventional EFI/refind/refind_x64.efi or EFI/refind/refind_ia32.efi name, as just noted.) If you installed to a name other than EFI/BOOT/BOOT{ARCH}, either manually or by using the 0.8.5 or later install.sh, renaming (and re-blessing) the installation is worth trying.

    +

    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 a sluggish boot problem. In fact, version 0.8.4's refind-install script copied the rEFInd binary to this name when run under OS X. (Version 0.8.5 switches to using --shortform with the more conventional EFI/refind/refind_x64.efi or EFI/refind/refind_ia32.efi name, as just noted.) If you installed to a name other than EFI/BOOT/BOOT{ARCH}, either manually or by using the 0.8.5 or later refind-install, renaming (and re-blessing) the installation is worth trying.

    Moving rEFInd to an HFS+ Volume

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

    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. (This location is not an option when using WDE or OS X logical volumes.) 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.

    +

    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 refind-install, as in ./refind-install --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.

    @@ -1082,7 +1082,7 @@ $ ioreg -l -p IODeviceTree | grep firmware-abi
    -
  • Improvements to gptsync, install.sh, or other +
  • Improvements to gptsync, refind-install, or other support tools:
      diff --git a/mkdistrib b/mkdistrib index c2f785f..9be32c9 100755 --- a/mkdistrib +++ b/mkdistrib @@ -52,7 +52,7 @@ mkdir -p ../snapshots/$1/refind-$1/icons/licenses ../snapshots/$1/refind-$1/icon cp --preserve=timestamps icons/*png icons/README ../snapshots/$1/refind-$1/icons/ cp --preserve=timestamps -r icons/licenses/* ../snapshots/$1/refind-$1/icons/licenses/ cp --preserve=timestamps -r icons/svg/* ../snapshots/$1/refind-$1/icons/svg/ -cp -a debian docs images keys fonts banners include EfiLib libeg mok net refind filesystems gptsync refind.spec install.sh mkrlconf.sh mvrefind.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 +cp -a debian docs images keys fonts banners include EfiLib libeg mok net refind filesystems gptsync refind.spec refind-install mkrlconf mvrefind CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 # Go there and prepare a souce code tarball.... cd ../snapshots/$1/ @@ -102,7 +102,7 @@ else cp --preserve=timestamps gptsync/gptsync_x64.efi refind-bin-$1/refind/tools_x64/ fi cp refind-bin-$1/refind/refind_x64.efi $StartDir -cp -a docs keys banners fonts COPYING.txt LICENSE.txt README.txt CREDITS.txt NEWS.txt install.sh mkrlconf.sh mvrefind.sh refind-bin-$1 +cp -a docs keys banners fonts COPYING.txt LICENSE.txt README.txt CREDITS.txt NEWS.txt refind-install mkrlconf mvrefind refind-bin-$1 # Prepare the final .zip file zip -9r ../refind-bin-$1.zip refind-bin-$1 diff --git a/mkrlconf.sh b/mkrlconf similarity index 93% rename from mkrlconf.sh rename to mkrlconf index 478cd44..f6369c7 100755 --- a/mkrlconf.sh +++ b/mkrlconf @@ -10,7 +10,7 @@ # Usage: # -# ./mkrlconf.sh [--force] +# ./mkrlconf [--force] # # Options: # @@ -18,11 +18,12 @@ # Revision history: # +# 0.9.3 -- Renamed from mkrlconf.sh to mkrlconf # 0.9.0 -- Added check for OS type, to keep from running pointlessly on OS X # 0.7.7 -- Fixed bug that caused stray PARTUUID= and line breaks in generated file # 0.5.1 -- Initial release # -# Note: mkrlconf.sh version numbers match those of the rEFInd package +# Note: mkrlconf version numbers match those of the rEFInd package # with which they first appeared. RLConfFile="/boot/refind_linux.conf" diff --git a/mvrefind.sh b/mvrefind similarity index 98% rename from mvrefind.sh rename to mvrefind index b1e14ec..6b16a1a 100755 --- a/mvrefind.sh +++ b/mvrefind @@ -4,7 +4,7 @@ # # Usage: # -# ./mvrefind.sh /path/to/source /path/to/destination +# ./mvrefind /path/to/source /path/to/destination # # Typically used to "hijack" or "unhijack" a Windows boot loader location or # to help convert a rEFInd installation made in BIOS mode to one that works @@ -12,9 +12,10 @@ # # Revision history: # +# 0.9.3 -- Renamed from mvrefind.sh to mvrefind # 0.6.3 -- Initial release # -# Note: mvrefind.sh version numbers match those of the rEFInd package +# Note: mvrefind version numbers match those of the rEFInd package # with which they first appeared. RootDir="/" diff --git a/install.sh b/refind-install similarity index 99% rename from install.sh rename to refind-install index a503820..cd9b07b 100755 --- a/install.sh +++ b/refind-install @@ -4,7 +4,7 @@ # # Usage: # -# ./install.sh [options] +# ./refind-install [options] # # options include: # "--notesp" to install to the OS X root filesystem rather than to the ESP. diff --git a/refind.spec b/refind.spec index fb63d6c..267e2be 100644 --- a/refind.spec +++ b/refind.spec @@ -86,7 +86,7 @@ fi install -Dp -m0644 refind.conf-sample $RPM_BUILD_ROOT/usr/share/refind-%{version}/refind/ cp -a icons $RPM_BUILD_ROOT/usr/share/refind-%{version}/refind/ rm -rf $RPM_BUILD_ROOT/usr/share/refind-%{version}/refind/icons/svg -install -Dp -m0755 install.sh $RPM_BUILD_ROOT/usr/share/refind-%{version}/ +install -Dp -m0755 refind-install $RPM_BUILD_ROOT/usr/share/refind-%{version}/ # Copy documentation to /usr/share/doc/refind-%{version} mkdir -p $RPM_BUILD_ROOT/usr/share/doc/refind-%{version} @@ -99,8 +99,8 @@ install -Dp -m0644 keys/* $RPM_BUILD_ROOT/etc/refind.d/keys # Copy scripts to /usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/sbin -install -Dp -m0755 mkrlconf.sh $RPM_BUILD_ROOT/usr/sbin/ -install -Dp -m0755 mvrefind.sh $RPM_BUILD_ROOT/usr/sbin/ +install -Dp -m0755 mkrlconf $RPM_BUILD_ROOT/usr/sbin/ +install -Dp -m0755 mvrefind $RPM_BUILD_ROOT/usr/sbin/ # Copy banners and fonts to /usr/share/refind-%{version} cp -a banners $RPM_BUILD_ROOT/usr/share/refind-%{version}/ @@ -112,8 +112,8 @@ cp -a fonts $RPM_BUILD_ROOT/usr/share/refind-%{version}/ %files %defattr(-,root,root -) %doc /usr/share/doc/refind-%{version} -/usr/sbin/mkrlconf.sh -/usr/sbin/mvrefind.sh +/usr/sbin/mkrlconf +/usr/sbin/mvrefind /usr/share/refind-%{version} /etc/refind.d/ @@ -151,21 +151,21 @@ declare OpenSSL=`which openssl 2> /dev/null` # encourage users to use their own local keys. if [[ $IsSecureBoot == "1" && -n $ShimFile ]] ; then if [[ -n $SBSign && -n $OpenSSL ]] ; then - ./install.sh --shim $ShimFile --localkeys --yes + ./refind-install --shim $ShimFile --localkeys --yes else - ./install.sh --shim $ShimFile --yes + ./refind-install --shim $ShimFile --yes fi else if [[ -n $SBSign && -n $OpenSSL ]] ; then - ./install.sh --localkeys --yes + ./refind-install --localkeys --yes else - ./install.sh --yes + ./refind-install --yes fi fi # CAUTION: Don't create a %preun or a %postun script that deletes the files -# installed by install.sh, since that script will run after an update, thus -# wiping out the just-updated files. +# installed by refind-install, since that script will run after an update, +# thus wiping out the just-updated files. %changelog * Sat Sep 19 2015 R Smith - 0.9.2