mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[core] fix reporting of unpartitioned drives
* Also add an extra note to the protective GPT MBR
This commit is contained in:
parent
0679fe11df
commit
e0bc2e5ffd
4 changed files with 31 additions and 22 deletions
|
@ -1,14 +1,15 @@
|
||||||
o Version 3.9 (2020.02.??)
|
o Version 3.9 (2020.02.??)
|
||||||
|
Add exFAT support when creating blank UEFI:NTFS drives [EXPERIMENTAL]
|
||||||
Fix ext2/ext3 corruption for partitions larger than 4 GB
|
Fix ext2/ext3 corruption for partitions larger than 4 GB
|
||||||
Improve ex2/ext3 formatting speed
|
Fix early boot files not being usable on compressed NTFS partitions
|
||||||
Add exFAT support for bare UEFI:NTFS partitions [EXPERIMENTAL]
|
|
||||||
Keep early boot files uncompressed on compressed NTFS partitions
|
|
||||||
Improve reporting of GPT partition types
|
|
||||||
Improve reporting of Windows version
|
|
||||||
Improve error reporting on Syslinux/GRUB download issues
|
|
||||||
Report the usage of UDF symbolic links
|
|
||||||
Fix writing of compressed streams that don't end on sector boundary
|
Fix writing of compressed streams that don't end on sector boundary
|
||||||
Fix percent not being displayed on slow format
|
Fix percent not being displayed on slow format
|
||||||
|
Improve file preallocation and speed up ISO extraction (courtesy of Mattiwatti)
|
||||||
|
Improve ex2/ext3 formatting speed
|
||||||
|
Improve protective MBR message for GPT partitioned drives
|
||||||
|
Improve reporting on Syslinux/GRUB download errors
|
||||||
|
Improve reporting of partition types and of Windows' version
|
||||||
|
Report the usage of UDF symbolic links
|
||||||
Update embedded Syslinux to 6.04-pre1
|
Update embedded Syslinux to 6.04-pre1
|
||||||
|
|
||||||
o Version 3.8 (2019.09.16) [BUGFIX RELEASE]
|
o Version 3.8 (2019.09.16) [BUGFIX RELEASE]
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
\07
|
\07 \70 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» \07
|
||||||
\70 ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ \07
|
|
||||||
\70 º º \07
|
\70 º º \07
|
||||||
\70 º \74ERROR: BIOS/LEGACY BOOT OF UEFI-ONLY MEDIA\70 º \07
|
\70 º \74ERROR: BIOS/LEGACY BOOT OF UEFI-ONLY MEDIA\70 º \07
|
||||||
\70 º º \07
|
\70 º º \07
|
||||||
\70 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ \07
|
\70 ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ \07
|
||||||
|
|
||||||
|
|
||||||
This drive was created by Rufus [\09https://rufus.ie\07].
|
This drive was created by Rufus [\09https://rufus.ie\07].
|
||||||
|
|
||||||
It can boot in \04UEFI mode only\07 but you are trying to
|
It can boot in \04UEFI mode only\07 but you are trying to
|
||||||
|
@ -19,3 +17,6 @@
|
||||||
* \09Target system\07 -> \09BIOS (...)\07
|
* \09Target system\07 -> \09BIOS (...)\07
|
||||||
o \02OR\07 Erase the whole drive in Rufus by selecting:
|
o \02OR\07 Erase the whole drive in Rufus by selecting:
|
||||||
* \09Boot Type\07 -> \09Non bootable\07
|
* \09Boot Type\07 -> \09Non bootable\07
|
||||||
|
|
||||||
|
Note: You may also see this message if you installed a new
|
||||||
|
OS and your computer is unable to boot that OS in UEFI mode.
|
21
src/drive.c
21
src/drive.c
|
@ -1183,7 +1183,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
switch (DriveLayout->PartitionStyle) {
|
switch (DriveLayout->PartitionStyle) {
|
||||||
case PARTITION_STYLE_MBR:
|
case PARTITION_STYLE_MBR:
|
||||||
SelectedDrive.PartitionStyle = PARTITION_STYLE_MBR;
|
SelectedDrive.PartitionStyle = PARTITION_STYLE_MBR;
|
||||||
for (i=0; i<DriveLayout->PartitionCount; i++) {
|
for (i = 0; i < DriveLayout->PartitionCount; i++) {
|
||||||
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
|
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
|
||||||
SelectedDrive.nPartitions++;
|
SelectedDrive.nPartitions++;
|
||||||
}
|
}
|
||||||
|
@ -1191,7 +1191,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
// Detect drives that are using the whole disk as a single partition
|
// Detect drives that are using the whole disk as a single partition
|
||||||
if ((DriveLayout->PartitionEntry[0].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) &&
|
if ((DriveLayout->PartitionEntry[0].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) &&
|
||||||
(DriveLayout->PartitionEntry[0].StartingOffset.QuadPart == 0LL)) {
|
(DriveLayout->PartitionEntry[0].StartingOffset.QuadPart == 0LL)) {
|
||||||
suprintf("Partition type: SFD (%s) or Unpartitioned", sfd_name);
|
suprintf("Partition type: SFD (%s) or unpartitioned", sfd_name);
|
||||||
super_floppy_disk = TRUE;
|
super_floppy_disk = TRUE;
|
||||||
} else {
|
} else {
|
||||||
suprintf("Partition type: MBR, NB Partitions: %d", SelectedDrive.nPartitions);
|
suprintf("Partition type: MBR, NB Partitions: %d", SelectedDrive.nPartitions);
|
||||||
|
@ -1199,10 +1199,16 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
suprintf("Disk ID: 0x%08X %s", DriveLayout->Mbr.Signature, SelectedDrive.has_mbr_uefi_marker?"(UEFI target)":"");
|
suprintf("Disk ID: 0x%08X %s", DriveLayout->Mbr.Signature, SelectedDrive.has_mbr_uefi_marker?"(UEFI target)":"");
|
||||||
AnalyzeMBR(hPhysical, "Drive", bSilent);
|
AnalyzeMBR(hPhysical, "Drive", bSilent);
|
||||||
}
|
}
|
||||||
for (i=0; i<DriveLayout->PartitionCount; i++) {
|
for (i = 0; i < DriveLayout->PartitionCount; i++) {
|
||||||
isUefiNtfs = FALSE;
|
isUefiNtfs = FALSE;
|
||||||
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
|
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
|
||||||
part_type = DriveLayout->PartitionEntry[i].Mbr.PartitionType;
|
part_type = DriveLayout->PartitionEntry[i].Mbr.PartitionType;
|
||||||
|
// Microsoft will have to explain why they completely ignore the actual MBR partition
|
||||||
|
// type for zeroed drive (which *IS* 0x00) and fill in Small FAT16 instead (0x04).
|
||||||
|
// This means that if we detect a Small FAT16 "partition", that "starts" at offset 0
|
||||||
|
// and that is larger than 16 MB, our drive is actually unpartitioned.
|
||||||
|
if (part_type == 0x04 && super_floppy_disk && SelectedDrive.DiskSize > 16 * MB)
|
||||||
|
break;
|
||||||
if (part_type == 0xef) {
|
if (part_type == 0xef) {
|
||||||
// Check the FAT label to see if we're dealing with an UEFI_NTFS partition
|
// Check the FAT label to see if we're dealing with an UEFI_NTFS partition
|
||||||
buf = calloc(SelectedDrive.SectorSize, 1);
|
buf = calloc(SelectedDrive.SectorSize, 1);
|
||||||
|
@ -1214,8 +1220,8 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
suprintf("Partition %d%s:", i+(super_floppy_disk?0:1), isUefiNtfs?" (UEFI:NTFS)":"");
|
suprintf("Partition %d%s:", i + (super_floppy_disk ? 0 : 1), isUefiNtfs ? " (UEFI:NTFS)" : "");
|
||||||
for (j=0; j<ARRAYSIZE(mbr_mountable); j++) {
|
for (j = 0; j < ARRAYSIZE(mbr_mountable); j++) {
|
||||||
if (part_type == mbr_mountable[j]) {
|
if (part_type == mbr_mountable[j]) {
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -1227,7 +1233,8 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
}
|
}
|
||||||
// NB: MinGW's gcc 4.9.2 broke "%lld" printout on XP so we use the inttypes.h "PRI##" qualifiers
|
// 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 (%" PRIi64 " bytes)\r\n Start Sector: %" PRIi64 ", Boot: %s",
|
||||||
((part_type==0x07||super_floppy_disk)&&(FileSystemName[0]!=0))?FileSystemName:GetMBRPartitionType(part_type), super_floppy_disk?0:part_type,
|
((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),
|
SizeToHumanReadable(DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE),
|
||||||
DriveLayout->PartitionEntry[i].PartitionLength.QuadPart,
|
DriveLayout->PartitionEntry[i].PartitionLength.QuadPart,
|
||||||
DriveLayout->PartitionEntry[i].StartingOffset.QuadPart / SelectedDrive.SectorSize,
|
DriveLayout->PartitionEntry[i].StartingOffset.QuadPart / SelectedDrive.SectorSize,
|
||||||
|
@ -1249,7 +1256,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
||||||
suprintf("Disk GUID: %s", GuidToString(&DriveLayout->Gpt.DiskId));
|
suprintf("Disk GUID: %s", GuidToString(&DriveLayout->Gpt.DiskId));
|
||||||
suprintf("Max parts: %d, Start Offset: %" PRIi64 ", Usable = %" PRIi64 " bytes",
|
suprintf("Max parts: %d, Start Offset: %" PRIi64 ", Usable = %" PRIi64 " bytes",
|
||||||
DriveLayout->Gpt.MaxPartitionCount, DriveLayout->Gpt.StartingUsableOffset.QuadPart, DriveLayout->Gpt.UsableLength.QuadPart);
|
DriveLayout->Gpt.MaxPartitionCount, DriveLayout->Gpt.StartingUsableOffset.QuadPart, DriveLayout->Gpt.UsableLength.QuadPart);
|
||||||
for (i=0; i<DriveLayout->PartitionCount; i++) {
|
for (i = 0; i < DriveLayout->PartitionCount; i++) {
|
||||||
if (i < MAX_PARTITIONS) {
|
if (i < MAX_PARTITIONS) {
|
||||||
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;
|
||||||
|
|
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.9.1621"
|
CAPTION "Rufus 3.9.1622"
|
||||||
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,9,1621,0
|
FILEVERSION 3,9,1622,0
|
||||||
PRODUCTVERSION 3,9,1621,0
|
PRODUCTVERSION 3,9,1622,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.9.1621"
|
VALUE "FileVersion", "3.9.1622"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2020 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.9.exe"
|
VALUE "OriginalFilename", "rufus-3.9.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.9.1621"
|
VALUE "ProductVersion", "3.9.1622"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue