diff --git a/res/appstore/Package.appxmanifest b/res/appstore/Package.appxmanifest index 7da5e7ed..29a0e7fc 100644 --- a/res/appstore/Package.appxmanifest +++ b/res/appstore/Package.appxmanifest @@ -11,7 +11,7 @@ + Version="3.15.1804.0" /> Rufus diff --git a/res/grub2/core.img b/res/grub2/core.img index f94e0634..9c65bf2e 100644 Binary files a/res/grub2/core.img and b/res/grub2/core.img differ diff --git a/res/grub2/grub2_version.h b/res/grub2/grub2_version.h index d92dc5de..b5cec2c2 100644 --- a/res/grub2/grub2_version.h +++ b/res/grub2/grub2_version.h @@ -2,4 +2,4 @@ * This file contains the version string of the GRUB 2.x binary embedded in Rufus. * Should be the same as GRUB's PACKAGE_VERSION in config.h. */ -#define GRUB2_PACKAGE_VERSION "2.04" +#define GRUB2_PACKAGE_VERSION "2.06" diff --git a/res/grub2/readme.txt b/res/grub2/readme.txt index 6a030701..b1fb11d6 100644 --- a/res/grub2/readme.txt +++ b/res/grub2/readme.txt @@ -1,17 +1,14 @@ This directory contains the Grub 2.0 boot records that are used by Rufus * boot.img and core.img were created from: - https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz - with the following 3 extra patches applied: - - https://lists.gnu.org/archive/html/grub-devel/2020-07/msg00016.html - - https://lists.gnu.org/archive/html/grub-devel/2020-07/msg00017.html - - https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00012.html - on a Debian 10.x x64 system using the commands: + https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz + on a Debian 10.9 x64 system using the commands: ./autogen.sh + # --enable-boot-time for Manjaro Linux ./configure --disable-nls --enable-boot-time - make -j6 + make -j4 cd grub-core - ../grub-mkimage -v -O i386-pc -d. -p\(hd0,msdos1\)/boot/grub biosdisk part_msdos fat ntfs exfat -o core.img + ../grub-mkimage -v -O i386-pc -d. -p\(hd0,msdos1\)/boot/grub biosdisk fat exfat ext2 ntfs ntfscomp part_msdos -o core.img * boot.img has been modified to nop the jump @ 0x66 as per grub2's setup.c comments: /* If DEST_DRIVE is a hard disk, enable the workaround, which is diff --git a/src/drive.c b/src/drive.c index 0dbf12e8..c15eecc4 100644 --- a/src/drive.c +++ b/src/drive.c @@ -1698,8 +1698,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys SelectedDrive.PartitionOffset[i] = DriveLayout->PartitionEntry[i].StartingOffset.QuadPart; SelectedDrive.PartitionSize[i] = DriveLayout->PartitionEntry[i].PartitionLength.QuadPart; } - // NB: MinGW's gcc 4.9.2 broke "%lld" printout on XP so we use the inttypes.h "PRI##" qualifiers - suprintf(" Type: %s (0x%02x)\r\n Size: %s (%" PRIi64 " bytes)\r\n Start Sector: %" PRIi64 ", Boot: %s", + suprintf(" Type: %s (0x%02x)\r\n Size: %s (%lld bytes)\r\n Start Sector: %lld, Boot: %s", ((part_type == 0x07 || super_floppy_disk) && (FileSystemName[0] != 0)) ? FileSystemName : GetMBRPartitionType(part_type), super_floppy_disk ? 0: part_type, SizeToHumanReadable(DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE), @@ -2041,6 +2040,9 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m ClusterSize = 0x200; DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart = ((bytes_per_track + (ClusterSize - 1)) / ClusterSize) * ClusterSize; + // GRUB2 no longer fits in the usual 31½ KB that the above computation provides + // so just unconditionally double that size and get on with it. + DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart *= 2; } // Having the ESP up front may help (and is the Microsoft recommended way) but this diff --git a/src/format.c b/src/format.c index 16d76b44..a0b6ed65 100644 --- a/src/format.c +++ b/src/format.c @@ -961,8 +961,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) } // Ensure that we have sufficient space for the SBR - max_size = IsChecked(IDC_OLD_BIOS_FIXES) ? - (DWORD)(SelectedDrive.SectorsPerTrack * SelectedDrive.SectorSize) : 1 * MB; + max_size = (DWORD)SelectedDrive.PartitionOffset[0]; if (br_size + size > max_size) { uprintf(" SBR size is too large - You may need to uncheck 'Add fixes for old BIOSes'."); if (sub_type == BT_MAX) @@ -1060,6 +1059,10 @@ BOOL WritePBR(HANDLE hLogicalVolume) // and also go through a forced remount, so that shouldn't be an issue. // But with NTFS, if you don't remount, you don't boot! return TRUE; + case FS_EXT2: + case FS_EXT3: + case FS_EXT4: + return TRUE; default: uprintf("Unsupported FS for FS BR processing - aborting\n"); break; diff --git a/src/rufus.c b/src/rufus.c index a46c4a9d..79eb7ed2 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -188,13 +188,17 @@ static void SetAllowedFileSystems(void) } } break; + case BT_GRUB2: + allowed_filesystem[FS_EXT2] = TRUE; + allowed_filesystem[FS_EXT3] = TRUE; + allowed_filesystem[FS_EXT4] = TRUE; + // Fall through case BT_SYSLINUX_V6: case BT_GRUB4DOS: allowed_filesystem[FS_NTFS] = TRUE; // Fall through case BT_SYSLINUX_V4: case BT_REACTOS: - case BT_GRUB2: allowed_filesystem[FS_FAT16] = TRUE; allowed_filesystem[FS_FAT32] = TRUE; break; diff --git a/src/rufus.rc b/src/rufus.rc index 71c7bbea..10196c34 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.15.1803" +CAPTION "Rufus 3.15.1804" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,15,1803,0 - PRODUCTVERSION 3,15,1803,0 + FILEVERSION 3,15,1804,0 + PRODUCTVERSION 3,15,1804,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.15.1803" + VALUE "FileVersion", "3.15.1804" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.15.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.15.1803" + VALUE "ProductVersion", "3.15.1804" END END BLOCK "VarFileInfo"