From: srs5694
Originally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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 35cacb6..56c3813 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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!
@@ -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" +} -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 ubuntu directory, and it will automatically find the appropriate Ubuntu icon (os_ubuntu.icns). This option is, however, disabled, so no matching icon will appear when you reboot unless you first comment out or delete the disabled line.
+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 ubuntu directory, and it will automatically find the appropriate Ubuntu icon (os_ubuntu.icns). This option is, however, disabled, so no matching icon will appear when you reboot unless you first comment out or delete the disabled line.
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 icon line after the volume line.) This entry uses the volume token to tell rEFInd to load the kernel and initial RAM disk file from the filesystem called G_KERNELS. It passes the filename for an initial RAM disk using the initrd line and free-form options using the options line. Note that the kernel filename does not include a .efi extension, which keeps rEFInd from picking up the kernel file in its auto-scans.
-You can combine these OS stanzas with the global refind.conf 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.
+The Windows via shell script 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—the script is named on the stanza's options line, using EFI file notation. The shell script, in turn, does whatever it needs to do and then launches the OS's boot loader:
+ +mm 0003003E 8 -pci +fs0:\EFI\Microsoft\Boot\bootmgfw.efi+ +
This example writes data to the computer's PCI bus via the EFI shell's mm command and then launches Windows. Chances are you won't need to engage in such operations, and I do not 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.
+ +You can combine these OS stanzas with the global refind.conf 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.
Originally written: 4/19/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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 0896f20..9c45522 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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/getting.html b/docs/refind/getting.html index a7212cf..9914588 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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,7 +97,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comby Roderick W. Smith, rodsmith@rodsbooks.com
-Originally written: 3/14/2012; last Web page update: 4/27/2012, referencing rEFInd 0.3.1
+Originally written: 3/14/2012; last Web page update: 5/4/2012, referencing rEFInd 0.3.2
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!
@@ -165,6 +165,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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!
@@ -92,7 +92,11 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com -Once you've uncompressed a rEFInd binary zip file, you can copy the entire refind directory into your EFI System Partition's (ESP's) EFI directory on UEFI-based PCs, so that rEFInd resides in EFI/refind. If you've tried rEFInd using a CD-R image file, you can copy the files from the EFI/refind directory on the CD to create an equivalent directory on the ESP. To avoid confusion, though, you should delete the rEFInd binary file for the CPU type your computer does not use. To the best of my knowledge, all UEFI-based PCs use 64-bit CPUs, so you should keep the refind_x64.efi binary and delete the refind_ia32.efi binary. Most Intel-based Macs also have 64-bit EFI implementations, so you should do the same thing; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the refind_ia32.efi file. You can determine whether your Mac needs the x86-64 or IA32 build by typing the following command in a Mac Terminal window:
+Once you've uncompressed a rEFInd binary zip file, you 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, install.sh, which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for Linux and Mac OS X. Installation under Windows also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in a section on this topic. If you're upgrading rEFInd, see the section on upgrading. Finally, I describe how to install some additional components you might find useful.
+ + + + +If you're using Linux or Mac OS X, the easiest way to install rEFInd is to use the install.sh 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 esp option.
+ +Before running this script under Linux, you should ensure that your ESP is mounted at /boot or /boot/efi, as described in more detail in the Installing rEFInd Manually Using Linux section. (If you installed Linux in EFI mode, chances are your ESP is properly mounted.) This precaution isn't necessary under OS X.
+ +A sample run under Linux looks something like this:
+ ++# ./install.sh +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.+ +
The output under OS X is a bit different:
+ ++$ ./install.sh +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.+ +
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:
+ +In any event, you should peruse the script's output to ensure that everything looks OK. install.sh 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.
+ -Accessing the ESP is easiest from Linux: The ESP is usually mounted at /boot/efi. You can verify that this is the case by using the df command:
+On a UEFI-based PC, you'll normally install rEFInd to the ESP, which is usually mounted at /boot/efi. You can verify that this is the case by using the df command:
$ df /boot/efi @@ -114,9 +204,9 @@ Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 191284 16604 174681 9% /boot/efi- + -
This example shows that /dev/sda1 is mounted at /boot/efi, which is a typical configuration. (The ESP can be on another disk or partition, but /dev/sda1 is the most common place for an ESP.) If your output shows /boot or / under the Mounted on column, then your ESP isn't mounted. If you get a df: `/boot/efi': No such file or directory error message, then the /boot/efi directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my EFI Boot Loader Installation page.
+This example shows that /dev/sda1 is mounted at /boot/efi, which is a typical configuration. (The ESP can be on another disk or partition, but /dev/sda1 is the most common place for an ESP.) If your output shows /boot or / under the Mounted on column, then your ESP isn't mounted. (An exception is if you're mounting the ESP at /boot. This is an unusual configuration. If you're using it, you can proceed, making suitable adjustments to subsequent commands.) If you get a df: `/boot/efi': No such file or directory error message, then the /boot/efi directory doesn't even exist. In such cases, you may need to jump through some extra hoops, as described on my EFI Boot Loader Installation page.
Assuming the ESP is mounted at /boot/efi, you can install the rEFInd files as follows (you must be root to issue these commands, or precede each of them with sudo):
@@ -126,7 +216,7 @@ Filesystem 1K-blocks Used Available Use% Mounted onOn some systems, efibootmgr won't do what you expect. On such systems, you may have better luck renaming the rEFInd files, as described in the Alternative Naming Options section.
-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 refind_x64.efi file with them; but very early Intel-based Macs have 32-bit EFIs (and sometimes 32-bit CPUs), which require the refind_ia32.efi file. You can determine whether your Mac needs the x86-64 or IA32 build by typing the following command in a Mac Terminal window:
+ ++$ ioreg -l -p IODeviceTree | grep firmware-abi ++ +
The result should include either EFI32 or EFI64, indicating that you should use the refind_ia32.efi or refind_x64.efi binary, respectively.
+ +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 bless utility rather than efibootmgr. To be precise, you should follow these steps:
@@ -217,7 +315,7 @@ Filesystem 1K-blocks Used Available Use% Mounted onIf 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 bless 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.
-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:
@@ -280,6 +378,42 @@ Filesystem 1K-blocks Used Available Use% Mounted onWhen you reboot, rEFInd should come up. With any luck, it will detect your old boot loader as an option, if one was installed before.
+ +If you've installed an earlier version of rEFInd, you can upgrade a bit more easily than you can install directly:
+ +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 refind.conf with refind.conf-sample from the rEFInd zip file. (When using install.sh, 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.
+Originally written: 3/19/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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/revisions.html b/docs/refind/revisions.html index 943f0e1..3b51448 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: 4/27/2012
+Last Web page update: 5/4/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.comOriginally written: 4/19/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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/todo.html b/docs/refind/todo.html index 2e92da5..ed55cc4 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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/using.html b/docs/refind/using.html index a8b72ac..64836a3 100644 --- a/docs/refind/using.html +++ b/docs/refind/using.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.comOriginally written: 3/14/2012; last Web page update: -4/27/2012, referencing rEFInd 0.3.1
+5/4/2012, referencing rEFInd 0.3.2I'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/mkcdimage b/mkcdimage index b8824f1..a132ee6 100755 --- 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 \ diff --git a/mkdistrib b/mkdistrib index 73232af..f244496 100755 --- 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 diff --git a/refind.conf-sample b/refind.conf-sample index 882e437..2c04c63 100644 --- a/refind.conf-sample +++ b/refind.conf-sample @@ -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" +} diff --git a/refind/main.c b/refind/main.c index 6bdc3a1..c8f0114 100644 --- a/refind/main.c +++ b/refind/main.c @@ -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