mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[grub] update embedded GRUB to 2.06
* Also enable NTFS and ext# as GRUB2 compatible file systems.
This commit is contained in:
		
							parent
							
								
									6ed7524c1b
								
							
						
					
					
						commit
						8ceb0045fa
					
				
					 8 changed files with 26 additions and 20 deletions
				
			
		|  | @ -11,7 +11,7 @@ | ||||||
|   <Identity |   <Identity | ||||||
|     Name="19453.net.Rufus" |     Name="19453.net.Rufus" | ||||||
|     Publisher="CN=7AC86D13-3E5A-491A-ADD5-80095C212740" |     Publisher="CN=7AC86D13-3E5A-491A-ADD5-80095C212740" | ||||||
|     Version="3.15.1803.0" /> |     Version="3.15.1804.0" /> | ||||||
| 
 | 
 | ||||||
|   <Properties> |   <Properties> | ||||||
|     <DisplayName>Rufus</DisplayName> |     <DisplayName>Rufus</DisplayName> | ||||||
|  |  | ||||||
										
											Binary file not shown.
										
									
								
							|  | @ -2,4 +2,4 @@ | ||||||
|  * This file contains the version string of the GRUB 2.x binary embedded in Rufus. |  * 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. |  * Should be the same as GRUB's PACKAGE_VERSION in config.h. | ||||||
|  */ |  */ | ||||||
| #define GRUB2_PACKAGE_VERSION "2.04" | #define GRUB2_PACKAGE_VERSION "2.06" | ||||||
|  |  | ||||||
|  | @ -1,17 +1,14 @@ | ||||||
| This directory contains the Grub 2.0 boot records that are used by Rufus | This directory contains the Grub 2.0 boot records that are used by Rufus | ||||||
| 
 | 
 | ||||||
| * boot.img and core.img were created from: | * boot.img and core.img were created from: | ||||||
|     https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz |     https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz | ||||||
|   with the following 3 extra patches applied: |   on a Debian 10.9 x64 system using the commands: | ||||||
|   - 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: |  | ||||||
|     ./autogen.sh |     ./autogen.sh | ||||||
|  |     # --enable-boot-time for Manjaro Linux | ||||||
|     ./configure --disable-nls --enable-boot-time |     ./configure --disable-nls --enable-boot-time | ||||||
|     make -j6 |     make -j4 | ||||||
|     cd grub-core |     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: | * 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 |   /* If DEST_DRIVE is a hard disk, enable the workaround, which is | ||||||
|  |  | ||||||
|  | @ -1698,8 +1698,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys | ||||||
| 					SelectedDrive.PartitionOffset[i] = DriveLayout->PartitionEntry[i].StartingOffset.QuadPart; | 					SelectedDrive.PartitionOffset[i] = DriveLayout->PartitionEntry[i].StartingOffset.QuadPart; | ||||||
| 					SelectedDrive.PartitionSize[i] = DriveLayout->PartitionEntry[i].PartitionLength.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 (%lld bytes)\r\n  Start Sector: %lld, Boot: %s", | ||||||
| 				suprintf("  Type: %s (0x%02x)\r\n  Size: %s (%" PRIi64 " bytes)\r\n  Start Sector: %" PRIi64 ", Boot: %s", |  | ||||||
| 					((part_type == 0x07 || super_floppy_disk) && (FileSystemName[0] != 0)) ? | 					((part_type == 0x07 || super_floppy_disk) && (FileSystemName[0] != 0)) ? | ||||||
| 					FileSystemName : GetMBRPartitionType(part_type), super_floppy_disk ? 0: part_type, | 					FileSystemName : GetMBRPartitionType(part_type), super_floppy_disk ? 0: part_type, | ||||||
| 					SizeToHumanReadable(DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE), | 					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; | 			ClusterSize = 0x200; | ||||||
| 		DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart = | 		DriveLayoutEx.PartitionEntry[pn].StartingOffset.QuadPart = | ||||||
| 			((bytes_per_track + (ClusterSize - 1)) / ClusterSize) * ClusterSize; | 			((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
 | 	// Having the ESP up front may help (and is the Microsoft recommended way) but this
 | ||||||
|  |  | ||||||
|  | @ -961,8 +961,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// Ensure that we have sufficient space for the SBR
 | 	// Ensure that we have sufficient space for the SBR
 | ||||||
| 	max_size = IsChecked(IDC_OLD_BIOS_FIXES) ? | 	max_size = (DWORD)SelectedDrive.PartitionOffset[0]; | ||||||
| 		(DWORD)(SelectedDrive.SectorsPerTrack * SelectedDrive.SectorSize) : 1 * MB; |  | ||||||
| 	if (br_size + size > max_size) { | 	if (br_size + size > max_size) { | ||||||
| 		uprintf("  SBR size is too large - You may need to uncheck 'Add fixes for old BIOSes'."); | 		uprintf("  SBR size is too large - You may need to uncheck 'Add fixes for old BIOSes'."); | ||||||
| 		if (sub_type == BT_MAX) | 		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.
 | 		// 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!
 | 		// But with NTFS, if you don't remount, you don't boot!
 | ||||||
| 		return TRUE; | 		return TRUE; | ||||||
|  | 	case FS_EXT2: | ||||||
|  | 	case FS_EXT3: | ||||||
|  | 	case FS_EXT4: | ||||||
|  | 		return TRUE; | ||||||
| 	default: | 	default: | ||||||
| 		uprintf("Unsupported FS for FS BR processing - aborting\n"); | 		uprintf("Unsupported FS for FS BR processing - aborting\n"); | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
|  | @ -188,13 +188,17 @@ static void SetAllowedFileSystems(void) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		break; | 		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_SYSLINUX_V6: | ||||||
| 	case BT_GRUB4DOS: | 	case BT_GRUB4DOS: | ||||||
| 		allowed_filesystem[FS_NTFS] = TRUE; | 		allowed_filesystem[FS_NTFS] = TRUE; | ||||||
| 		// Fall through
 | 		// Fall through
 | ||||||
| 	case BT_SYSLINUX_V4: | 	case BT_SYSLINUX_V4: | ||||||
| 	case BT_REACTOS: | 	case BT_REACTOS: | ||||||
| 	case BT_GRUB2: |  | ||||||
| 		allowed_filesystem[FS_FAT16] = TRUE; | 		allowed_filesystem[FS_FAT16] = TRUE; | ||||||
| 		allowed_filesystem[FS_FAT32] = TRUE; | 		allowed_filesystem[FS_FAT32] = TRUE; | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 232, 326 | IDD_DIALOG DIALOGEX 12, 12, 232, 326 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_ACCEPTFILES | EXSTYLE WS_EX_ACCEPTFILES | ||||||
| CAPTION "Rufus 3.15.1803" | CAPTION "Rufus 3.15.1804" | ||||||
| FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP |     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP | ||||||
|  | @ -395,8 +395,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 3,15,1803,0 |  FILEVERSION 3,15,1804,0 | ||||||
|  PRODUCTVERSION 3,15,1803,0 |  PRODUCTVERSION 3,15,1804,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -414,13 +414,13 @@ BEGIN | ||||||
|             VALUE "Comments", "https://rufus.ie" |             VALUE "Comments", "https://rufus.ie" | ||||||
|             VALUE "CompanyName", "Akeo Consulting" |             VALUE "CompanyName", "Akeo Consulting" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "3.15.1803" |             VALUE "FileVersion", "3.15.1804" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" |             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" | ||||||
|             VALUE "OriginalFilename", "rufus-3.15.exe" |             VALUE "OriginalFilename", "rufus-3.15.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "3.15.1803" |             VALUE "ProductVersion", "3.15.1804" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue