]> code.delx.au - refind/commitdiff
Scans for drivers even if the volume name is NULL
authorsrs5694 <srs5694@users.sourceforge.net>
Fri, 20 Apr 2012 17:40:25 +0000 (13:40 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Fri, 20 Apr 2012 17:40:25 +0000 (13:40 -0400)
NEWS.txt
docs/refind/drivers.html
refind/config.c
refind/lib.c
refind/main.c

index 459db913d07190aa555a6b57104eafee985bdae6..36f1777628585f6521cfff1ca94004e239c21082 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,11 @@
+0.2.8 (?/??/2012):
+------------------
+
+- Fixed a bug that caused rEFInd to fail to scan for drivers if the
+  filesystem driver didn't set a volume name (that is, if the relevant
+  field was set to NULL rather than even an empty string). In such
+  situations, rEFInd now reports the volume name as "Unknown".
+
 0.2.7 (4/19/2012):
 ------------------
 
index 96d08c03f97ebf05b710a45d6769e258a29f9ef8..58467041755b1aeddbd20c8eb4b4daa368d6b2e7 100644 (file)
@@ -121,7 +121,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li><b><a href="http://refit.sourceforge.net">rEFIt's ext2fs and ReiserFS drivers</a></b>&mdash;You can gain read-only access to ext2fs, ext3fs, and ReiserFS volumes with these drivers. You can use the binaries in the <tt>refit-bin-0.14/efi/tools/drivers</tt> directory of the binary package directly on a Mac. On a UEFI-based PC, though, you'll need to break the Mac-style "fat" binary into its 32- and 64-bit components. You can use my <a href="http://www.rodsbooks.com/thin/index.html"><tt>thin</tt></a> program for this job.</li>
 
-<li><b><a href="https://sourceforge.net/projects/cloverefiboot/">Clover EFI's ISO-9660, ext2fs, and HFS+ drivers</a></b>&mdash;This project is an offshoot of TianoCore, the main UEFI project. It includes drivers for <a href="http://cloverefiboot.svn.sourceforge.net/viewvc/cloverefiboot/VBoxFsDxe/">ISO-9660, ext2fs, and HFS+;</a> however, building them requires a fair amount of expertise. You can find a compile script for the ISO-9660 driver <a href="https://github.com/the-ridikulus-rat/My_Shell_Scripts/blob/master/tianocore_uefi/iso9660_virtualbox_x86_64_udk_linux_compile.sh">here,</a> and a compiled ISO-9660 binary <a href="dl.dropbox.com/u/9710721/VBoxIso9600.efi">here.</a> I haven't yet tested the compiled binary, much less tried to compile the source code.</li>
+<li><b><a href="https://sourceforge.net/projects/cloverefiboot/">Clover EFI's ISO-9660, ext2fs, and HFS+ drivers</a></b>&mdash;This project is an offshoot of TianoCore, the main UEFI project. It's primarily a Hackintosh boot loader, but it includes drivers for <a href="http://cloverefiboot.svn.sourceforge.net/viewvc/cloverefiboot/VBoxFsDxe/">ISO-9660, ext2fs, and HFS+;</a> however, building them requires a fair amount of expertise. You can find a compile script for the ISO-9660 driver <a href="https://github.com/the-ridikulus-rat/My_Shell_Scripts/blob/master/tianocore_uefi/iso9660_virtualbox_x86_64_udk_linux_compile.sh">here,</a> and a compiled ISO-9660 binary <a href="dl.dropbox.com/u/9710721/VBoxIso9600.efi">here.</a> I haven't yet tested the compiled binary, much less tried to compile the source code.</li>
+
+<li><b><a href="http://www.osx86.net/view/2571-clover_v2_r384__efi_bootloader_pkg_+_gpt_efi_tools.html">Clover's EFI Tools package</a></b>&mdash;This osx86.net thread includes links to a package called <tt>EFI_Tools_Clover_v2_r384_EFI_x32_x64_EN.zip</tt>, which holds an OS X application (a directory with a <tt>.app</tt> extension, as seen from other platforms) with a number of drivers in the <tt>Contents/Resources/EFI/drivers64</tt> directory (and an equivalent for 32-bit binaries). Some of these, such as keyboard drivers, are unlikely to be useful unless your system is badly broken as delivered. Three that caught my eye, however, are <tt>VBoxExt2-64.efi</tt>, <tt>NTFS-64.efi</tt>, and <tt>VBoxIso9600-64.efi</tt>.</li>
 
 <li><b><a href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe">VirtualBox's HFS+ and ISO-9660 drivers</a></b>&mdash;These drivers are available in source code form, and come with VirtualBox binaries. I've not attempted to compile them myself, but I've seen a report that suggests they may include assumptions that require use of <a href="http://www.mingw.org/">MinGW,</a> a GCC-based compiler for Windows (and cross-compiler to build Windows executables under Linux). I don't know of a source for binaries suitable for use on EFI-based computers; if you want to use them, you'll need to figure out how to compile them yourself.</li>
 
@@ -145,6 +147,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>The ext2fs and ReiserFS drivers work, but they are a bit sluggish&mdash;particularly the ext2fs driver. The extent of the problem depends on the computer. In my tests so far, VirtualBox has fared the worse. 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 is 20 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&mdash;my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Times with ext2fs on a UEFI PC with an Intel motherboard were also reasonable, although I didn't record precise values. Nonetheless, 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 ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a <tt>/boot</tt> 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 <tt>/etc/fstab</tt> entry for a new UUID value, though.)</p>
 
+<p>The Clover EFI Tools ext2fs driver performs much like the rEFIt ext2fs driver, but it doesn't deliver a filesystem label, which makes it less desirable. The NTFS driver from this package is nice and speedy, though, so if for some reason you need to place a boot loader on an NTFS volume, this driver might be worth tracking down.</p>
+
 <p>Although both ext2fs and ReiserFS are case-sensitive, these drivers treat them in a case-insensitive way. Symbolic links work, which opens up possibilities for configuration, such as using a single kernel binary for multiple Linux distributions, with a link in one subdirectory pointing to a file in another directory. (If you try this, though, be sure to use <i>relative</t> links, as in <tt>../otherdist/bzImage.efi</tt>, at least if the partition is not Linux's root filesystem.)</p>
 
 </ul>
index 6d0ab1667ecfe88d31b67de519182790c85a9142..dc8f2eac4961400ecf28de6f55f1f8682c94f0eb 100644 (file)
@@ -612,7 +612,6 @@ VOID ScanUserConfigured(VOID)
          return;
 
       Volume = SelfVolume;
-      // TODO: Figure out how to set volumes (on per-image basis, preferably)
 
       while ((TokenCount = ReadTokenLine(&File, &TokenList)) > 0) {
          if ((StriCmp(TokenList[0], L"menuentry") == 0) && (TokenCount > 1)) {
index f5037c5f65f7dd8d41709b24142118b98216d99f..81b71ade95d3a0e41a0c754c03065995f8d91085 100644 (file)
@@ -593,6 +593,9 @@ static VOID ScanVolume(IN OUT REFIT_VOLUME *Volume)
         FreePool(FileSystemInfoPtr);
     }
 
+    if (Volume->VolName == NULL) {
+       Volume->VolName = StrDuplicate(L"Unknown");
+    }
     // TODO: if no official volume name is found or it is empty, use something else, e.g.:
     //   - name from bytes 3 to 10 of the boot sector
     //   - partition number
index de398aa48186614f2cb6b20858ab6d131ecea63f..0196aabb8813dcf9983f10c1482611dce977c850 100644 (file)
@@ -84,7 +84,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.7");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.2.7.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");