-0.4.2 (?/??/2012):
-------------------
+0.4.2 (6/3/2012):
+-----------------
+
+- Added a message to install.sh when run on Macs to remind users to update
+ the "scanfor" line in refind.conf if they need to boot BIOS-based OSes
+ via rEFInd.
+
+- Modified install.sh script to be smarter about running efibootmgr on
+ Linux. It now uses the whole path to the rEFInd binary as a key to
+ determine whether an existing entry exists, rather than just the filename
+ portion. If an entry exists and is the first entry in the boot order, the
+ script does nothing to the NVRAM entries. If such an entry exists but is
+ not the default, the script deletes that entry and creates a new one
+ (implicitly making it the first in the boot order). If such an entry does
+ not exist, the script creates a new one (again, making it the first in
+ the boot order).
- Added "dont_scan_dirs" configuration file option, which adds directories
to a "blacklist" of directories that are NOT scanned for boot loaders.
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
\r
<p>Originally written: 3/14/2012; last Web page update:\r
-5/25/2012, referencing rEFInd 0.4.1</p>\r
+6/3/2012, referencing rEFInd 0.4.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
<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:
-5/25/2012, referencing rEFInd 0.4.1</p>
+<p>Originally written: 3/14/2012; last Web page update: 6/3/2012, referencing rEFInd 0.4.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>
<tr>
<td><tt>hideui</tt></td>
<td><tt>banner</tt>, <tt>label</tt>, <tt>singleuser</tt>, <tt>hwtest</tt>, <tt>arrows</tt>, or <tt>all</tt></td>
- <td>Removes the specified user interface features. <tt>banner</tt> removes the banner graphic, <tt>label</tt> removes the text description of each tag, <tt>singleuser</tt> removes the single-user option from the Mac OS sub-menu, <tt>hwtest</tt> removes the Mac OS hardware test option, <tt>arrows</tt> removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, and <tt>all</tt> removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values.</td>
+ <td>Removes the specified user interface features. <tt>banner</tt> removes the banner graphic, <tt>label</tt> removes the text description of each tag and the countdown timer, <tt>singleuser</tt> removes the single-user option from the Mac OS sub-menu, <tt>hwtest</tt> removes the Mac OS hardware test option, <tt>arrows</tt> removes the arrows to the right or left of the OS tags when rEFInd finds too many OSes to display simultaneously, and <tt>all</tt> removes all of these options. You can specify multiple parameters with this option. The default is to set none of these values.</td>
</tr>
<tr>
<td><tt>icons_dir</tt></td>
<tr>
<td><tt>selection_big</tt></td>
<td>filename</td>
- <td>Specifies a graphics file that can be used to highlight the OS selection icons. This should be a 144x144 image in BMP format.</td>
+ <td>Specifies a graphics file that can be used to highlight the OS selection icons. This should be a 144x144 image in BMP format, stored in rEFInd's main directory.</td>
</tr>
<tr>
<td><tt>selection_small</tt></td>
<td>filename</td>
- <td>Like <tt>selection_big</tt>, this sets an alternate highlight graphic, but for the smaller utility tags on the second row.</td>
+ <td>Like <tt>selection_big</tt>, this sets an alternate highlight graphic, but for the smaller utility tags on the second row. This should be a 64x64 image in BMP format, stored in rEFInd's main directory.</td>
</tr>
<tr>
<td><tt>showtools</tt></td>
<td>directory path(s)</td>
<td>Adds the specified directory or directories to the directory list that rEFInd scans for EFI boot loaders when <tt>scanfor</tt> includes the <tt>internal</tt>, <tt>external</tt>, or <tt>optical</tt> options. Directories are specified relative to the filesystem's root directory. If this option is used, it's applied to <i>all</i> the filesystems that rEFInd scans. If a specified directory doesn't exist, rEFInd ignores it (no error results).</td>
</tr>
+<tr>
+ <td><tt>dont_scan_dirs</tt> or <tt>don't_scan_dirs</tt></td>
+ <td>directory path(s)</td>
+ <td>Adds the specified directory or directories to a directory "blacklist"—these directories are <i>not</i> scanned for boot loaders. This may be useful to keep duplicate boot loaders out of the menu (say, if <tt>EFI/Boot/bootx64.efi</tt> is a duplicate of another boot loader); or to keep drivers or utilities out of the boot menu, if you've stored them in a subdirectory of <tt>EFI</tt>. This option takes precedence over <tt>also_scan_dirs</tt>; if a directory appears in both lists, it will <i>not</i> be scanned.</td>
+</tr>
<tr>
<td><tt>scan_all_linux_kernels</tt></td>
<td>None</td>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
<li>The ability to specify additional directories to scan for boot loaders and drivers (as of version 0.2.7).</li>
+<li>The ability to specify directories to <i>not</i> be scanned for boot loaders, even if they would ordinarily be scanned (as of version 0.4.2).</li>
+
<li>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).</li>
<li>The ability to specify an additional icon storage directory, to assist in efforts to customize rEFInd's appearance (as of version 0.3.4).</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
<ul>
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.4.1/refind-src-0.4.1.zip/download">A
+<li><b><a href="http://sourceforge.net/projects/refind/files/0.4.2/refind-src-0.4.2.zip/download">A
source code zip file</a></b>—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
possible, but I've not attempted it.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.4.1/refind-bin-0.4.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.4.2/refind-bin-0.4.2.zip/download">A
binary zip file</a></b>—Download this if you want to install
rEFInd and/or its filesystem drivers 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
href="installing.html">Installing rEFInd</a> page.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.4.1/refind-cd-0.4.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.4.2/refind-cd-0.4.2.zip/download">A
CD-R image file</a></b>—This download contains the same files as
the zip file, but you can burn it to a CD-R to test rEFInd (and its
filesystem drivers) without installing it first. (It boots on UEFI PCs,
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
bless status with 'bless --info', since this is known to cause disk corruption
on some systems!!
+NOTE: If you want to boot an OS via BIOS emulation (such as Windows or some
+Linux installations), you *MUST* edit the ///EFI/refind/refind.conf
+file's 'scanfor' line to include the 'hdbios' option, and perhaps
+'biosexternal' and 'cd', as well.
+
Installation has completed successfully.</pre>
--info</tt> to check your installation status; this combination has
been reported to cause disk corruption on some Macs!</li>
+<li>If you intend to boot BIOS-based OSes, such as most Windows
+ installations and some Linux installations, you <i>must</i> edit the
+ <tt>refind.conf</tt> file, as noted near the end of the installation
+ script's output. (Note that rEFInd can only boot such OSes on Macs at
+ the moment.)</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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/19/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
<p class="subhead">by Roderick W. Smith, <a
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
-<p>Last Web page update: 5/25/2012</p>
+<p>Last Web page update: 6/3/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>
<ul>
+<li><b>0.4.2 (6/3/2012)</b>—I've added a new <tt>dont_scan_dirs</tt> option to the configuration file, enabling creation of a directory-scanning "blacklist." See the <a href="configfile.html">"Configuring the Boot Manager"</a> page for details. This version also makes a couple of changes to the <tt>install.sh</tt> script. The first is a reminder for Mac users to update <tt>refind.conf</tt> if they need to boot BIOS-based OSes. The second change makes the script a bit smarter about updating NVRAM settings when run from Linux; it now attempts to make itself the default boot loader if an entry for rEFInd already exists but isn't the default. I've made this change in response to problem reports from users; apparently some distributions' GRUB update scripts make GRUB the default boot loader under all circumstances, which causes rEFInd to be taken out of the picture after a GRUB update. The previous <tt>install.sh</tt> code wouldn't add rEFInd back to the "top spot" after this happened, but the new code should do the trick. (Although re-installing rEFInd is overkill in this case, it's something many users would logically try.)</li>
+
<li><b>0.4.1 (5/25/2012)</b>—This version provides a number of small bug fixes and improvements: When re-scanning (initiated by pressing Esc in the main menu), a message that re-scanning is occurring appears on the screen; I've fixed a bug that could cause rEFInd to appear as an option in its own menu after running a shell program and re-scanning; the <tt>install.sh</tt> script now checks for, and optionally deletes, the rEFItBlesser program when run under OS X; and the HFS+ driver now returns a volume label of <tt>HFS+ volume</tt>, rather than nothing at all (unlike other drivers, the HFS+ driver can't yet return the volume's true label).</li>
<li><b>0.4.0 (5/20/2012)</b>—I've bumped up this version number more than usual to reflect the addition of four filesystem drivers (for ext2fs, ReiserFS, HFS+, and ISO-9660) to the rEFInd package. These drivers originate with the original rEFIt, VirtualBox, and Clover boot loader projects. You can learn more on the <a href="drivers.html">drivers page.</a> To facilitate inclusion of drivers on the CD image, rEFInd also now supports reading drivers from architecture-specific subdirectories—<tt>drivers_x64</tt> and <tt>drivers_ia32</tt> for <i>x</i>86-64 and <i>x</i>86 systems, respectively. This version also adds the ability to eject removable media on some Macs (this won't work on UEFI-based PCs, unfortunately). Finally, this version fixes a problem that could cause GRUB 2 to be unable to read its configuration file in some settings when launched from rEFInd.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/20/2012, referencing rEFInd 0.4.0</p>
+6/3/2012, referencing rEFInd 0.4.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>
<li>I'd like to give the user the ability to set custom options on a
single-boot basis, similar to what's possible in GRUB.</li>
+ <li>A way to set the color of the font would be useful for theming
+ purposes.</li>
+
+ <li>Going further, the ability to load arbitrary other fonts, ideally
+ in a standard format, would be desirable for theming purposes.</li>
+
<li>A GUI configuration tool would be nice, but it's low on my personal
priority list. If you'd like to contribute, I prefer something
written in a cross-platform GUI toolkit, so that a single code base
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/25/2012, referencing rEFInd 0.4.1</p>
+6/3/2012, referencing rEFInd 0.4.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>
#
# Revision history:
#
+# 0.4.2 -- Added notice about BIOS-based OSes & made NVRAM changes in Linux smarter
# 0.4.1 -- Added check for rEFItBlesser in OS X
# 0.3.3.1 -- Fixed OS X 10.7 bug; also works as make target
# 0.3.2.1 -- Check for presence of source files; aborts if not present
echo "bless status with 'bless --info', since this is known to cause disk corruption"
echo "on some systems!!"
echo
+ echo "NOTE: If you want to boot an OS via BIOS emulation (such as Windows or some"
+ echo "Linux installations), you *MUST* edit the $InstallPart/$TargetDir/refind.conf"
+ echo "file's 'scanfor' line to include the 'hdbios' option, and perhaps"
+ echo "'biosexternal' and 'cd', as well."
+ echo
} # InstallOnOSX()
# Uses efibootmgr to add an entry for rEFInd to the EFI's NVRAM.
# If this fails, sets Problems=1
AddBootEntry() {
+ InstallIt="0"
Efibootmgr=`which efibootmgr 2> /dev/null`
if [[ $Efibootmgr ]] ; then
modprobe efivars &> /dev/null
PartNum=`grep $InstallPart /etc/mtab | cut -d " " -f 1 | cut -c 9-10`
EntryFilename=$TargetDir/$Refind
EfiEntryFilename=`echo ${EntryFilename//\//\\\}`
- ExistingEntry=`$Efibootmgr -v | grep $Refind`
+ EfiEntryFilename2=`echo ${EfiEntryFilename} | sed s/\\\\\\\\/\\\\\\\\\\\\\\\\/g`
+ ExistingEntry=`$Efibootmgr -v | grep $EfiEntryFilename2`
if [[ $ExistingEntry ]] ; then
- echo "An existing EFI boot manager entry for rEFInd seems to exist:"
- echo
- echo "$ExistingEntry"
- echo
- echo "This entry is NOT being modified, and no new entry is being created."
+ ExistingEntryBootNum=`echo $ExistingEntry | cut -c 5-8`
+ FirstBoot=`$Efibootmgr | grep BootOrder | cut -c 12-15`
+ if [[ $ExistingEntryBootNum != $FirstBoot ]] ; then
+ echo "An existing rEFInd boot entry exists, but isn't set as the default boot"
+ echo "manager. The boot order is being adjusted to make rEFInd the default boot"
+ echo "manager. If this is NOT what you want, you should use efibootmgr to"
+ echo "manually adjust your EFI's boot order."
+ $Efibootmgr -b $ExistingEntryBootNum -B &> /dev/null
+ InstallIt="1"
+ fi
else
+ InstallIt="1"
+ fi
+ if [[ $InstallIt == "1" ]] ; then
+ echo "Installing it!"
$Efibootmgr -c -l $EfiEntryFilename -L rEFInd -d $InstallDisk -p $PartNum &> /dev/null
if [[ $? != 0 ]] ; then
- EfibootmgrProblems=1
+ EfibootmgrProblems=1
Problems=1
fi
fi
{
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.1.1");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.4.2");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");