]> code.delx.au - refind/commitdiff
Version 0.3.2 release
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 5 May 2012 00:52:23 +0000 (20:52 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 5 May 2012 00:52:23 +0000 (20:52 -0400)
18 files changed:
NEWS.txt
docs/refind/bootmode.html
docs/refind/configfile.html
docs/refind/drivers.html
docs/refind/features.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/linux.html
docs/refind/revisions.html
docs/refind/themes.html
docs/refind/todo.html
docs/refind/using.html
mkcdimage
mkdistrib
refind.conf-sample
refind/main.c
refind/screen.c

index 173d904b829b38137e5d7897d3b025d76fe03fc9..204c1cd3ec91e2566bfe1e7d13404f61e8c54713 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,5 +1,16 @@
-0.3.2 (?/??/2012):
-------------------
+0.3.2 (5/4/2012):
+-----------------
+
+- Added the install.sh script to install rEFInd on Linux and Mac OS X
+  systems. This script must be run as root (or via sudo). It requires
+  no options, but on Mac OS X, passing it the "esp" option causes it
+  to install rEFInd on the computer's ESP rather than the default of the
+  currently OS X boot partition. (Under Linux, the default is to install to
+  the ESP.) Note that there may be some unusual cases in which this script
+  will fail to work.
+
+- Does a better job of clearing the screen when launching OSes in text
+  mode.
 
 - Added detection "recipe" for GRUB 2's BIOS Boot Partition.
 
index eaef3d4c608c5956c59f30be6e6cba20c96c0d97..b2acedb8d5621b4b933e61735ada7877dc5d92a2 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
 \r
 <p>Originally written: 3/14/2012; last Web page update:\r
-4/27/2012, referencing rEFInd 0.3.1</p>\r
+5/4/2012, referencing rEFInd 0.3.2</p>\r
 \r
 \r
 <p>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!</p>\r
index 35cacb6c3a9664733618fb04e8ea9e7ba1b6e024..56c3813f57b50308989a1d529982ffbacf8253ac 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
@@ -309,15 +309,28 @@ menuentry Gentoo {
     initrd \kernels\initrd-3.3.0-rc7.img
     options "root=/dev/sda3 ro"
 }
+
+menuentry "Windows via shell script" {
+    icon \EFI\refind\icons\os_win.icns
+    loader \EFI\tools\shell.efi
+    options "fs0:\EFI\tools\launch_windows.nsh"
+}
 </pre>
 
-<p>This example sets up two entries: one for Ubuntu Linux and one for Gentoo Linux. Note that the two entries use different directory separators, simply to demonstrate the fact that it's possible. The Ubuntu entry sets no icon, since rEFInd will note that the boot loader is stored in the <tt>ubuntu</tt> directory, and it will automatically find the appropriate Ubuntu icon (<tt>os_ubuntu.icns</tt>). This option is, however, disabled, so no matching icon will appear when you reboot unless you first comment out or delete the <tt>disabled</tt> line.</p>
+<p>This example sets up three entries: one for Ubuntu Linux, one for Gentoo Linux, and one to launch a shell script. Note that the first two entries use different directory separators, simply to demonstrate the fact that it's possible. The Ubuntu entry sets no icon, since rEFInd will note that the boot loader is stored in the <tt>ubuntu</tt> directory, and it will automatically find the appropriate Ubuntu icon (<tt>os_ubuntu.icns</tt>). This option is, however, disabled, so no matching icon will appear when you reboot unless you first comment out or delete the <tt>disabled</tt> line.</p>
 
 <p class="sidebar"><b>Tip:</b> Under Linux, you can learn a filesystem's label by using <tt>blkid</tt>, as in <tt class="userinput">blkid /dev/sda1</tt>. The filesystem's label, if set, is identified by the keyword <tt>LABEL</tt> in the output.</p>
 
 <p>The Gentoo entry begins with an icon specification to be sure that the icon is loaded from the same volume as rEFInd. (If the icon were stored on the same filesystem as the kernel, you'd place the <tt>icon</tt> line after the <tt>volume</tt> line.) This entry uses the <tt>volume</tt> token to tell rEFInd to load the kernel and initial RAM disk file from the filesystem called <tt>G_KERNELS</tt>. It passes the filename for an initial RAM disk using the <tt>initrd</tt> line and free-form options using the <tt>options</tt> line. Note that the kernel filename does <i>not</i> include a <tt>.efi</tt> extension, which keeps rEFInd from picking up the kernel file in its auto-scans.</p>
 
-<p>You can combine these OS stanzas with the global <tt>refind.conf</tt> options presented earlier. The result would contain just one entry on the rEFInd boot menu, unless rEFInd found other boot options on an external or optical disk.</p>
+<p>The <tt>Windows via shell script</tt> entry may seem puzzling, but its purpose is to launch an OS (Windows in this case) after performing additional pre-boot initialization, which is handled by an EFI shell script. This works because you can pass the name of a shell script to an EFI shell&mdash;the script is named on the stanza's <tt>options</tt> line, using EFI file notation. The shell script, in turn, does whatever it needs to do and then launches the OS's boot loader:</p>
+
+<pre class="listing">mm 0003003E 8 -pci
+fs0:\EFI\Microsoft\Boot\bootmgfw.efi</pre>
+
+<p>This example writes data to the computer's PCI bus via the EFI shell's <tt>mm</tt> command and then launches Windows. Chances are you won't need to engage in such operations, and I do <i>not</i> recommend you try this exact example unless you know what you're doing! This command was required to activate the video hardware on a computer of a person with whom I corresponded prior to booting Windows, but such needs are rare.</p>
+
+<p>You can combine these OS stanzas with the global <tt>refind.conf</tt> options presented earlier. The result would contain just two entries on the rEFInd boot menu (for Gentoo and Windows, since the Ubuntu entry is disabled), unless rEFInd found other boot options on an external or optical disk.</p>
 
 <h2>Creating Submenu Entries</h2>
 
index 40ee0e5d9c22695222552a00436f12fff5e81cbc..0e2504446c5f06831b1f8813018e883c5500a450 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
index 0896f2038c67090f45862cf78aa0735292f524db..9c4552238f97f4d7c0cdfa1ff2b8bf700ad00c57 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 <p>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!</p>
 
index a7212cf1bbd864b36b544b15beaf3c8fd2adfd2d..991458853cd1ba8e01eb8abeee04e5c2a128ee56 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 <p>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!</p>
 
@@ -97,7 +97,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.1/refind-src-0.3.1.zip/download">A
+<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.2/refind-src-0.3.2.zip/download">A
     source code zip file</a></b>&mdash;This is useful if you want to
     compile the software locally. Note that I use Linux with the <a
     href="http://sourceforge.net/projects/gnu-efi">GNU-EFI</a> development
@@ -106,7 +106,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     it.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.1/refind-bin-0.3.1.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.3.2/refind-bin-0.3.2.zip/download">A
     binary zip file</a></b>&mdash;Download this if you want to install
     rEFInd on an <i>x</i>86 or <i>x</i>86-64 computer and have no need to
     test rEFInd first by booting it on an optical disc. This zip file
@@ -116,7 +116,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     href="installing.html">Installing rEFInd</a> page.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.1/refind-cd-0.3.1.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.3.2/refind-cd-0.3.2.zip/download">A
     CD-R image file</a></b>&mdash;This download contains the same files as
     the zip file, but you can burn it to a CD-R to test rEFInd without
     installing it first. (It boots on UEFI PCs, but fails on some older
index ccacfa4f9ce41d0337cff2963a2b1165f2169560..5fc4abd4d5114fe5bf0cb2150066b3b5a1b502b0 100644 (file)
@@ -14,7 +14,7 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/27/2012, referencing rEFInd 0.3.1</p>
+  <p>Originally written: 3/14/2012; last Web page update: 5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
@@ -165,6 +165,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li><a href="http://www.rodsbooks.com/gdisk/">The official GPT fdisk partitioning software Web page</a></li>
 
+<li>The <a href="http://sourceforge.net/projects/cloverefiboot/">Clover</a> boot loader is a Hackintosh boot loader that incorporates, among other things, its own unique forks of rEFIt and of DUET (a <a href="http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Welcome">TianoCore</a> tool to boot UEFI on BIOS-based computers).</li>
+
 </ul></li> <!-- Additional programs -->
 
 <li><b>Communications</b>
index 1ac51b7363558b51664b00610323155ba6626fa9..b6bce26f63af8a81f5cba5962f8cdb3c5858c470 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
@@ -92,7 +92,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p class="sidebar"><b>Important:</b> A rEFInd zip file, when uncompressed, creates a directory called <tt>refind-<i>version</i></tt>, where <tt><i>version</i></tt> is the version number. This directory includes a subdirectory called <tt>refind</tt> that holds the boot loader, along with another that holds documentation, as well as miscellaneous files in <tt>refind-<i>version</i></tt> itself. When I refer to "the <tt>refind</tt> directory" on this page, I mean the directory with that precise name, not the <tt>refind-<i>version</i></tt> directory that is its parent.</p>
 
-<p>Once you've uncompressed a rEFInd binary zip file, you can copy the entire <tt>refind</tt> directory into your EFI System Partition's (ESP's) <tt>EFI</tt> directory on UEFI-based PCs, so that rEFInd resides in <tt>EFI/refind</tt>. If you've tried rEFInd using a CD-R image file, you can copy the files from the <tt>EFI/refind</tt> 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 <i>not</i> use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the <tt>refind_x64.efi</tt> binary and delete the <tt>refind_ia32.efi</tt> 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 <tt>refind_ia32.efi</tt> file. You can determine whether your Mac needs the <i>x</i>86-64 or IA32 build by typing the following command in a Mac Terminal window:</p>
+<p>Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's ESP (or conceivably to some other location). The details of how you to this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. For Linux and Mac OS X, you can use the installation script, <a href="#installsh"><tt>install.sh</tt>,</a> which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for <a href="#linux">Linux</a> and <a href="#osx">Mac OS X.</a> Installation under <a href="#windows">Windows</a> also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in <a href="#naming">a section on this topic.</a> If you're upgrading rEFInd, see the <a href="#upgrading">section on upgrading.</a> Finally, I describe how to install some <a href="#addons">additional components</a> you might find useful.</a></p>
+
+<!--
+
+can copy the entire <tt>refind</tt> directory into your EFI System Partition's (ESP's) <tt>EFI</tt> directory on UEFI-based PCs, so that rEFInd resides in <tt>EFI/refind</tt>. If you've tried rEFInd using a CD-R image file, you can copy the files from the <tt>EFI/refind</tt> 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 <i>not</i> use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the <tt>refind_x64.efi</tt> binary and delete the <tt>refind_ia32.efi</tt> 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 <tt>refind_ia32.efi</tt> file. You can determine whether your Mac needs the <i>x</i>86-64 or IA32 build by typing the following command in a Mac Terminal window:</p>
 
 <pre class="listing">
 $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
@@ -102,11 +106,97 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 
 <p>Of course, before you can install the files, you must be able to access the ESP. The details of this task vary from one OS to another. If you have a choice, I recommend using <a href="#linux">Linux</a> for rEFInd installation on UEFI PCs and <a href="#osx">OS X</a> on Macs. (On Macs, you can optionally use OS X's main partition rather than the ESP for this purpose.) <a href="#windows">Windows</a> provides relatively primitive tools for accessing the ESP and manipulating the EFI's boot list. I also describe some <a href="#naming">options for naming rEFInd</a> that may be useful on some systems. Finally, I describe how to install some <a href="#addons">extra tools</a> that you may find useful but that are not included with rEFInd.</p>
 
+-->
+
+<a name="installsh">
+<h2>Installing rEFInd Using <tt>install.sh</tt> under Linux or Mac OS X</h2>
+
+<p class="sidebar"><b>Warning:</b> If you're using a Macintosh, you should run <tt>install.sh</tt> from Mac OS X rather than from Linux. If run from Linux, rEFInd is unlikely to be fully installed. Worse, it's conceivable that running <tt>install.sh</tt> from Linux will damage your firmware, requiring that it be re-flashed. The reason is that Apple uses non-standard methods to enable a boot loader, and the Linux functions in <tt>install.sh</tt> assume standard EFI installation methods.</p>
+
+<p>If you're using Linux or Mac OS X, the easiest way to install rEFInd is to use the <tt>install.sh</tt> script. Under Linux, this script installs rEFInd to your disk's ESP. Under Mac OS X, the script installs rEFInd to your current OS X boot partition by default; but you can install to your ESP instead by passing the script the <tt>esp</tt> option.</p>
+
+<p>Before running this script under Linux, you should ensure that your ESP is mounted at <tt>/boot</tt> or <tt>/boot/efi</tt>, as described in more detail in the <a href="#linux">Installing rEFInd Manually Using Linux</a> section. (If you installed Linux in EFI mode, chances are your ESP is properly mounted.) This precaution isn't necessary under OS X.</p>
+
+<p>A sample run under Linux looks something like this:</p>
+
+<pre class="listing">
+# <tt class="userinput">./install.sh</tt>
+Installing rEFInd on Linux....
+ESP was found at /boot/efi using vfat
+Copied rEFInd binary file refind_x64.efi
+
+Copying sample configuration file as refind.conf; edit this file to configure
+rEFInd.
+
+
+Installation has completed successfully.</pre>
+
+<p>The output under OS X is a bit different:</p>
+
+<pre class="listing">
+$ <tt class="userinput">./install.sh</tt>
+Not running as root; attempting to elevate privileges via sudo....
+Password:
+Installing rEFInd on OS X....
+Installing rEFInd to the partition mounted at '/'
+Copied rEFInd binary file refind_ia32.efi
+
+Copying sample configuration file as refind.conf; edit this file to configure
+rEFInd.
+
+
+WARNING: If you have an Advanced Format disk, *DO NOT* attempt to check the
+bless status with 'bless --info', since this is known to cause disk corruption
+on some systems!!
+
+
+Installation has completed successfully.</pre>
+
+<p>In either case, the details of the output differ depending on your existing configuration and how you ran the program. Some details that can affect how the script runs include the following:</p>
+
+<ul>
+
+<li>If you run the script as an ordinary user, it attempts to acquire
+    <tt>root</tt> privileges by using the <tt>sudo</tt> command. This works
+    on Mac OS X and some Linux installations (such as under Ubuntu or if
+    you've added yourself to the <tt>sudo</tt> users list), but on some
+    Linux installations this will fail. On such systems, you should run
+    <tt>install.sh</tt> as <tt>root</tt>.</li>
+
+<li>Under OS X, you can run the script with a mouse by opening a Terminal
+    session and then dragging-and-dropping the <tt>install.sh</tt> file to
+    the Terminal window. You'll need to press the Return or Enter key to
+    run the script.</li>
+
+<li>Under OS X, passing the "esp" option causes the script to install
+    rEFInd to the ESP. The script finds the first ESP that's identified by
+    the <tt>diskutil</tt> program and, if it's not already mounted, mounts
+    it to install rEFInd. Thus, it's conceivable that <tt>install.sh</tt>
+    will install rEFInd to the wrong partition if you have multiple disks
+    or if a disk has multiple ESPs. If you believe this has happened, you
+    may need to re-install manually.</li>
+
+<li>If you're using OS X 10.7's Whole Disk Encryption (WDE) feature, you
+    <i>must</i> install rEFInd to the ESP, so the <tt>esp</tt> option to
+    <tt>install.sh</tt> is required. I'm still a little bit foggy about
+    what's required to boot the system once this is done; see <a
+    href="https://sourceforge.net/p/refind/discussion/general/thread/5c7d0195/">this
+    forum thread</a> for a discussion of the topic.</li>
+
+<li>If you're using OS X and an Advanced Format disk, heed the warning that
+    <tt>install.sh</tt> displays and <i><b>do not</b></i> use <tt>bless
+    --info</tt> to check your installation status; this combination has
+    been reported to cause disk corruption on some Macs!</li>
+
+</ul>
+
+<p>In any event, you should peruse the script's output to ensure that everything looks OK. <tt>install.sh</tt> displays error messages when it encounters errors, such as if the ESP is mounted read-only or if you run out of disk space. You may need to correct such 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 such as which partition to use for installation.</p>
+
 <a name="linux">
-<h2>Installing rEFInd Using Linux</h2>
+<h2>Installing rEFInd Manually Using Linux</h2>
 </a>
 
-<p>Accessing the ESP is easiest from Linux: The ESP is usually mounted at <tt>/boot/efi</tt>. You can verify that this is the case by using the <tt>df</tt> command:</p>
+<p>On a UEFI-based PC, you'll normally install rEFInd to the ESP, which is usually mounted at <tt>/boot/efi</tt>. You can verify that this is the case by using the <tt>df</tt> command:</p>
 
 <pre class="listing">
 $ <b>df /boot/efi</b>
@@ -114,9 +204,9 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 /dev/sda1         191284 16604    174681   9% /boot/efi
 </pre>
 
-<p class="sidebar"><b>Warning:</b> If you're running Linux on a Mac, I recommend you install rEFInd under OS X. The Mac's boot process deviates a bit from EFI standards, so you'll probably have to use a tool called <tt>bless</tt> under MacOS to do the job. Alternatively, there's a new Linux program, <tt>hfs-bless</tt>, part of the <a href="http://www.codon.org.uk/~mjg59/mactel-boot/"><tt>mactel-boot</tt></a> package, that's supposed to work with <tt>efibootmgr</tt> to make a Mac HFS partition bootable. I've not yet tried it, though. There are also reports that the <tt>efibootmgr</tt> tool used under Linux can corrupt some Macs' firmware. Although I've seen some vague suggestions that this problem has been fixed under 3.<i>x</i> kernels, I haven't tested this claim.</p>
+<p class="sidebar"><b>Warning:</b> If you're running Linux on a Mac, I recommend you install rEFInd under OS X. The Mac's boot process deviates a bit from EFI standards, so you'll probably have to use a tool called <tt>bless</tt> under Mac OS to do the job. Alternatively, there's a new Linux program, <tt>hfs-bless</tt>, part of the <a href="http://www.codon.org.uk/~mjg59/mactel-boot/"><tt>mactel-boot</tt></a> package, that's supposed to work with <tt>efibootmgr</tt> to make a Mac HFS partition bootable. I've not yet tried it, though. There are also reports that the <tt>efibootmgr</tt> tool used under Linux can corrupt some Macs' firmware. Although I've seen some vague suggestions that this problem has been fixed under 3.<i>x</i> kernels, I haven't tested this claim.</p>
 
-<p>This example shows that <tt>/dev/sda1</tt> is mounted at <tt>/boot/efi</tt>, which is a typical configuration. (The ESP can be on another disk or partition, but <tt>/dev/sda1</tt> is the most common place for an ESP.) If your output shows <tt>/boot</tt> or <tt>/</tt> under the <tt>Mounted on</tt> column, then your ESP isn't mounted. If you get a <tt>df: `/boot/efi': No such file or directory</tt> error message, then the <tt>/boot/efi</tt> directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my <a href="http://www.rodsbooks.com/efi-bootloaders/installation.html">EFI Boot Loader Installation</a> page.</p>
+<p>This example shows that <tt>/dev/sda1</tt> is mounted at <tt>/boot/efi</tt>, which is a typical configuration. (The ESP can be on another disk or partition, but <tt>/dev/sda1</tt> is the most common place for an ESP.) If your output shows <tt>/boot</tt> or <tt>/</tt> under the <tt>Mounted on</tt> column, then your ESP isn't mounted. (An exception is if you're mounting the ESP at <tt>/boot</tt>. This is an unusual configuration. If you're using it, you can proceed, making suitable adjustments to subsequent commands.) If you get a <tt>df: `/boot/efi': No such file or directory</tt> error message, then the <tt>/boot/efi</tt> directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my <a href="http://www.rodsbooks.com/efi-bootloaders/installation.html">EFI Boot Loader Installation</a> page.</p>
 
 <p>Assuming the ESP is mounted at <tt>/boot/efi</tt>, you can install the rEFInd files as follows (you must be <tt>root</tt> to issue these commands, or precede each of them with <tt><b>sudo</b></tt>):</p>
 
@@ -126,7 +216,7 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 
 <li>Type <tt><b>cd /boot/efi/EFI/refind</b></tt> to change into rEFInd's new directory on the ESP.</li>
 
-<li>Type <tt><b>rm refind_ia32.efi</b></tt> to remove the IA32 binary if you're using an <i>x</i>86-64 (64-bit) system; or type <tt><b>rm refind_x64.efi</b></tt> to remove the <i>x</i>86-64 binary if you're using an <i>x</i>86 (32-bit) system. You can optionally rename the binary you keep as <tt>refind.efi</tt>, but this isn't required.</li>
+<li>Type <tt><b>rm refind_ia32.efi</b></tt> to remove the IA32 binary if you're using an <i>x</i>86-64 (64-bit) system; or type <tt><b>rm refind_x64.efi</b></tt> to remove the <i>x</i>86-64 binary if you're using an <i>x</i>86 (32-bit) system. You can optionally rename the binary you keep as <tt>refind.efi</tt>, but this isn't required. (Note that you must keep the version that's the correct bit width for your EFI; if you've installed a 32-bit Linux on a 64-bit PC with a 64-bit EFI, you'd keep <tt>refind_x64.efi</tt>.</li>
 
 <li>Rename the configuration file by typing <tt><b>mv refind.conf-sample refind.conf</b></tt>. Consult the <a href="configfile.html">Editing the rEFInd Configuration File</a> page for information on how to adjust your options.</li>
 
@@ -143,10 +233,18 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 <p>On some systems, <tt>efibootmgr</tt> won't do what you expect. On such systems, you may have better luck renaming the rEFInd files, as described in the <a href="#naming">Alternative Naming Options</a> section.</p>
 
 <a name="osx">
-<h2>Installing rEFInd Using Mac OS X</h2>
+<h2>Installing rEFInd Manually Using Mac OS X</h2>
 </a>
 
-<p class="sidebar"><b>Warning:</b> One of the reasons I've abandoned rEFIt's GUI installation tools for Mac OS X is that there are several bug reports (such as <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=3147364&group_id=161917&atid=821764">this one</a> and <a href="https://sourceforge.net/tracker/?func=detail&aid=3218104&group_id=161917&atid=821764">this one</a>) that the rEFIt installer may be causing filesystem corruption on disks over about 500 MiB. <a href="https://sourceforge.net/tracker/?func=detail&aid=3218104&group_id=161917&atid=821764">This</a> report on the problem, and particularly the post by mic-marchen, suggests that the problem is related to a bug in OS X's <tt>bless</tt> utility, and particularly its <tt>--info</tt> option, that causes it to corrupt data on disks with 4 KiB sectors. These <i>Advanced Format</i> disks are becoming increasingly common, particularly at larger disk sizes. Therefore, I <i>strongly</i> recommend that you <i>not</i> type <tt class="userinput">sudo bless --info</tt> to check the status of your installation if you have such a disk, or even if you suspect you might have such a disk. (I've seen Advanced Format disks as small as 320 GB.)</p>
+<p>Before installing rEFInd on a Mac, you must determine whether it uses a 32-bit or 64-bit EFI implementation. Most Intel-based Macs have 64-bit EFIs, so you should use the <tt>refind_x64.efi</tt> file with them; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the <tt>refind_ia32.efi</tt> file. You can determine whether your Mac needs the <i>x</i>86-64 or IA32 build by typing the following command in a Mac Terminal window:</p>
+
+<pre class="listing">
+$ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
+</pre>
+
+<p>The result should include either <tt>EFI32</tt> or <tt>EFI64</tt>, indicating that you should use the <tt>refind_ia32.efi</tt> or <tt>refind_x64.efi</tt> binary, respectively.</p>
+
+<p class="sidebar"><b>Warning:</b> Numerous rEFIt bug reports indicate disk corruption problems on disks over about 500 GiB. <a href="https://sourceforge.net/tracker/?func=detail&aid=3218104&group_id=161917&atid=821764">This</a> report on the problem, and particularly the post by mic-marchen, suggests that the problem is related to a bug in OS X's <tt>bless</tt> utility, and particularly its <tt>--info</tt> option, that causes it to corrupt data on disks with 4 KiB sectors. These <i>Advanced Format</i> disks are becoming increasingly common, particularly at larger disk sizes. Therefore, I <i>strongly</i> recommend that you <i>not</i> type <tt class="userinput">sudo bless --info</tt> to check the status of your installation if you have such a disk, or even if you suspect you might have such a disk. (I've seen Advanced Format disks as small as 320 GB.)</p>
 
 <p>The procedure for installing rEFInd on a Mac is similar to that for installing it under Linux, except that you can (and probably should) install it to OS X's system partition or some other HFS+ partition rather than to the ESP, and you must use the <tt>bless</tt> utility rather than <tt>efibootmgr</tt>. To be precise, you should follow these steps:</p>
 
@@ -217,7 +315,7 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 <p>If you want to remove rEFInd from your system, you can delete its files. The Mac will revert to booting using whatever standard boot loader it can find. Alternatively, you can use <tt>bless</tt> to bless another EFI boot loader. The GUI Startup Disk utility in System Preferences provides a simplified interface that enables you to select which OS X installation to boot, but it doesn't look for non-Apple boot loaders, so you can't use it to enable rEFInd.</p>
 
 <a name="windows">
-<h2>Installing rEFInd Using Windows</h2>
+<h2>Installing rEFInd Manually Using Windows</h2>
 </a>
 
 <p>To install rEFInd under Windows, you must first find a way to access the ESP, which Windows normally hides from view. One way to accomplish this goal, and to proceed forward once the ESP is accessible, is as follows:</p>
@@ -280,6 +378,42 @@ Filesystem     1K-blocks  Used Available Use% Mounted on
 
 <p>When you reboot, rEFInd should come up. With any luck, it will detect your old boot loader as an option, if one was installed before.</p>
 
+<a name="upgrading">
+<h2>Upgrading rEFInd</h2>
+</a>
+
+<p>If you've installed an earlier version of rEFInd, you can upgrade a bit more easily than you can install directly:</p>
+
+<ul>
+
+<li>On a UEFI-based PC, under any OS, you should be able to replace your
+    old rEFInd file with the new one. Make sure that the new rEFInd has the
+    same name as the old one, and that it's for the correct CPU type. Since
+    UEFI launches boot programs by filename, a simple file replacement will
+    suffice to launch the new version. If the new version includes new
+    icons, you may want to copy some or all of them.</li>
+
+<li>On a Mac, you can copy over the old rEFInd binary file <i>from
+    Linux</i> and it will usually work, provided you copy <i>directly</i>
+    over the old file (rather than rename or delete the old file and then
+    copy the new one in its place). The same caveats about icons as apply
+    to UEFI-based PCs apply in this case. This method requires an extra
+    step in Mac OS X, though....</li>
+
+<li>In OS X, if you copy over the original file with the new one, you'll
+    probably have to re-bless it to make it work.</li>
+
+<li>Under Linux or OS X, you can re-run the <tt>install.sh</tt> script. In
+    most cases this works fine, but you'll end up with a duplicate of the
+    icons directory (<tt>icons-backup</tt>, which holds the original icons,
+    whereas <tt>icons</tt> holds the icons from the new package). Normally
+    this just wastes some disk space; but if you've customized your icons,
+    you'll need to copy your altered icons back.</li>
+
+</ul>
+
+<p>In all cases, if the new version includes new or altered configuration file options, you may need to manually update your configuration file. Alternatively, if you've used the default configuration file, you can replace your working <tt>refind.conf</tt> with <tt>refind.conf-sample</tt> from the rEFInd zip file. (When using <tt>install.sh</tt>, this file will be copied to rEFInd's installation directory under its original name, so you can rename it within that directory to replace the old file.</p>
+
 <a name="addons">
 <h2>Installing Additional Components</h2>
 </a>
index 76801016d2d64ba819ba694b334f518d0c775432..fec78d46979035e8babcc4eb0c8321293410ee72 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/19/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
index 943f0e15f824dc37148f648010baf0754cc56328..3b514486e7c629667a2e0155845d8450dc1fa409 100644 (file)
@@ -14,7 +14,7 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Last Web page update: 4/27/2012</p>
+<p>Last Web page update: 5/4/2012</p>
 
 
 <p>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!</p>
@@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.3.2 (5/4/2012)</b>&mdash;rEFInd's core functionality changes very little with this version; I've tweaked the detection of BIOS-mode boot loaders to keep unbootable FAT partitions created under Linux and Windows out of the boot list, while adding detection of GRUB BIOS Boot Partitions to the list. I've also made a change that improves screen-clearing when launching EFI utilities and OSes in text mode. The major change to this version is the addition of a new Linux/OS X installation script, <tt>install.sh</tt>. In most cases, this makes it possible to install rEFInd simply by typing <tt class="userinput">./install.sh</tt> from the rEFInd package directory; however, you should see the <a href="installing.html">Installing rEFInd</a> page for details. In some cases, manual installation may still be required. Also, you may prefer to copy over the old rEFInd program file with the new one when upgrading.</li>
+
 <li><b>0.3.1 (4/27/2012)</b>&mdash;You'll find a few minor enhancements and bug fixes in this version, none of which affect the configuration files. rEFInd now sorts its boot loader entries <i>within each directory</i> by date, with the newest items first. The intent is that you can specify a directory name as the <tt>default_selection</tt> and the most recent boot loader in that directory will become the default. This may obviate the need to adjust the default after adding a new Linux kernel with EFI stub loader support. I've also improved the handling of <tt>.icns</tt> files for Linux kernels that lack <tt>.efi</tt> extensions; loader-specific icons for these kernels should now take the name of the kernel plus <tt>.icns</tt>&mdash;for instance, <tt>vmlinuz-0.3.2.icns</tt> for <tt>vmlinuz-0.3.2</tt>. rEFInd also now hides all <tt>.icns</tt> files from the boot loader list. Finally, this version fixes a bug, introduced in version 0.3.0, that could cause spurious <tt>Unsupported while scanning the root directory</tt> errors under some conditions on Macs.</li>
 
 <li><b>0.3.0 (4/22/2012)</b>&mdash;This version marks the official transition from alpha to beta status for rEFInd. This isn't because of any important objective milestone being passed; it's just that rEFInd has been used by many people who have reported no show-stopping bugs, so I'm now confident that rEFInd is stable enough for general use. That's not to say it's perfect; it still has numerous <a href="todo.html">known bugs and limitations.</a> That's why it's still beta. To get down to specifics, this version adds two new configuration file tokens: <tt>resolution</tt>, which sets the screen resolution; and <tt>scan_all_linux_kernels</tt>, which adds Linux kernel files to the boot loader list even if they lack <tt>.efi</tt> filename extensions. See the <a href="configfile.html">Configuring the Boot Manager</a> page for details on these new options. I've also fixed some bugs: One that sometimes caused Macs to crash when returning from the EFI shell or other programs; another that caused rEFInd to fail to scan filesystems if the filesystem driver didn't return a volume name; and a third that caused rEFInd to fail to detect boot loaders depending on the case of the filename on some EFIs (this is really a workaround for an EFI implementation bug). The first of these is a <i>very</i> tentative fix and it could have negative effects on some systems (non-Mac EFI 1.x systems or Macs that weren't affected by the bug in other recent releases), so be sure to <a href="mailto:rodsmith@rodsbooks.com">contact me</a> if rEFInd crashes or otherwise misbehaves after you use an EFI shell.</li>
index ab5be393bfc458a32cf2303928cc54c0d2b812b8..a39fec487332016ba6f46f3375d3e26c24309b8d 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
index 2e92da5a630690e2f3ff870dd9ef5bbd0b789cb8..ed55cc4f1d30b4480dce6b18bfaa7e9b3a764462 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
index a8b72ac30f2a037d54fccb15ea42264f81ebdd41..64836a387702fc34dbbfc92bfd5d6a1a96130233 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-4/27/2012, referencing rEFInd 0.3.1</p>
+5/4/2012, referencing rEFInd 0.3.2</p>
 
 
 <p>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!</p>
index b8824f10044cb4ad1c9f6573e1f9b5cc47728685..a132ee6cf95d9e81179093e7cdbac6ae47ce7c9f 100755 (executable)
--- a/mkcdimage
+++ b/mkcdimage
@@ -86,6 +86,7 @@ mv refind-bin-$Version refind-flashdrive-$Version
 zip -9r ../refind-flashdrive-$Version.zip \
     refind-flashdrive-$Version/refind-flashdrive-$Version.img \
     refind-flashdrive-$Version/docs refind-flashdrive-$Version/LICENSE.txt \
+    refind-flashdrive-$Version/install.sh \
     refind-flashdrive-$Version/COPYING.txt \
     refind-flashdrive-$Version/CREDITS.txt \
     refind-flashdrive-$Version/README.txt \
index 73232af18cbd7828e52bbeac4e7906fa59b4e32f..f2444965690ab1cff7ba02417860f1088954b8d7 100755 (executable)
--- a/mkdistrib
+++ b/mkdistrib
@@ -16,7 +16,7 @@ make clean
 # Prepare a place and copy files there....
 mkdir -p ../snapshots/$1/refind-$1/icons
 cp --preserve=timestamps icons/*icns ../snapshots/$1/refind-$1/icons/
-cp -a docs images include libeg refind CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
+cp -a docs images include libeg refind install.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
 
 # Go there are prepare a souce code zip file....
 cd ../snapshots/$1/
@@ -30,7 +30,7 @@ cp -a icons refind-bin-$1/refind/
 cp --preserve=timestamps refind.conf-sample refind-bin-$1/refind/
 cp refind/refind.efi refind-bin-$1/refind/refind_x64.efi
 cp $StartDir/refind_ia32.efi refind-bin-$1/refind/
-cp -a COPYING.txt LICENSE.txt README.txt docs CREDITS.txt refind-bin-$1
+cp -a COPYING.txt LICENSE.txt README.txt docs CREDITS.txt install.sh refind-bin-$1
 zip -9r ../refind-bin-$1.zip refind-bin-$1
 cd ..
 rm -r refind-$1
index 882e437ab5fb2da70bdca23c1f0821cae94f931c..2c04c6387b1da8d8669f9493ead3f4f18570bd98 100644 (file)
@@ -219,3 +219,13 @@ menuentry "Windows 7" {
        disabled
 }
 
+# EFI shells are programs just like boot loaders, and can be
+# launched in the same way. You can pass a shell the name of a
+# script that it's to run on the "options" line. The script
+# could initialize hardware and then launch an OS, or it could
+# do something entirely different.
+menuentry "Windows via shell script" {
+       icon \EFI\refind\icons\os_win.icns
+       loader \EFI\tools\shell.efi
+       options "fs0:\EFI\tools\launch_windows.nsh"
+}
index 6bdc3a16880528a09767c05a8276f457036503b7..c8f011457e6c20fa2617f014303667e60785b855 100644 (file)
@@ -104,7 +104,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.1.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.2");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -1173,10 +1173,10 @@ static VOID ScanLegacyExternal(VOID)
 
 static VOID StartTool(IN LOADER_ENTRY *Entry)
 {
-    BeginExternalScreen(Entry->UseGraphicsMode, Entry->me.Title + 6);  // assumes "Start <title>" as assigned below
-    StartEFIImage(Entry->DevicePath, Entry->LoadOptions, Basename(Entry->LoaderPath),
-                  Basename(Entry->LoaderPath), NULL, TRUE);
-    FinishExternalScreen();
+   BeginExternalScreen(Entry->UseGraphicsMode, Entry->me.Title + 6);  // assumes "Start <title>" as assigned below
+   StartEFIImage(Entry->DevicePath, Entry->LoadOptions, Basename(Entry->LoaderPath),
+                 Basename(Entry->LoaderPath), NULL, TRUE);
+   FinishExternalScreen();
 } /* static VOID StartTool() */
 
 static LOADER_ENTRY * AddToolEntry(IN CHAR16 *LoaderPath, IN CHAR16 *LoaderTitle, IN EG_IMAGE *Image,
index 86407f4d18edacec730cfde53953e3c34459cbfd..a5628c089d3de8b61598eed7fecd06da49cb1567 100644 (file)
@@ -167,13 +167,17 @@ VOID FinishTextScreen(IN BOOLEAN WaitAlways)
 
 VOID BeginExternalScreen(IN BOOLEAN UseGraphicsMode, IN CHAR16 *Title)
 {
+    EG_PIXEL DarkBackgroundPixel  = { 0x0, 0x0, 0x0, 0 };
+
     if (!AllowGraphicsMode)
         UseGraphicsMode = FALSE;
 
     if (UseGraphicsMode) {
         SwitchToGraphics();
         BltClearScreen(FALSE);
-    }
+    } else {
+       egClearScreen(&DarkBackgroundPixel);
+    } // if/else
 
     // show the header
     DrawScreenHeader(Title);