From: srs5694 Date: Wed, 4 Feb 2015 21:09:38 +0000 (-0500) Subject: Further tweaks to new NTFS Windows boot partition filtering. X-Git-Url: https://code.delx.au/refind/commitdiff_plain/056ca03285e703164b72c615aeb079fe55113a5e Further tweaks to new NTFS Windows boot partition filtering. --- diff --git a/CREDITS.txt b/CREDITS.txt index 051d523..887e892 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -115,6 +115,12 @@ Icons and graphics: (http://en.wikipedia.org/wiki/File:Google_Chrome_icon_and_wordmark_%282011%29.svg), which in turn is Google's original work. +* The Windows 8 icon (icons/os_win8.png) is taken from Martz90's Cicle + Icons icon set + (http://www.iconarchive.com/show/circle-icons-by-martz90.html), which is + licensed under the CC Attribution-Noncommercial-No Derivate 4.0 license + (http://creativecommons.org/licenses/by-nc-nd/4.0/). + * The icon used (at different sizes) for both the generic network OS and for the network-boot badge is from https://www.iconfinder.com/icons/37048/intranet_network_icon. diff --git a/NEWS.txt b/NEWS.txt index 5d8a5ae..071b2ce 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,16 @@ 0.8.6 (?/??/2016): ------------------ +- Addition of new Windows 8 OS icon. On Macs and for BIOS/legacy boots, the + new icon is now used for Windows Vista, 7, and 8, while the old one is + used for earlier versions of Windows. For EFI-mode boots, the new icon is + used universally. + +- If the NTFS driver is loaded, rEFInd now scans NTFS volumes on Macs for + the presence of Windows boot files, and removes any NTFS volume that + lacks such files from the BIOS/legacy boot list. This should help + unclutter the display on systems that contain NTFS data partitions. + - Fixed bug that caused misidentification of both whole disks and NTFS volumes as being FAT. (This bug affected the identification of devices and locations in the rEFInd menu, not actual access to devices.) diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index 36e800f..037763f 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -261,9 +261,15 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • NTFS—Samuel Liao contributed this driver, which uses the rEFIt/rEFInd driver framework. My own testing of it is limited, but it does work for me. Note that this driver is not required - to boot Windows with rEFInd, since Windows stores its boot loader on - the (FAT) ESP. You might use this driver if you want to store large - boot files, such as EFI-accessible RAM disk images, from Windows.
  • + to boot Windows with rEFInd, since Windows stores its EFI boot loader + on the (FAT) ESP, and the BIOS boot process (generally used when + dual-booting on a Mac) relies only on the partition's boot sector, + which is read without the benefit of this driver. You might use this + driver if you want to store large boot files, such as EFI-accessible + RAM disk images, from Windows. Also, if you have NTFS data partitions + on a Mac, loading this driver should exclude them from the boot menu; + and you should see NTFS volume names in the boot menu on a Mac if you + load this driver. diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 33f5613..b8930a1 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -209,6 +209,14 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    single file, so rEFInd is divorced from its configuration and support files. +
  • A way to identify specific Windows versions and present unique + icons or change the text is desirable. Currently, a crude + distinction of XP and earlier vs. Vista and later is possible for + BIOS-booting on Macs, but no such distinction is made for EFI-mode + booting, and nothing finer-grained is attempted. Improvements will + probably require identifying unique features of each version's boot + loader files or boot sector code.
  • +
  • Known bugs that need squashing: @@ -260,6 +268,14 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    have the equipment and skill to do so, I'd be interested in receiving a patch.
  • +
  • If you use a true MBR disk on a Mac to boot Windows or some other + BIOS-only OS, and if that disk has an extended partition, that + partition may show up in rEFInd as a bootable FAT partition. The + reason is twofold: FAT doesn't contain a simple "magic" signature + like most filesystems, so it's easy to misidentify something else + as FAT; and it's hard to positively identify boot code vs. other + random data.
  • +
  • The re-scan feature occasionally produces odd results, such as ignoring new media or keeping old media that have been ejected. This should be investigated and fixed.
  • diff --git a/icons/os_win8.png b/icons/os_win8.png index 1bbd727..d1cdfae 100644 Binary files a/icons/os_win8.png and b/icons/os_win8.png differ diff --git a/refind/lib.c b/refind/lib.c index 08550e2..48da11d 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -630,14 +630,16 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable) Volume->OSIconName = L"netbsd"; Volume->OSName = L"NetBSD"; + // Windows NT/200x/XP } else if (FindMem(Buffer, SECTOR_SIZE, "NTLDR", 5) >= 0) { Volume->HasBootCode = TRUE; Volume->OSIconName = L"win"; Volume->OSName = L"Windows"; + // Windows Vista/7/8 } else if (FindMem(Buffer, SECTOR_SIZE, "BOOTMGR", 7) >= 0) { Volume->HasBootCode = TRUE; - Volume->OSIconName = L"winvista,win"; + Volume->OSIconName = L"win8,win"; Volume->OSName = L"Windows"; } else if (FindMem(Buffer, 512, "CPUBOOT SYS", 11) >= 0 || @@ -835,7 +837,7 @@ static CHAR16 *GetVolumeName(REFIT_VOLUME *Volume) { return FoundName; } // static CHAR16 *GetVolumeName() -// Determine the unique GUID of the volume and store it. +// Determine the unique GUID and name of the volume and store them. static VOID SetPartGuidAndName(REFIT_VOLUME *Volume, EFI_DEVICE_PATH_PROTOCOL *DevicePath) { HARDDRIVE_DEVICE_PATH *HdDevicePath; @@ -851,16 +853,17 @@ static VOID SetPartGuidAndName(REFIT_VOLUME *Volume, EFI_DEVICE_PATH_PROTOCOL *D } // if } // VOID SetPartGuid() -// Return TRUE if NTFS boot files are found, FALSE otherwise. -// Assumes Volume is already mounted. +// Return TRUE if NTFS boot files are found or if Volume is unreadable, +// FALSE otherwise. The idea is to weed out non-boot NTFS volumes from +// BIOS/legacy boot list on Macs. We can't assume NTFS will be readable, +// so return TRUE if it's unreadable; but if it IS readable, return +// TRUE only if Windows boot files are found. static BOOLEAN HasWindowsBiosBootFiles(REFIT_VOLUME *Volume) { BOOLEAN FilesFound = TRUE; if (Volume->RootDir != NULL) { - FilesFound = (FileExists(Volume->RootDir, L"NTLDR") && // Windows XP boot files - FileExists(Volume->RootDir, L"ntdetect.com") && - FileExists(Volume->RootDir, L"boot.ini")) || - FileExists(Volume->RootDir, L"Windows"); // Windows 7 ID (imperfect; TODO: Improve) + FilesFound = FileExists(Volume->RootDir, L"NTLDR") || // Windows NT/200x/XP boot file + FileExists(Volume->RootDir, L"bootmgr"); // Windows Vista/7/8 boot file } // if return FilesFound; } // static VOID HasWindowsBiosBootFiles() @@ -991,7 +994,7 @@ VOID ScanVolume(REFIT_VOLUME *Volume) return; } else { Volume->IsReadable = TRUE; - if ((Volume->FSType == FS_TYPE_NTFS) && Volume->HasBootCode) + if ((GlobalConfig.LegacyType == LEGACY_TYPE_MAC) && (Volume->FSType == FS_TYPE_NTFS) && Volume->HasBootCode) Volume->HasBootCode = HasWindowsBiosBootFiles(Volume); } // if/else diff --git a/refind/main.c b/refind/main.c index f474a37..7fb2b73 100644 --- a/refind/main.c +++ b/refind/main.c @@ -166,7 +166,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.5.6"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.5.7"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2015 Roderick W. Smith"); @@ -1001,12 +1001,12 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, REFIT_VOLUME *Vo StriCmp(NameClues, L"bootmgr.efi") == 0 || StriCmp(NameClues, L"bootmgfw.efi") == 0 || StriCmp(NameClues, L"bkpbootmgfw.efi") == 0) { - MergeStrings(&OSIconName, L"win", L','); + MergeStrings(&OSIconName, L"win8", L','); Entry->OSType = 'W'; ShortcutLetter = 'W'; Entry->UseGraphicsMode = GlobalConfig.GraphicsFor & GRAPHICS_FOR_WINDOWS; } else if (StriCmp(NameClues, L"xom.efi") == 0) { - MergeStrings(&OSIconName, L"xom,win", L','); + MergeStrings(&OSIconName, L"xom,win,win8", L','); Entry->UseGraphicsMode = TRUE; Entry->OSType = 'X'; ShortcutLetter = 'W';