REFIND-INSTALL(8)
REFIND-INSTALL(8) β rEFInd Manual π
any later version
β¨ NAME β¨
refind-install β installs rEFInd to the ESP and creates an NVRAM entry. π
πΈ SYNOPSIS πΈ
refind-install [--notesp | --usedefault device-file | --root mount-point
| --ownhfs device-file ] [--keepname] [--nodrivers | --alldrivers]
[--shim shim-filename] [--localkeys] [--encryptkeys] [--yes]
π DESCRIPTION π
Okay so real talk, bestie: for rEFInd to actually do its thing, the rEFInd boot manager has to be installed to your computer's EFI System Partition (ESP) or some other EFI-accessible location. And most of the time you also need an NVRAM entry that says where rEFInd lives. You could do all this by hand, but refind-install is the automated bestie that handles it for you under both Linux and OS X. Fair warning though: the exact behavior and options are different depending on which OS you're on. π
Here are some deets that can affect how the script runs:
- If you run the script as an ordinary user, it tries to get root privileges using the
sudocommand. That works on Mac OS X and some Linux setups (like under Ubuntu, or if you've added yourself to the sudo users list), but on some Linux installations it will fail. On those systems, you should runrefind-installas root. π - On OS X, you can run the script with a mouse: open a Terminal session, then drag-and-drop the
refind-installfile into the Terminal window. You'll still need to press Return or Enter to actually run it. π±οΈ - If you're using OS X 10.7's Whole Disk Encryption (WDE) feature, or the loogical volumes feature in OS X 10.10, you must install rEFInd to the ESP or to a separate HFS+ partition. The default in rEFInd 0.8.4 and later is to install to the ESP. If you'd rather use a separate HFS+ volume, you need the
--ownhfs device-fileoption torefind-install. π - If you're not using WDE or logical volumes, you can install rEFInd to the OS X root (
/) partition by using the--notespoption torefind-install. This option is recommended when you're upgrading from a working rEFInd installation in that location. β¨ - If you're replacing rEFIt with rEFInd on a Mac,
refind-installmight warn you about a program called/Library/StartupItems/rEFItBlesserand ask if you want to delete it. This program is designed to keep rEFIt set as the boot manager by automatically re-blessing it if the default boot manager changes. That's obviously not it if you're installing rEFInd as your primary boot manager, so it's generally best to remove this program. If you prefer to keep your options open, you can answerNwhenrefind-installasks if you want to deleterEFItBlesser, and manually copy it elsewhere instead. If you later decide to go back to using rEFIt as your primary boot manager, you can restorerEFItBlesserto its place. π - If you intend to boot BIOS-based OSes on a UEFI-based PC, you must edit the
refind.conffile'sscanforline to enable the relevant searches. Not necessary on Macs, though β because dual boots with Windows on Macs are so popular, the BIOS/legacy scans are enabled by default on Macs. π₯ - On Linux,
refind-installchecks the filesystem type of the/bootdirectory and, if a matching filesystem driver is available, installs it. Note that the/bootdirectory may be on a separate partition or it may be part of your root (/) filesystem β in that case, the driver for your root filesystem is installed. This feature is unlikely to work properly from an emergency system, although it might if you have a separate/bootpartition and you mount that partition at/bootin your emergency system, and the ESP at/boot/efi. π§ - On OS X,
refind-installchecks your partition tables for signs of a Linux installation. If it finds one, the script installs the EFI filesystem driver for the Linux ext4 filesystem. This lets rEFInd read your Linux kernel if it's on an ext2, ext3, or ext4 filesystem. Heads up: some configurations will require a/boot/refind_linux.conffile, which can be reliably generated only under Linux. (Themkrlconfscript that comes with rEFInd will do this job once you've booted Linux.) In the meantime, you can launch GRUB from rEFInd, or pressF2orInserttwice after highlighting the Linux option in rEFInd. This lets you enter aroot=/dev/whateverspecification, where/dev/whateveris the device identifier of your Linux root (/) filesystem. π¦ - If you run
refind-installon Linux and/boot/refind_linux.confdoesn't already exist,refind-installcreates this file and populates it with a few sample entries. If/bootis on a FAT partition (or HFS+ on a Mac), or if it's on an ext2fs, ext3fs, ext4fs, ReiserFS, Btrfs, or HFS+ partition and you install an appropriate driver, rEFInd will detect your kernel and will probably boot it correctly. Some systems will require manual tweaking torefind_linux.conf, though β for instance, to adddolvmto the boot options on Gentoo systems that use LVM. πΈ - If you pass the
--shimoption to the script (along with a filename for a Shim binary), the script sets up for a Secure Boot configuration via Shim. By default, this causes the rEFInd binary to be renamed asgrubx64.efi. Recent versions of Shim support passing the name of the follow-on program to Shim via a parameter, though. If you want to use this feature, you can pass the--keepnameoption torefind-install. π‘οΈ
After you run refind-install, bestie, please actually read the script's output to make sure everything looks OK. refind-install displays error messages when it hits errors β like if the ESP is mounted read-only or if you run out of disk space. You may need to fix those 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 like which partition to use for installation. π
β¨ OPTIONS β¨
okay bestie, here's the whole menu of flags. pick your faves, no judgement π
--notespβ this one is OS X only, no exceptions. it tellsrefind-installto put rEFInd on the OS X root partition instead of the ESP. fun fact: that was literally the default back in rEFInd 0.8.3 and earlier, so if you're upgrading an install from back then you might wanna use it β unless you used--esp(which is now the default behavior, even though the--espoption doesn't exist anymore π) or--ownhfs. you might also want it on brand-new installs if you're 100% sure you're not using whole-disk encryption or logical volumes. periodt.--usedefaultdevice-file β install rEFInd to a disk using the default/fallback filenameEFI/BOOT/bootx64.efiβ and alsoEFI/BOOT/bootia32.efiandEFI/BOOT/bootaa64.efi, if the IA-32 and ARM64 builds are available π¦. the device-file should be an unmounted ESP, or at minimum a FAT partition, like so:
--usedefault /dev/sdc1
your computer's NVRAM entries will not be modified this way. the whole point is that you can make a bootable USB flash drive π or install rEFInd on a computer that keeps "forgetting" its NVRAM settings (we've all met that computer). this option is mutually exclusive with --notesp and --root β pick one, bestie, you can't have both.
--ownhfsdevice-file β OS X only, do not try this elsewhere. it installs rEFInd to an HFS+ volume that isn't a standard Mac boot volume. the result? rEFInd shows up in the Mac's own boot manager, and β more importantly β suspend-to-RAM operations may actually work correctly π. heads up: this needs an HFS+ volume that is not currently an OS X boot volume. that can be a data volume or a dedicated rEFInd partition. the ESP might also work if you convert it to HFS+, but HFS+ is a non-standard filesystem for an ESP, so it's not recommended.--rootmount-point β this one's for installing rEFInd from a "live CD" or other emergency system, main character rescue energy π«Ά. to use it, mount your regular installation at /mount-point, including your/bootdirectory (if it's separate) at/mount-point/boot, and β on Linux β your ESP at that location or at/mount-point/boot/efi. thenrefind-installdrops rEFInd in the right spot: on Linux that's/mount-point/boot/EFI/refindor/mount-point/boot/efi/EFI/refind, depending on where you mounted your ESP. under OS X this option is only useful alongside--notesp, in which case rEFInd installs to/mount-point/EFI/refind. the script also adds an NVRAM entry for rEFInd at that location β¨. you cannot use this with--usedefault. also ngl, you don't need this at all for a dual-boot Linux/OS X installation β just install normally in OS X.--nodriversβ normallyrefind-installtries to install the driver it needs to read/booton Linux. that attempt only works if you're usingext2fs,ext3fs,ext4fs,ReiserFS, orBtrfson the relevant partition. if you'd rather skip the whole driver installation, pass--nodrivers. it's implicit when you use--usedefault.--alldriversβ say the word andrefind-installcopies all the driver files for your architecture. you'll probably wanna delete the unused ones afterward. but β warning β some computers hang or just refuse to work with any drivers if you use this, so use it with caution β οΈ. it's giving "with great power."--shimshim-filename or--preloaderpreloader-filename β pass this and the script copies the specified shim program file to the target directory, copies theMokManager.efifile from the shim program file's directory to the target directory, copies the 64-bit version of rEFInd asgrubx64.efi, and registers shim with the firmware π₯. (if you also specify--usedefault, the NVRAM registration is skipped. if you also use--keepname, the renaming togrubx64.efiis skipped.) when the target file is identified as PreLoader, pretty much the same thing goes down, exceptrefind-installcopiesHashTool.efiinstead ofMokManager.efiand copies rEFInd asloader.efirather than asgrubx64.efi. the intent here is to make rEFInd installation on a Secure Boot computer less of a nightmare; set up this way, rEFInd boots in Secure Boot mode with exactly one caveat: the very first time you boot, MokManager/HashTool launches, and you must use it to locate and install a public key or register rEFInd as a trusted application π. the rEFInd public key file lives in the rEFInd directory'skeyssubdirectory, under the namerefind.cer.--localkeysβ this tellsrefind-installto generate a brand-new Machine Owner Key (MOK), stash it in/etc/refind.d/keysasrefind_local.*, and re-sign all the 64-bit rEFInd binaries with that key before installing them π. honestly this is the preferable way to install rEFInd in Secure Boot mode, because it means your binaries get signed locally instead of with the author's own key (which signs a whole bunch of other users' binaries too). downside? this method requires that both theopensslandsbsignbinaries be installed.opensslis readily available in most distributions' repositories, butsbsignis not, so this option is not the default.--encryptkeysβ okay so normally, if you use--localkeys,refind-installstores the local key files on your hard disk in an unencrypted form. meaning: if your computer gets compromised, an intruder could use your own key to sign a modified boot loader, and poof π β there go the benefits of Secure Boot. use this option and the private key is stored encrypted, secured via an encryption password. you have to enter that password before the key can sign any binary, which lowers the risk of someone hijacking your boot process. obviously this is highly desirable β¨ but the downside is real: you must remember the password and type it in whenever you update rEFInd or any other program signed with your private key. it also makes a fully automated update of rEFInd impossible.--keepnameβ only useful together with--shim. it tellsrefind-installto keep rEFInd's regular filename (typicallyrefind_x64.efi) when used with shim, instead of renaming the binary togrubx64.efi. this cuts down on filename-related confusion π; however, this feature requires that shim be launched with a command-line parameter pointing 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 π.) and if your NVRAM variables get corrupted or forgotten, this feature may make rEFInd harder to launch. this option is incompatible with--usedefaultand is unavailable when run under OS X or without the--shimoption. also: if the script discovers an existing rEFInd installation underEFI/BOOTorEFI/Microsoft/Bootand no other rEFInd installation when this option is used, it will abort.--yesβ this one makes the script assume aYinput to every yes/no prompt that can pop up under certain conditions, like if you specify--shimbutrefind-installfinds no evidence of a Secure Boot installation. it's meant mainly for scripts, like the ones that might be part of an installation via an RPM or Debian package π€.
πΈ AUTHORS πΈ
primary author: Roderick W. Smith (rodsmith@rodsbooks.com) π
π¦ SEE ALSO π¦
mkrlconf(8), mvrefind(8), refind-sb-healthcheck(8).
https://www.rodsbooks.com/refind/
π AVAILABILITY π
the refind-install command is part of the rEFInd package and is available from Roderick W. Smith.
and that's the whole thing bestie, you made it to the end π this page is from rEFInd 0.14.2, written by Roderick W. Smith, and it's the REFIND-INSTALL(8) man page β go forth and boot responsibly, iykyk π
β¨
π¦ where this page comes from
- arch rolling: refind 0.14.2-3 Β· BSD-2-Clause AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later OR CC-BY-SA-3.0
- debian trixie: refind 0.14.2-2.1 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: rEFInd-tools 0.14.2-4.fc43 Β· GPL-3.0-or-later
- fedora 44: rEFInd-tools 0.14.2-5.fc44 Β· GPL-3.0-or-later
- nixpkgs unstable: refind 0.14.2
- ubuntu resolute: refind 0.14.2-2.1 Β· BSD-3-Clause AND GPL-3.0-or-later
- ubuntu stonking: refind 0.14.2-2.1 Β· BSD-3-Clause AND GPL-3.0-or-later
- Copyright 2015-2024 Roderick W. Smith (rodsmith@rodsbooks.com)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms