From a0a4ba44f4dc01c86499c0fc80730940b53f75c6 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 7 Oct 2012 01:05:35 -0400 Subject: [PATCH] Version 0.4.6 release, with UEFI legacy boot support. --- NEWS.txt | 6 +- docs/refind/bootmode.html | 2 +- docs/refind/configfile.html | 12 ++-- docs/refind/drivers.html | 2 +- docs/refind/features.html | 12 +++- docs/refind/getting.html | 67 ++++++++--------- docs/refind/index.html | 4 +- docs/refind/installing.html | 2 +- docs/refind/linux.html | 4 +- docs/refind/revisions.html | 4 +- docs/refind/themes.html | 2 +- docs/refind/todo.html | 18 ++--- docs/refind/using.html | 22 +++++- filesystems/fsw_efi.c | 2 +- refind.conf-sample | 5 +- refind/config.c | 44 +++++------- refind/driver_support.c | 13 ++-- refind/global.h | 2 +- refind/icns.c | 4 +- refind/lib.c | 58 ++++++++------- refind/lib.h | 1 + refind/main.c | 140 ++++++++++++++++++++---------------- refind/menu.c | 11 +-- refind/menu.h | 1 - 24 files changed, 240 insertions(+), 198 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 421f6bd..109d095 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,5 +1,7 @@ -0.4.6 (10/??/2012): -------------------- +0.4.6 (10/6/2012): +------------------ + +- Fixed some minor memory management issues. - Added new "scan_delay" feature to impose a delay before scanning for disks. diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index 010ffd0..edba082 100644 --- a/docs/refind/bootmode.html +++ b/docs/refind/bootmode.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

+10/6/2012, referencing rEFInd 0.4.6

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/configfile.html b/docs/refind/configfile.html index a2e7085..e512a12 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -90,7 +90,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com


-

Many casual users will be able to use rEFInd without making further changes; in its default configuration, the boot manager automatically detects all the EFI boot loader programs you have on your ESP (or your OS X boot partition, in the case of Macs) and displays icons for them. Sometimes, though, you may want to tweak rEFInd's configuration. Sometimes you can obtain your desired results by adjusting the filenames of your boot loaders. Other times, you can edit rEFInd's configuration file, refind.conf, which resides in the same directory as its binary file (refind.efi or whatever you've renamed it).

+

Many casual users will be able to use rEFInd without making changes to its settings; in its default configuration, the boot manager automatically detects all the EFI boot loader programs you have on your ESP (or your OS X boot partition, in the case of Macs) and displays icons for them. On Macs, rEFInd also presents legacy BIOS boot options by default. Sometimes, though, you may want to tweak rEFInd's configuration. Sometimes you can obtain your desired results by adjusting the filenames of your boot loaders. Other times, you can edit rEFInd's configuration file, refind.conf, which resides in the same directory as its binary file (refind.efi or whatever you've renamed it).

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.

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

-

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.)

+

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. (rEFInd gives special treatment to the tools subdirectory, where it looks for system tools rather than boot loaders.)

If you're like me, you may sometimes want to hide a boot loader from rEFInd's menu for a brief period—say, because you're testing a variety of configurations but you don't want them all to clutter the menu at once. You might also want to hide a boot loader if you want to override its default settings using a custom entry in refind.conf and you don't want an automatic search to duplicate that entry. You can easily hide a boot loader by removing or changing its .efi filename extension—for instance, changing grub.efi to grub.

@@ -191,12 +191,12 @@ timeout 20 scan_driver_dirs directory path(s) - Scans the specified directory or directories for EFI driver files. If rEFInd discovers .efi files in those directories, they're loaded and activated as drivers. This option sets directories to scan in addition to the drivers subdirectory of the rEFInd installation directory, which is always scanned, if present. + Scans the specified directory or directories for EFI driver files. If rEFInd discovers .efi files in those directories, they're loaded and activated as drivers. This option sets directories to scan in addition to the drivers and drivers_arch subdirectories of the rEFInd installation directory, which are always scanned, if present. scanfor internal, external, optical, hdbios, biosexternal, cd, and manual - Tells rEFInd what methods to use to locate boot loaders. The internal, external, and optical parameters tell rEFInd to scan for EFI boot loaders on internal, external, and optical (CD, DVD, and Blu-ray) devices, respectively. The hdbios, biosexternal, and cd parameters are similar, but scan for BIOS boot loaders. (Note that the BIOS options scan more thoroughly and actively on Macs than on UEFI-based PCs; for the latter, only options in the firmware's boot list are scanned.) The manual parameter tells rEFInd to scan the configuration file for manual settings. You can specify multiple parameters to have the program scan for multiple boot loader types. When you do so, the order determines the order in which the boot loaders appear in the menu. The default is internal, external, optical, manual on most systems, but internal, hdbios, external, biosexternal, optical, cd, manual on Macs. + Tells rEFInd what methods to use to locate boot loaders. The internal, external, and optical parameters tell rEFInd to scan for EFI boot loaders on internal, external, and optical (CD, DVD, and Blu-ray) devices, respectively. The hdbios, biosexternal, and cd parameters are similar, but scan for BIOS boot loaders. (Note that the BIOS options scan more thoroughly and actively on Macs than on UEFI-based PCs; for the latter, only options in the firmware's boot list are scanned, as described on the Using rEFInd page.) The manual parameter tells rEFInd to scan the configuration file for manual settings. You can specify multiple parameters to have the program scan for multiple boot loader types. When you do so, the order determines the order in which the boot loaders appear in the menu. The default is internal, external, optical, manual on most systems, but internal, hdbios, external, biosexternal, optical, cd, manual on Macs. scan_delay @@ -216,12 +216,12 @@ timeout 20 scan_all_linux_kernels None - When set, causes rEFInd to add Linux kernels (files with names that begin with vmlinuz or bzImage) to the list of EFI boot loaders, even if they lack .efi filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in .efi. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (Drivers and the also_scan_dirs options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. For this reason, it's disabled by default. + When set, causes rEFInd to add Linux kernels (files with names that begin with vmlinuz or bzImage) to the list of EFI boot loaders, even if they lack .efi filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in .efi. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (Drivers and the also_scan_dirs options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. For this reason, it's disabled by default, but that may change in the future. default_selection A substring of a boot loader's title; or a numeric position - Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. You can enter any substring of the title as the default_selection, so long as it's two or more characters in length. It's best to use a unique substring, since rEFInd stops searching when it finds the first match. Because rEFInd sorts entries within a directory in descending order by file modification time, if you specify a directory (or volume name, for loaders in a partition's root directory) as the default_selection, the most recent loader in that directory will be the default. One-character entries are matched against the first character of the title, except for digits, which refer to the numeric order of the boot loader entries. (Note: In version 0.2.0, only the first character of this entry was used, and was matched against the first character of the title.) + Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. You can enter any substring of the title as the default_selection, so long as it's two or more characters in length. It's best to use a unique substring, since rEFInd stops searching when it finds the first match. Because rEFInd sorts entries within a directory in descending order by file modification time, if you specify a directory (or volume name, for loaders in a partition's root directory) as the default_selection, the most recent loader in that directory will be the default. One-character entries are matched against the first character of the title, except for digits, which refer to the numeric order of the boot loader entries. diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 996e665..3146c02 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 4/19/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

+10/6/2012, referencing rEFInd 0.4.6

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/features.html b/docs/refind/features.html index cfccba2..6fd8ecf 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -99,9 +99,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • User-configurable graphics and icons—you can set your own background, set new icons, and so on.
  • -
  • Launch EFI boot loaders
  • +
  • Launch EFI boot loaders.
  • -
  • Launch legacy (BIOS) boot loaders on Macs and on some UEFI-based PCs. On the latter, the BIOS boot device must be listed in the firmware's boot options. Often only the hard disk and optical disc are listed by default. Scanning for legacy OSes is more thorough on Macs.
  • +
  • Launch legacy (BIOS) boot loaders on Macs. (rEFInd also supports legacy boots on some UEFI PCs; see below.)
  • Launch options for an external EFI shell or disk partitioner. (See the Installing rEFInd section for information on how to obtain and install these components.)
  • @@ -125,12 +125,18 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    You can select which of these methods to use to construct the rEFInd main boot menu. Although rEFIt supports auto-detection, it does not support manual configuration; and rEFIt's options to enable, disable, and prioritize individual boot loader detection methods are primitive compared to those in rEFInd. +
  • Support for launching legacy BIOS boot loaders on UEFI PCs with +suitable CSM support (as of version 0.4.6). This feature requires building +rEFInd with the TianoCore EDK2 toolkit, which I do for my main binary +build. Note that some UEFI PCs, such as those with Gigabyte's Hybrid EFI, +lack a usable CSM.
  • +
  • The ability to fine-tune options passed to EFI boot loaders, via manual configuration.
  • The ability to specify additional directories to scan for boot loaders and drivers (as of version 0.2.7).
  • diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 216bbae..a027e46 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

    +10/6/2012, referencing rEFInd 0.4.6

    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!

    @@ -97,46 +97,49 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    -

    If you're using another platform, you can give rEFInd a try; however, you'll need to build it from source code yourself or track down a binary from another source. (Perhaps by the time you read this it will be included in Linux distributions built for unusual CPUs.)

    +

    If you're using a platform other than x86 or x86-64, you can give rEFInd a try; however, you'll need to build it from source code yourself or track down a binary from another source. (Perhaps by the time you read this it will be included in Linux distributions built for unusual CPUs.)

    To extract the files from the zip file images I've provided, you'll need a tool such as unzip, which is included with Linux and Mac OS X. Numerous Windows utilities also support this format, such as PKZIP and 7-Zip.

    diff --git a/docs/refind/index.html b/docs/refind/index.html index 5795014..00a66f2 100644 --- a/docs/refind/index.html +++ b/docs/refind/index.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

    +10/6/2012, referencing rEFInd 0.4.6

    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!

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

  • The official rEFIt Web page
  • +
  • The official gummiboot Web page
  • +
  • The official ELILO Web page
  • The official GRUB Web page
  • diff --git a/docs/refind/installing.html b/docs/refind/installing.html index 5c71b28..3da2d2b 100644 --- a/docs/refind/installing.html +++ b/docs/refind/installing.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/14/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

    +10/6/2012, referencing rEFInd 0.4.6

    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/linux.html b/docs/refind/linux.html index f80c41f..158961e 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    Originally written: 3/19/2012; last Web page update: -8/12/2012, referencing rEFInd 0.4.5

    +10/6/2012, referencing rEFInd 0.4.6

    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!

    @@ -150,7 +150,7 @@ another possibility.

    initial RAM disk is identified, rEFInd passes a suitable initrd= option to the kernel when it boots. - +
  • rEFInd looks for a file called refind_linux.conf in the same directory as the kernel file. This file is a practical requirement for diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html index 24722f3..eb55ecb 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: 8/12/2012

    +

    Last Web page update: 10/6/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