From 26d86fa4b6c17ae9d5afce77e18909d10ba19d90 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 29 Dec 2013 19:04:28 -0500 Subject: [PATCH] Added support for "-c" command-line parameter to rEFInd, to specify configuration file to use. --- NEWS.txt | 11 ++++++++- docs/refind/configfile.html | 4 +++- docs/refind/features.html | 4 ++++ refind/config.c | 8 ++++--- refind/global.h | 1 + refind/lib.c | 27 +++++++++++++++++++++- refind/lib.h | 1 + refind/main.c | 46 ++++++++++++++++++++++++++++++++----- 8 files changed, 90 insertions(+), 12 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index dd45319..52c57d8 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,15 @@ -0.7.7 (??/??/201?): +0.7.7 (12/??/2013): ------------------- +- Added support for specifying the configuration file at program launch, + via the "-c" parameter, as in "refind_x64.efi -c foo.conf" to use the + foo.conf file as the main configuration file. + +- Scans of ext2/3/4fs and ReiserFS partitions now omit partitions with + duplicate filesystem UUIDs. These are likely parts of RAID arrays and so + would have the same boot loaders or kernels as the first one with a given + UUID. + - Added feature in install.sh: Script now tries to locate and mount an ESP in Linux, if it's currently unmounted. diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index 8516a57..664c4d5 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -190,7 +190,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Adjusting the Global Configuration

-

You can adjust many of rEFInd's options by editing its refind.conf file. You can use any text editor you like for the job, but be sure it saves the file in plain ASCII text, not in a word processing format. (In theory, a UTF-16 encoding should also work, but I've not tried that myself.) Note that the EFI shell includes its own editor. If you need to make a change before you launch an OS, you can launch a shell, change to the rEFInd directory, and type edit refind.conf to edit the file. This EFI editor is quite primitive, but it gets the job done. After editing, you'll need to reboot for rEFInd to read the changed configuration file.

+

You can adjust many of rEFInd's options by editing its configuration file. This file is called refind.conf by default; but you can use another filename by passing -c filename as an option, as in refind_x64.efi -c myrefind.conf to use myrefind.conf in rEFInd's main directory. You can specify a configuration file in another directory, but to do so, you must use backslashes as directory separators, as in -c \EFI\other\refind.conf. This feature is intended for users who want to have rEFInd appear in its own menu, with the version launched in this way behaving differently from the original—for instance, to have a secondary rEFInd that provides boot options hidden by the main one. In this scenario, the default refind.conf would have a manual boot stanza defining the new rEFInd instance, including its -c option.

+ +

You can use any text editor you like to edit refind.conf, but be sure it saves the file in plain ASCII text, not in a word processing format. (In theory, a UTF-16 encoding should also work, but this has been poorly tested.) Note that the EFI shell includes its own editor. If you need to make a change before you launch an OS, you can launch a shell, change to the rEFInd directory, and type edit refind.conf to edit the file. This EFI editor is quite primitive, but it gets the job done. After editing, you'll need to reboot or re-launch rEFInd for rEFInd to read the changed configuration file.

Global configuration file options consist of a name token followed by one or more parameters, as in:

diff --git a/docs/refind/features.html b/docs/refind/features.html index 1c19a3d..27f81cd 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -161,6 +161,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Bug fixes, focusing on those that have bothered me personally.
  • +
  • The ability to specify a configuration file to use at program launch + time via the -c filename + command-line option.
  • +
  • User-configurable methods of detecting boot loaders: