From e99aa7a04054658c8d5d4595717b9b10e848564d Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 16 Dec 2012 22:32:57 -0500 Subject: [PATCH] Version 0.6.0 --- BUILDING.txt | 2 +- CREDITS.txt | 3 ++ NEWS.txt | 22 ++++++++++- docs/refind/bootmode.html | 4 +- docs/refind/configfile.html | 11 ++++-- docs/refind/drivers.html | 20 +++++++--- docs/refind/features.html | 12 +++--- docs/refind/getting.html | 8 ++-- docs/refind/index.html | 2 +- docs/refind/installing.html | 30 +++++++++++---- docs/refind/linux.html | 41 +++++++++++++++----- docs/refind/revisions.html | 4 +- docs/refind/secureboot.html | 4 +- docs/refind/themes.html | 2 +- docs/refind/todo.html | 8 ++-- docs/refind/using.html | 2 +- filesystems/fsw_efi.c | 2 +- install.sh | 24 ++++++------ libeg/screen.c | 16 ++++++-- mkdistrib | 8 +--- refind.conf-sample | 11 +++++- refind/config.c | 12 +++++- refind/global.h | 1 + refind/lib.c | 76 ++++++++++++++++++++++++++----------- refind/lib.h | 2 +- refind/main.c | 68 ++++++++++++++++++--------------- refind/menu.c | 6 +-- 27 files changed, 270 insertions(+), 131 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index a60279a..b69df9b 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -310,7 +310,7 @@ To build all the drivers, you can type "make fs" from the main directory, which builds the drivers and places copies in both the filesystems and drivers_{arch} subdirectories. If you want to build just one driver, you can change into the "filesystems" directory and type "make {fsname}", where -{fsname} is a filesystem name -- "ext2", "ext4fs", "reiserfs", "iso9660", +{fsname} is a filesystem name -- "ext2", "ext4", "reiserfs", "iso9660", or "hfs". To install drivers, you can type "make install" in the "filesystems" diff --git a/CREDITS.txt b/CREDITS.txt index d8efcde..469d663 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -52,3 +52,6 @@ I've incorporated into the current version. Specifically: * The code for editing boot options (cursor_left(), cursor_right(), and line_edit() in screen.c) is taken from gummiboot. + +* Stefan Agner (stefan@agner.ch) turned the original ext2fs/ext3fs driver + into one that can read ext4fs. diff --git a/NEWS.txt b/NEWS.txt index 6a62e14..18712e8 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,9 +1,19 @@ 0.5.2 (12/??/2012): ------------------- +- Fixed a memory allocation bug that could cause a program crash when + specifying certain values with the "also_scan_dirs", "dont_scan_volumes", + "dont_scan_dirs", "dont_scan_files", and "scan_driver_dirs" refind.conf + options. + +- Modified Linux kernel initrd-finding code so that if an initrd is + specified in refind_linux.conf, rEFInd will not add any initrd it finds. + This enables an override of the default initrd, and is likely to be + particularly helpful to Arch Linux users. + - Added ext4fs driver! -- Made "boot" the default value for "also_scan_dirs. +- Made "boot" the default value for "also_scan_dirs". - Added identifying screen header to line editor. @@ -36,6 +46,16 @@ generated by install.sh. This entry boots without the options extracted from the /etc/default/grub file. +- Added keys subdirectory to main distribution, to hold public Secure + Boot/shim keys from known sources. + +- Changed install.sh --drivers option to --alldrivers, added new + --nodrivers option, and made the default on Linux to install the one + driver that's used on /boot (or the root filesystem if /boot isn't a + separate partition). Of course, this won't install a non-existent driver, + and it also won't work properly if run from an emergency disk unless you + mount a separate /boot partition at that location. + - Fixed bug in install.sh that prevented creation of refind_linux.conf file on Linux systems. diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index 2ff249b..07fb6ea 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: -12/11/2012, referencing rEFInd 0.5.1

+12/16/2012, referencing rEFInd 0.6.0

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!

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

A casual reader might easily overlook this option, or misinterpret it to mean that the feature is much less important than it is. In fact, this particular motherboard offers very poor control over its EFI vs. BIOS booting features. (See my Web page on this EFI implementation for details.)

-

Some manuals omit even mention of EFI, and instead refer to "legacy boot" or some similar term, referring to BIOS-style booting. Such references may imply that the firmware supports EFI booting if the "legacy boot" mode is disabled or restricted in some way.

+

Some manuals omit even mention of EFI, and instead refer to "legacy boot" or some similar term, referring to BIOS-style booting. The firmware for my ASUS P8H77-I motherboard uses the technical term CSM, which of course will be baffling to the uninitiated. (I referred to it earlier. It's the Compatibility Support Module—in other words, the BIOS support code.) Such references may imply that the firmware supports EFI booting if the "legacy boot" mode is disabled or restricted in some way.

Understated EFI features often indicate a slapdash approach to EFI. Such systems sometimes implement EFI as a layer atop a conventional BIOS. More modern EFIs, though, completely replace the BIOS. Some manufacturers, such as ASUS and its sibling ASRock, are now actively promoting their more advanced EFI implementations. Such products often come with flashy new GUIs in their firmware.

diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index b21e833..6b6ce6c 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

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

+12/16/2012, referencing rEFInd 0.6.0

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!

@@ -205,13 +205,18 @@ timeout 20 scan_delay - Numeric (integer) value + numeric (integer) value Imposes a delay before rEFInd scans for disk devices. Ordinarily this is not necessary, but on some systems, some disks (particularly external drives and optical discs) can take a few seconds to become available. If some of your disks don't appear when rEFInd starts but they do appear when you press the Esc key to re-scan, try uncommenting this option and setting it to a modest value, such as 2, 5, or even 10. The default is 0. also_scan_dirs directory path(s) - Adds the specified directory or directories to the directory list that rEFInd scans for EFI boot loaders when scanfor includes the internal, external, or optical options. Directories are specified relative to the filesystem's root directory. If this option is used, it's applied to all the filesystems that rEFInd scans. If a specified directory doesn't exist, rEFInd ignores it (no error results). + Adds the specified directory or directories to the directory list that rEFInd scans for EFI boot loaders when scanfor includes the internal, external, or optical options. Directories are specified relative to the filesystem's root directory. If this option is used, it's applied to all the filesystems that rEFInd scans. If a specified directory doesn't exist, rEFInd ignores it (no error results). The default value is boot, which is useful for locating Linux kernels when you have an EFI driver for your Linux root (/) filesystem. + + + dont_scan_volumes or don't_scan_volumes + filesystem label(s) + Adds the specified volume or volumes to a volume "blacklist"—these filesystems are not scanned for EFI boot loaders. This may be useful to keep unwanted EFI boot entries, such as for a Macintosh recovery partition, from appearing on the main list of boot loaders. dont_scan_dirs or don't_scan_dirs diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index b94291c..a881ff2 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: -12/11/2012, referencing rEFInd 0.5.1

+12/16/2012, referencing rEFInd 0.6.0

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!

@@ -138,8 +138,18 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Ext4fs—Stefan Agner modified the rEFIt/rEFInd ext2fs driver so that it could handle ext4fs. I'm including this as a separate - driver from the ext2fs driver, although the ext4fs version seems to be - able to handle ext2fs and ext3fs, too.
  • + driver from the ext2fs driver, although the ext4fs version can handle + ext2fs and ext3fs, too. (I may eventually retire the original ext2fs + driver, but I want to be conservative about this in case there's an + undiscovered problem with the new driver.) This driver has some + limitations. Most notably, for various reasons it maxes out at 16TiB + and won't mount any ext4 filesystem that's larger than this. It also + doesn't support the meta_bg option flag; if your filesystem + uses this flag, this driver refuses to read it. You can learn about + your ext2/3/4 filesystem features by typing dumpe2fs /dev/sda2 | grep features, + changing /dev/sda2 to your + filesystem's device.
  • ISO-9660—This driver originated with rEFIt's author, but he never released a final version. Its code was improved by Oracle for @@ -165,7 +175,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. They all suffer from speed problems on some systems, as described later in "Notes on Specific Drivers;" however, these problems are very minor on most systems.

    - +

    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 ext2_x64.efi for the 64-bit ext2fs 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.

    @@ -208,7 +218,7 @@ fs0: map -r

    Notes on Specific Drivers

    -

    I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux /boot partition; however, if you're willing to use ext3fs or ReiserFS on your root (/) filesystem, you can use the EFI drivers to read your kernel from it. If you use ext4fs on your root (/) filesystem, you can use the ext4fs driver rather than a separate /boot partition. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.

    +

    I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux /boot partition; however, if you're willing to use ext3fs, ext4fs, or ReiserFS on your root (/) filesystem, you can use the EFI drivers to read your kernel from it. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.

    The Pfisterer ReiserFS and ext2fs drivers work, but they are a bit sluggish—particularly the ext2fs driver. The Agner ext4fs driver, when handling an actual ext4 filesystem, is in-between these two drivers in speed. The extent of the problem depends on the computer. In my tests so far, VirtualBox has fared the worst. On it, loading a Linux kernel with EFI stub loader from a FAT partition takes 2 seconds, from the moment of selecting the OS in rEFInd to the moment the kernel messages begin to appear. The equivalent time using ReiserFS or HFS+ is 20 seconds, with ext4fs it's 75 seconds, and with ext2fs it's 200 seconds (that is, 3 minutes and 20 seconds). On a 32-bit Mac Mini, though, the speed problem is much less pronounced—my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Speeds were similar with my newest computer, an ASUS P8H77-I board. Times with ext2fs on a UEFI PC with an Intel motherboard are in the 2–4 second range. If you try the ext2fs driver and it seems to hang, be patient; it may finally boot up. If so, and if the delay is too great for you to accept, you might consider using ext4fs or ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a /boot partition, it almost certainly is practical; you can back it up quite easily, create a fresh filesystem on it, and restore it. You may need to adjust your /etc/fstab entry for a new UUID value, though. As noted earlier, be sure to use notail as an option in /etc/fstab for ReiserFS if you want to read it from EFI.) You can even use HFS+ on a Linux /boot partition, although this makes the most sense on a Mac, which has its own EFI HFS+ driver. Of course, you can also create a FAT /boot partition and not deal with drivers at all. Mounting your ESP at /boot is a practical solution for many users.

    diff --git a/docs/refind/features.html b/docs/refind/features.html index 8f12242..086c889 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

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

    +12/16/2012, referencing rEFInd 0.6.0

    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!

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

  • Inclusion of drivers for the Linux ReiserFS and ext2 filesystems in the main package. (These drivers are absent from rEFInd prior to version - 0.4.0; and the rEFInd versions don't work on at least some Macs.)
  • + 0.4.0.) @@ -143,7 +143,7 @@ lack a usable CSM.
  • The ability to specify additional directories to scan for boot loaders and drivers (as of version 0.2.7).
  • -
  • The ability to specify directories to not be scanned for boot loaders, even if they would ordinarily be scanned (as of version 0.4.2).
  • +
  • The ability to specify volumes and directories to not be scanned for boot loaders, even if they would ordinarily be scanned (as of version 0.6.0 for volumes and 0.4.2 for directories).
  • The ability to re-scan boot loaders, to assist when changing removable media or after making a change to the configuration file with an EFI shell (as of version 0.3.5).
  • @@ -151,7 +151,7 @@ lack a usable CSM.
  • The ability to specify an additional icon storage directory, to assist in efforts to customize rEFInd's appearance (as of version 0.3.4).
  • -
  • The ability to set the screen's resolution, within limits imposed by the EFI (as of rEFInd 0.3.0).
  • +
  • The ability to set the screen's graphics resolution, within limits imposed by the EFI (as of rEFInd 0.3.0). Similarly, as of version 0.6.0, you can specify the text-mode resolution.
  • Proper handling of more OS options than can fit on the screen. (rEFIt displays an empty list in graphical mode when it detects too many OSes.)
  • @@ -167,9 +167,9 @@ lack a usable CSM.
  • 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.)
  • -
  • Drivers for ISO-9660 and HFS+, which are not included in rEFIt. (The ISO-9660 driver is based on code from the rEFIt project, but was never completed by its original author. It was completed by Oracle for VirtualBox.)
  • +
  • Drivers for ISO-9660, HFS+, and ext4fs, which are not included in rEFIt. (The ISO-9660 driver is based on code from the rEFIt project, but was never completed by its original author. It was completed by Oracle for VirtualBox. The ext4fs driver is derived from the rEFIt ext2fs driver.)
  • -
  • Beginning with version 0.5.0, the ability to "talk" to the shim boot loader to validate binaries supported by shim or its machine owner key (MOK) list when booting in EFI mode. As of version 0.5.0, this support is still crude and buggy; it should be considered an alpha-level feature at the moment.
  • +
  • Beginning with version 0.5.0, the ability to "talk" to the shim boot loader to validate binaries supported by shim or its machine owner key (MOK) list when booting with Secure Boot active. As of version 0.6.0, this support is still crude and buggy; it should be considered an alpha-level feature at the moment.
  • diff --git a/docs/refind/getting.html b/docs/refind/getting.html index f7f0742..884c8ea 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: -12/12/2012, referencing rEFInd 0.5.1.1

    +12/16/2012, referencing rEFInd 0.6.0

    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!

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