From 860fb6e13e399f326ff20e25f9f36070ee67b1a9 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 5 Apr 2012 10:45:42 -0400 Subject: [PATCH] 0.2.4 release version --- docs/refind/bootmode.html | 4 ++-- docs/refind/configfile.html | 44 ++++++++++++++++++++++-------------- docs/refind/features.html | 6 +++-- docs/refind/getting.html | 45 +++++++++++++++++++------------------ docs/refind/index.html | 2 +- docs/refind/installing.html | 33 +++++++-------------------- docs/refind/linux.html | 4 ++-- docs/refind/revisions.html | 4 +++- docs/refind/todo.html | 4 +--- docs/refind/using.html | 12 ++++------ refind.conf-sample | 8 +++---- refind/config.c | 20 ++++++++--------- refind/config.h | 12 +++++----- refind/global.h | 2 +- refind/main.c | 7 +++--- refind/menu.c | 10 ++++----- refind/screen.c | 2 +- 17 files changed, 105 insertions(+), 114 deletions(-) diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index 87bd5c7..c1fa857 100644 --- a/docs/refind/bootmode.html +++ b/docs/refind/bootmode.html @@ -14,7 +14,7 @@

by Roderick W. Smith, rodsmith@rodsbooks.com

-

Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

+

Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

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!

@@ -89,7 +89,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com


-

Before you invest time in downloading and trying to install rEFInd, you may want to verify that you can actually use the program at all. rEFInd is useful only on EFI-based computers, not older BIOS-based computers. In fact, most EFI-based x86-64 computers provide a Compatibility Support Module (CSM), which is essentially a BIOS emulation mode. Some EFI implementations are in fact built atop a conventional BIOS, and retain BIOS's boot abilities via this underlying code. Thus, it's possible that you're currently booting a modern EFI-capable computer in BIOS mode.

+

Before you invest time in downloading and trying to install rEFInd, you may want to verify that you can actually use the program at all. rEFInd is useful only on EFI-based computers, not older BIOS-based computers. In fact, most EFI-based x86-64 computers provide a Compatibility Support Module (CSM), which is essentially a BIOS emulation mode. Some EFI implementations are in fact built atop a conventional BIOS, and retain BIOS's boot abilities via this underlying code. Thus, it's possible that you're currently booting a modern EFI-capable computer in BIOS mode.

Unfortunately, determining which mode you're using can be tricky; the clues are subtle or hidden in ways that require specialized knowledge to extract. This page will help you figure it out. I first present general information on identifying your hardware's capabilities. I then describe ways to identify your current boot mode in both Linux and Windows.

diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index 9c3b9b1..9931f92 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -14,7 +14,7 @@

by Roderick W. Smith, rodsmith@rodsbooks.com

-

Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

+

Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

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!

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

Broadly speaking, rEFInd's configuration file is broken down into two sections: global options and OS stanzas. The global options section sets options that apply globally—to set the timeout period, enable graphics or text mode, and so on. OS stanzas are optional, but if present, they enable you to add new boot options or replace the auto-detected options with customized ones. Both sections include configuration lines and comment lines, the latter being denoted by a leading hash mark (#). rEFInd ignores comment lines, so you can add explanatory text. The default configuration file includes numerous comments explaining each of the options.

-

Hiding EFI Boot Loaders

+

Hiding and Displaying EFI Boot Loaders

- +

Before delving into the configuration file, you should be aware of what you can do by renaming files. By default, rEFInd scans all the filesystems it can read for boot loaders. It scans most of the subdirectories of the EFI directory on every filesystem it can access for files with names that end in .efi. (rEFIt gives special treatment to the TOOLS subdirectory, where it looks for system tools rather than boot loaders.)

@@ -107,6 +103,18 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Another way to hide a boot loader is to move it into rEFInd's own directory. In order to keep rEFInd from showing up in its own menu, it ignores boot loaders in its own directory. This obviously includes the rEFInd binary file itself, but also anything else you might store there.

+

In addition to hiding boot loaders, you can adjust their icons. You can do this in either of two ways:

+ + + +

rEFInd assigns icons to the Windows and OS X boot loaders based on their conventional locations, so they get suitable icons even though they don't follow these rules.

+

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.

@@ -131,9 +139,9 @@ timeout 20 Sets the timeout period in seconds. If 0, the timeout is disabled—rEFInd waits indefinitely for user input. - disable - shell, tools, singleuser, hwtest, or all - Removes the specified menu options for improved security. shell removes the EFI shell, tools removes all the EFI tools, singleuser removes the single-user option from the Mac OS sub-menu, hwtest removes the Mac OS hardware test option, and all removes all of these options. You can specify multiple parameters with this option. The default is to set none of these options. + hideui + banner, label, singleuser, hwtest, arrows, or all + Removes the specified user interface features. banner removes the banner graphic, label removes the text description of each tag, singleuser removes the single-user option from the Mac OS sub-menu, hwtest removes the Mac OS hardware test option, arrows removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, and all removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values. banner @@ -151,9 +159,9 @@ timeout 20 Like selection_big, this sets an alternate highlight graphic, but for the smaller utility tags on the second row. - hideui - banner, shell, tools, funcs, label, or all - Hides the specified user interface elements: The rEFInd logo, the EFI shell icon, all the tools, built-in functions (restart and about), text labels, and all of the above, respectively. Some of these parameters are redundant with disable parameters. The default is to set none of these options. + showtools + shell, gptsync, about, exit, shutdown, and reboot + Specifies which tool tags to display on the second row. shell launches an EFI shell, gptsync launches a tool that creates a hybrid MBR, about displays information about the program, exit terminates rEFInd, shutdown shuts down the computer (or reboots it, on UEFI PCs), and reboot reboots the computer. The tags appear in the order in which you specify them. The default is shell, about, shutdown, reboot. textonly @@ -172,17 +180,19 @@ timeout 20 -

As an example, consider the following refind.conf file:

+

Prior to version 0.2.4, rEFInd supported a token called disable, whose function partially overlapped with hideui. Version 0.2.4 merges many of the features of these two tokens into hideui and creates the new showtools option, which provides the remaining functionality in a more flexible way.

+ +

As an example of rEFInd configuration, consider the following refind.conf file:

 # Sample refind.conf file
 timeout 5
 banner custom.bmp
 scanfor manual,external,optical
-default_selection L
+default_selection elilo
 
-

This example sets a timeout of 5 seconds; loads a custom graphic file called custom.bmp from the directory in which refind.efi resides; uses manual boot loader configuration but also scans for external EFI boot loaders and EFI boot loaders on optical discs; and sets the default boot loader to Linux. Of course, since this file specifies use of manual boot loader configuration, it's not complete; you'll need to add at least one OS stanza to be able to boot from anything but an external disk or optical drive....

+

This example sets a timeout of 5 seconds; loads a custom graphic file called custom.bmp from the directory in which refind.efi resides; uses manual boot loader configuration but also scans for external EFI boot loaders and EFI boot loaders on optical discs; and sets the default boot loader to the first loader found that includes the string elilo. Of course, since this file specifies use of manual boot loader configuration, it's not complete; you'll need to add at least one OS stanza to be able to boot from anything but an external disk or optical drive....

Creating OS Stanzas

@@ -234,7 +244,7 @@ default_selection L graphics on or off - Enables or disables a graphical boot mode. This option is important only for Mac OS X. + Enables or disables a graphical boot mode. This option has an effect only on Macintoshes; UEFI PCs seem to be unaffected by it. options diff --git a/docs/refind/features.html b/docs/refind/features.html index 7b045d7..b81b2e7 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -14,7 +14,7 @@

by Roderick W. Smith, rodsmith@rodsbooks.com

-

Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

+

Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

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!

@@ -127,7 +127,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Additional OS icons (all of which are Linux distributions, at least so far). This can make it easier to find a specific distribution in the boot list if you've installed multiple Linux distributions.
  • -
  • The ability to auto-detect Linux initial RAM disk files and to read Linux kernel options from a linux.conf file. These features support (nearly) automatic handling of Linux kernels with embedded EFI stub loader support (a new feature with Linux 3.3.0).
  • +
  • The ability to auto-detect Linux initial RAM disk files and to read Linux kernel options from a refind_linux.conf file. These features support (nearly) automatic handling of Linux kernels with embedded EFI stub loader support (a new feature with Linux 3.3.0).
  • Fixes to display problems on many UEFI-based PCs.
  • @@ -135,6 +135,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Improved detection of itself, to keep rEFInd out of its own boot menu.
  • +
  • An "exit" option (disabled by default), so that you can return to whatever shell or boot manager you used to launch rEFInd, should this ability be desirable. (This feature first appeared in rEFInd 0.2.4.)
  • +

    On the flip side, at least for Mac users, rEFInd comes with less sophisticated Mac installation tools than does rEFIt, in favor of more OS-agnostic packaging. Also, rEFInd doesn't support loading EFI drivers; that job should be done in other ways when using rEFInd.

    diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 7b1aefa..a3c44e7 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

    +

    Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

    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!

    @@ -96,8 +96,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    diff --git a/docs/refind/index.html b/docs/refind/index.html index 432e913..897e0bb 100644 --- a/docs/refind/index.html +++ b/docs/refind/index.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

    +

    Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

    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!

    diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 84e70ac..fef11b8 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

    +

    Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

    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!

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


    - - -

    Once you've uncompressed a rEFInd binary zip file, you can copy the entire refind directory into your EFI System Partition's (ESP's) EFI directory on UEFI-based PCs, so that rEFInd resides in EFI/refind. If you've tried rEFInd using a CD-R image file, you can copy the files from the EFI/refind directory on the CD to create an equivalent directory on the ESP. To avoid confusion, though, you should delete the rEFInd binary file for the CPU type your computer does not use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the refind_x64.efi binary and delete the refind_ia32.efi binary. Most Intel-based Macs also have 64-bit EFI implementations, so you should do the same thing; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the refind_ia32.efi file. You can determine whether your Mac needs the x86-64 or IA32 build by typing the following command in a Mac Terminal window:

    +

    Once you've uncompressed a rEFInd binary zip file, you can copy the entire refind directory into your EFI System Partition's (ESP's) EFI directory on UEFI-based PCs, so that rEFInd resides in EFI/refind. If you've tried rEFInd using a CD-R image file, you can copy the files from the EFI/refind directory on the CD to create an equivalent directory on the ESP. To avoid confusion, though, you should delete the rEFInd binary file for the CPU type your computer does not use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the refind_x64.efi binary and delete the refind_ia32.efi binary. Most Intel-based Macs also have 64-bit EFI implementations, so you should do the same thing; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the refind_ia32.efi file. You can determine whether your Mac needs the x86-64 or IA32 build by typing the following command in a Mac Terminal window:

     $ ioreg -l -p IODeviceTree | grep firmware-abi
    @@ -127,15 +123,11 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
     
     
  • Type cd /boot/efi/EFI/refind to change into rEFInd's new directory on the ESP.
  • -
  • Type rm refind_ia32.efi to remove the IA32 binary if you're using an x86-64 (64-bit) system; or type rm refind_x64.efi to remove the x86-64 binary if you're using an x86 (32-bit) system. You can optionally rename the binary you keep as refind.efi, but this isn't required.
  • +
  • Type rm refind_ia32.efi to remove the IA32 binary if you're using an x86-64 (64-bit) system; or type rm refind_x64.efi to remove the x86-64 binary if you're using an x86 (32-bit) system. You can optionally rename the binary you keep as refind.efi, but this isn't required.
  • 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.
  • @@ -153,11 +145,7 @@ Filesystem 1K-blocks Used Available Use% Mounted on

    Installing rEFInd Using Mac OS X

    - +

    The procedure for installing rEFInd on a Mac is similar to that for installing it under Linux, except that you can install it to the OS X's system directory rather than to the ESP, and you must use the bless utility rather than efibootmgr. To be precise, you should follow these steps:

    @@ -235,9 +223,9 @@ Filesystem 1K-blocks Used Available Use% Mounted on
  • Look for an existing directory called EFI/BOOT or EFI/Microsoft/BOOT. If neither of these directories exist, skip the next step. (Note that FAT is case-insensitive, so the name may vary in case.)
  • -
  • Rename the existing directory to something else. For EFI/BOOT, try renaming it to EFI/Oldboot. For EFI/Microsoft/BOOT, rename the Microsoft directory—say, to MS. Thus, you'll have EFI/MS and its contents, including EFI/MS/BOOT.
  • +
  • Rename the existing directory or boot loader file to something else. For EFI/BOOT, try renaming it to EFI/Oldboot. For EFI/Microsoft/BOOT, move or rename the bootmgfw.efi file it contains. For instance, you can move it to EFI/Microsoft. This will keep the boot loader accessible to rEFInd's menu, while preventing the firmware from launching it automatically.
  • -
  • Rename/move your EFI/refind directory to EFI/BOOT (or EFI/Microsoft/BOOT, if that directory existed and you've renamed it—but you'll first need to create a new EFI/Microsoft directory).
  • +
  • Rename/move your EFI/refind directory to EFI/BOOT. If you're working from EFI/Microsoft/BOOT, you should move the contents of your rEFInd directory to EFI/Microsoft/BOOT.
  • Rename EFI/BOOT/refind_x64.efi to the name of the boot loader it's replacing—it should become EFI/BOOT/bootx64.efi or EFI/Microsoft/BOOT/bootmgfw.efi.
  • @@ -280,11 +268,6 @@ Filesystem 1K-blocks Used Available Use% Mounted on efi/tools subdirectory of the ESP and rEFInd will detect it and give you the option to use it. -
  • Rescue Linux—If the file efi/rescue/elilo.efi - exists, it will be given a special entry in the boot list. The intent - seems to be to launch Linux in a rescue mode, but I've not gotten it to - work.
  • -

    I've seen links to other versions of these tools from time to time on the Web, so if you try one of these programs and it crashes or behaves strangely, try performing a Web search; you may turn up something that works better for you than the one to which I've linked.

    diff --git a/docs/refind/linux.html b/docs/refind/linux.html index ed93b38..3508243 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Originally written: 3/19/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

    +

    Originally written: 3/19/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

    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!

    @@ -103,7 +103,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Using the EFI Stub Loader

    -

    The Linux EFI stub loader is a way to turn a Linux kernel into an EFI application. In a sense, the kernel becomes its own boot loader. This approach to booting Linux is very elegant in some ways, but as described on the page to which I just linked, it has its disadvantages, too. One challenge to booting in this way is that modern Linux installations typically require that the kernel be passed a number of options at boot time. These tell the kernel where the Linux root (/) filesystem is, where the initial RAM disk is, and so on. Without these options, Linux won't boot. These options are impossible for a generic boot loader to guess without a little help. For this reason, rEFIt, rEFInd's parent program, could not boot a Linux kernel with EFI stub support. rEFInd, however, goes a little further....

    +

    The Linux EFI stub loader is a way to turn a Linux kernel into an EFI application. In a sense, the kernel becomes its own boot loader. This approach to booting Linux is very elegant in some ways, but as described on the page to which I just linked, it has its disadvantages, too. One challenge to booting in this way is that modern Linux installations typically require that the kernel be passed a number of options at boot time. These tell the kernel where the Linux root (/) filesystem is, where the initial RAM disk is, and so on. Without these options, Linux won't boot. These options are impossible for a generic boot loader to guess without a little help. It's possible to build a kernel with a default set of options, but this is rather limiting. Thus, rEFInd provides configuration options to help.

    With all versions of rEFInd, you can create manual boot loader stanzas in the refind.conf file to identify a Linux kernel and to pass it all the options it needs. This approach is effective and flexible, but it requires editing a single configuration file. If a computer boots two different Linux distributions, and if both were to support rEFInd, problems might arise as each one tries to modify its own rEFInd configuration; or the one that controls rEFInd might set inappropriate options for another distribution. This is a problem that's been a minor annoyance for years under BIOS, since the same potential for poor configuration applies to LILO, GRUB Legacy, and GRUB 2 on BIOS. The most reliable solution there is to chainload one boot loader to another. The same solution is possible under EFI, but rEFInd offers another possibility.

    diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index 0115e7f..2cb3326 100644 --- a/docs/refind/revisions.html +++ b/docs/refind/revisions.html @@ -14,7 +14,7 @@

    by Roderick W. Smith, rodsmith@rodsbooks.com

    -

    Last Web page update: 3/26/2012

    +

    Last Web page update: 4/5/2012

    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!

    @@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

      +
    • 0.2.4 (4/5/2012)—This version adds support for a new location for EFI shells (shellarch.efi in the ESP's root directory. It also adds two new refind.conf options: showtools and max_tags, and removes another one (disable). The options available in hideui are now essentially a combination of what disable and hideui did, minus functionality now present in showtools. I made these changes to reduce redundancy and to increase flexibility. See the Configuring the Boot Manager page for details.
    • +
    • 0.2.3 (3/26/2012)—I've changed the Linux kernel configuration filename from linux.conf to refind_linux.conf with this version, to avoid a name collision with a planned future Linux kernel ability to read its options from a file called linux.conf. This version also includes a tentative bug fix for a problem that caused rEFInd to hang upon launching the second program (say, a boot loader after using a shell) on some systems; but on some computers, this fix causes an (apparently harmless) error message about "(re)opening our installation volume" upon returning from the first program. I've also added a logo for Arch Linux.
    • 0.2.2 (3/23/2012)—This version fixes three bugs: One caused submenus to not appear on systems with screens of 800x600 or smaller; another caused rEFInd to hang when boot loader names were too long; and the third caused the program to fail when Linux kernels and their initial RAM disk files lacked version numbers.
    • diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 56d6cea..efc4481 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -14,7 +14,7 @@

      by Roderick W. Smith, rodsmith@rodsbooks.com

      -

      Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

      +

      Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

      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!

      @@ -121,8 +121,6 @@ program. I'm not sure what you'd use in Windows to create ICNS files.
    • It would be useful to be able to specify paths to boot loaders and/or initial RAM disks relative to the rEFInd directory (or the boot loader's directory, in the case of initrds).
    • -
    • I don't like the disable and hideui options in refind.conf. I'd like to replace them with a positive option listing for utilities, similar to scanfor (which in fact replaces other "hide" options in rEFIt).
    • -
    • There's currently no way to create a manual boot stanza for a BIOS-booted OS. This isn't a big priority for me personally, but I can see how it could be for some people.
    • Returning from a program (such as an EFI shell or a boot loader that fails) produces an error message about a failure when "(re)opening our installation volume" on some computers. (Among mine, only a 32-bit Mac Mini produces this message.) This seems to be harmless, but I haven't removed the error message because I don't fully understand its cause or why it doesn't appear on most systems. This needs investigating and fixing.
    • diff --git a/docs/refind/using.html b/docs/refind/using.html index ecf3242..e41df8d 100644 --- a/docs/refind/using.html +++ b/docs/refind/using.html @@ -14,7 +14,7 @@

      by Roderick W. Smith, rodsmith@rodsbooks.com

      -

      Originally written: 3/14/2012; last Web page update: 3/26/2012, referencing rEFInd 0.2.3

      +

      Originally written: 3/14/2012; last Web page update: 4/5/2012, referencing rEFInd 0.2.4

      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!

      @@ -107,14 +107,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

        - -
      • Launch the EFI shell
      • + +
      • Launch the gptsync utility
      • Produce an information page
      • @@ -125,7 +121,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

      -

      The last three of these options are always available by default, but the first depends on the presence of the EFI shell program file, as described earlier. If you install gptsync.efi, its icon will appear, as well.

      +

      The last three of these options are always available by default, but the first depends on the presence of the EFI shell program file, as described earlier. To get the gptsync icon, you must install gptsync.efi and adjust the showtools option in refind.conf, as well.

      To launch an OS or utility, you should select its icon and then press the Enter key. If you press the Insert key, rEFInd will show a menu that may hold additional options, depending on the OS type. The following figure shows the submenu for Mac OS X. You can use this menu much like the main menu; move the cursor to select the option you want to use, then press the Enter key to launch the boot loader with the selected options. Press the Esc key or select Return to Main Menu to return to the main menu.

      diff --git a/refind.conf-sample b/refind.conf-sample index c5c054a..573844a 100644 --- a/refind.conf-sample +++ b/refind.conf-sample @@ -8,18 +8,18 @@ # timeout 20 -# Disable user interface elements for personal preference or to increase +# Hide user interface elements for personal preference or to increase # security: # banner - the rEFInd title banner # label - text label in the menu # singleuser - remove the submenu options to boot Mac OS X in single-user -# or verbose modes +# or verbose modes; affects ONLY MacOS X # hwtest - the submenu option to run Apple's hardware test # arrows - scroll arrows on the OS selection tag line # all - all of the above # -#disable singleuser -#disable all +#hideui singleuser +#hideui all # Use a custom title banner instead of the rEFInd icon and name. The file # path is relative to the directory where refind.efi is located. The color diff --git a/refind/config.c b/refind/config.c index c2f6ba4..803ce61 100644 --- a/refind/config.c +++ b/refind/config.c @@ -326,25 +326,25 @@ VOID ReadConfig(VOID) if (StriCmp(TokenList[0], L"timeout") == 0) { HandleInt(TokenList, TokenCount, &(GlobalConfig.Timeout)); - // Note: I'm using "hideui" as equivalent to "disable" for the moment (as of rEFInd 0.2.4) + // Note: I'm using "disable" as equivalent to "hideui" for the moment (as of rEFInd 0.2.4) // because I've folded two options into one and removed some values, so I want to catch - // existing configurations as much as possible. The "hideui" equivalency to "disable" will - // be removed sooner or later.... - } else if ((StriCmp(TokenList[0], L"disable") == 0) || (StriCmp(TokenList[0], L"hideui") == 0)) { + // existing configurations as much as possible. The "disable" equivalency to "hideui" will + // be removed sooner or later, leaving only "hideui". + } else if ((StriCmp(TokenList[0], L"hideui") == 0) || (StriCmp(TokenList[0], L"disable") == 0)) { for (i = 1; i < TokenCount; i++) { FlagName = TokenList[i]; if (StriCmp(FlagName, L"banner") == 0) { - GlobalConfig.DisableFlags |= DISABLE_FLAG_BANNER; + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_BANNER; } else if (StriCmp(FlagName, L"label") == 0) { - GlobalConfig.DisableFlags |= DISABLE_FLAG_LABEL; + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_LABEL; } else if (StriCmp(FlagName, L"singleuser") == 0) { - GlobalConfig.DisableFlags |= DISABLE_FLAG_SINGLEUSER; + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_SINGLEUSER; } else if (StriCmp(FlagName, L"hwtest") == 0) { - GlobalConfig.DisableFlags |= DISABLE_FLAG_HWTEST; + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_HWTEST; } else if (StriCmp(FlagName, L"arrows") == 0) { - GlobalConfig.DisableFlags |= DISABLE_FLAG_ARROWS; + GlobalConfig.HideUIFlags |= HIDEUI_FLAG_ARROWS; } else if (StriCmp(FlagName, L"all") == 0) { - GlobalConfig.DisableFlags = DISABLE_ALL; + GlobalConfig.HideUIFlags = HIDEUI_ALL; } else { Print(L" unknown disable flag: '%s'\n", FlagName); } diff --git a/refind/config.h b/refind/config.h index 62d233b..f1d4059 100644 --- a/refind/config.h +++ b/refind/config.h @@ -63,12 +63,12 @@ typedef struct { CHAR16 *End16Ptr; } REFIT_FILE; -#define DISABLE_FLAG_BANNER (0x0001) -#define DISABLE_FLAG_LABEL (0x0002) -#define DISABLE_FLAG_SINGLEUSER (0x0004) -#define DISABLE_FLAG_HWTEST (0x0008) -#define DISABLE_FLAG_ARROWS (0x0010) -#define DISABLE_ALL ((0xffff)) +#define HIDEUI_FLAG_BANNER (0x0001) +#define HIDEUI_FLAG_LABEL (0x0002) +#define HIDEUI_FLAG_SINGLEUSER (0x0004) +#define HIDEUI_FLAG_HWTEST (0x0008) +#define HIDEUI_FLAG_ARROWS (0x0010) +#define HIDEUI_ALL ((0xffff)) VOID ReadConfig(VOID); VOID ScanUserConfigured(VOID); diff --git a/refind/global.h b/refind/global.h index 0bcc13c..1218c44 100644 --- a/refind/global.h +++ b/refind/global.h @@ -151,7 +151,7 @@ typedef struct { typedef struct { BOOLEAN TextOnly; UINTN Timeout; - UINTN DisableFlags; + UINTN HideUIFlags; UINTN MaxTags; // max. number of OS entries to show simultaneously in graphics mode CHAR16 *BannerFileName; CHAR16 *SelectionSmallFileName; diff --git a/refind/main.c b/refind/main.c index 702f0b7..5ccd577 100644 --- a/refind/main.c +++ b/refind/main.c @@ -83,7 +83,7 @@ static VOID AboutrEFInd(VOID) { if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.3.4"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.4"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith"); @@ -359,7 +359,7 @@ VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume) { } // if #endif - if (!(GlobalConfig.DisableFlags & DISABLE_FLAG_SINGLEUSER)) { + if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_SINGLEUSER)) { SubEntry = InitializeLoaderEntry(Entry); if (SubEntry != NULL) { SubEntry->me.Title = L"Boot Mac OS X in verbose mode"; @@ -397,7 +397,7 @@ VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume) { // check for Apple hardware diagnostics StrCpy(DiagsFileName, L"\\System\\Library\\CoreServices\\.diagnostics\\diags.efi"); - if (FileExists(Volume->RootDir, DiagsFileName) && !(GlobalConfig.DisableFlags & DISABLE_FLAG_HWTEST)) { + if (FileExists(Volume->RootDir, DiagsFileName) && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_HWTEST)) { SubEntry = InitializeLoaderEntry(Entry); if (SubEntry != NULL) { SubEntry->me.Title = L"Run Apple Hardware Test"; @@ -1275,7 +1275,6 @@ static VOID ScanForTools(VOID) { AddMenuEntry(&MainMenu, &MenuEntryReset); break; case TAG_ABOUT: - Print(L"Adding menu entry for the 'about' tag....\n"); MenuEntryAbout.Image = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); AddMenuEntry(&MainMenu, &MenuEntryAbout); break; diff --git a/refind/menu.c b/refind/menu.c index 194fcb2..90df56b 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -673,7 +673,7 @@ static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN itemPosX[i], row1PosY); } } - if (!(GlobalConfig.DisableFlags & DISABLE_FLAG_LABEL)) + if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL)) DrawMainMenuText(Screen->Entries[State->CurrentSelection]->Title, (UGAWidth - LAYOUT_TEXT_WIDTH) >> 1, textPosY); } // static VOID PaintAll() @@ -688,7 +688,7 @@ static VOID PaintSelection(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, DrawMainMenuEntry(Screen->Entries[State->CurrentSelection], TRUE, itemPosX[State->CurrentSelection - State->FirstVisible], (Screen->Entries[State->CurrentSelection]->Row == 0) ? row0PosY : row1PosY); - if (!(GlobalConfig.DisableFlags & DISABLE_FLAG_LABEL)) + if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL)) DrawMainMenuText(Screen->Entries[State->CurrentSelection]->Title, (UGAWidth - LAYOUT_TEXT_WIDTH) >> 1, textPosY); } else { @@ -779,10 +779,10 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT // For PaintIcon() calls, the starting Y position is moved to the midpoint // of the surrounding row; PaintIcon() adjusts this back up by half the // icon's height to properly center it. - if ((State->FirstVisible > 0) && (!(GlobalConfig.DisableFlags & DISABLE_FLAG_ARROWS))) + if ((State->FirstVisible > 0) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) PaintIcon(&egemb_arrow_left, L"icons\\arrow_left.icns", row0PosX - TILE_XSPACING, row0PosY + (ROW0_TILESIZE / 2), ALIGN_RIGHT); - if ((State->LastVisible < (row0Loaders - 1)) && (!(GlobalConfig.DisableFlags & DISABLE_FLAG_ARROWS))) + if ((State->LastVisible < (row0Loaders - 1)) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) PaintIcon(&egemb_arrow_right, L"icons\\arrow_right.icns", (UGAWidth + (ROW0_TILESIZE + TILE_XSPACING) * State->MaxVisible) / 2 + TILE_XSPACING, row0PosY + (ROW0_TILESIZE / 2), ALIGN_LEFT); @@ -793,7 +793,7 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT break; case MENU_FUNCTION_PAINT_TIMEOUT: - if (!(GlobalConfig.DisableFlags & DISABLE_FLAG_LABEL)) + if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL)) DrawMainMenuText(ParamText, (UGAWidth - LAYOUT_TEXT_WIDTH) >> 1, textPosY + TEXT_LINE_HEIGHT); break; diff --git a/refind/screen.c b/refind/screen.c index bb4a717..fe57a23 100644 --- a/refind/screen.c +++ b/refind/screen.c @@ -341,7 +341,7 @@ VOID BltClearScreen(IN BOOLEAN ShowBanner) { static EG_IMAGE *Banner = NULL; - if (ShowBanner && !(GlobalConfig.DisableFlags & DISABLE_FLAG_BANNER)) { + if (ShowBanner && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_BANNER)) { // load banner on first call if (Banner == NULL) { if (GlobalConfig.BannerFileName == NULL) -- 2.39.2