1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[core] add KolibriOS support

* Closes #331
This commit is contained in:
Pete Batard 2014-05-15 21:17:12 +01:00
parent ffc9a4e80a
commit b6bc17b7f4
15 changed files with 204 additions and 23 deletions

View file

@ -77,9 +77,10 @@ o Version 1.0.1 (2013.10.28)
o Version 1.0.0 (2013.10.20)
- Initial version
[TODO] (NOTE: THIS PART IS ONLY FOR THE RUFUS DEVELOPER, NOT TRANSLATORS)
[TODO] (NOTE: THIS PART IS ONLY INTENDED FOR THE RUFUS DEVELOPER, NOT THE TRANSLATORS)
- MSG_165 should be altered to say image
- NEW message for wrong MSG_044 in _StrError()
- NEW message for Alt-I toggle
- NEW message for Alt-U toggle
- NEW message for ERROR_NOT_READY
- NEW message for ERROR_NOT_READY
- NEW message for "This ISO is not compatible with the selected filesystem" (rufus.c ~1407)

View file

@ -514,7 +514,8 @@ const struct {int (*fn)(FILE *fp); char* str;} known_mbr[] = {
{ is_win7_mbr, "Windows 7" },
{ is_rufus_mbr, "Rufus" },
{ is_syslinux_mbr, "Syslinux" },
{ is_reactos_mbr, "Reactos" },
{ is_reactos_mbr, "ReactOS" },
{ is_kolibri_mbr, "KolibriOS" },
{ is_zero_mbr, "Zeroed" },
};
@ -551,6 +552,7 @@ const struct {int (*fn)(FILE *fp); char* str;} known_pbr[] = {
{ entire_fat_32_nt_br_matches, "FAT32 NT" },
{ entire_fat_32_fd_br_matches, "FAT32 FreeDOS" },
{ entire_fat_32_ros_br_matches, "FAT32 ReactOS" },
{ entire_fat_32_kos_br_matches, "FAT32 KolibriOS" },
};
BOOL AnalyzePBR(HANDLE hLogicalVolume)

View file

@ -907,6 +907,9 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive)
if (bt == BT_UEFI) {
uprintf(using_msg, "zeroed");
r = write_zero_mbr(&fake_fd); // Force UEFI boot only by zeroing the MBR
} else if ( (dt == DT_ISO) && (iso_report.has_kolibrios) && (fs == FS_FAT32)) {
uprintf(using_msg, "KolibriOS");
r = write_kolibri_mbr(&fake_fd);
} else if ( (dt == DT_SYSLINUX_V4) || (dt == DT_SYSLINUX_V5) || ((dt == DT_ISO) && ((fs == FS_FAT16) || (fs == FS_FAT32))) ) {
uprintf(using_msg, "Syslinux");
r = write_syslinux_mbr(&fake_fd);
@ -939,7 +942,8 @@ static __inline const char* dt_to_name(int dt) {
switch (dt) {
case DT_FREEDOS: return "FreeDOS";
case DT_REACTOS: return "ReactOS";
default: return "Standard";
default:
return ((dt==DT_ISO)&&(iso_report.has_kolibrios))?"KolibriOS":"Standard";
}
}
static BOOL WritePBR(HANDLE hLogicalVolume)
@ -964,6 +968,8 @@ static BOOL WritePBR(HANDLE hLogicalVolume)
if (!write_fat_16_fd_br(&fake_fd, 0)) break;
} else if (dt == DT_REACTOS) {
if (!write_fat_16_ros_br(&fake_fd, 0)) break;
} else if ((dt == DT_ISO) && (iso_report.has_kolibrios)) {
uprintf("FAT16 is not supported for KolibriOS\n"); break;
} else {
if (!write_fat_16_br(&fake_fd, 0)) break;
}
@ -984,6 +990,8 @@ static BOOL WritePBR(HANDLE hLogicalVolume)
if (!write_fat_32_fd_br(&fake_fd, 0)) break;
} else if (dt == DT_REACTOS) {
if (!write_fat_32_ros_br(&fake_fd, 0)) break;
} else if ((dt == DT_ISO) && (iso_report.has_kolibrios)) {
if (!write_fat_32_kos_br(&fake_fd, 0)) break;
} else {
if (!write_fat_32_br(&fake_fd, 0)) break;
}
@ -1218,6 +1226,7 @@ DWORD WINAPI FormatThread(void* param)
char logfile[MAX_PATH], *userdir;
char wim_image[] = "?:\\sources\\install.wim";
char efi_dst[] = "?:\\efi\\boot\\bootx64.efi";
char kolibri_dst[] = "?:\\MTLD_F32";
PF_TYPE_DECL(WINAPI, LANGID, GetThreadUILanguage, (void));
PF_TYPE_DECL(WINAPI, LANGID, SetThreadUILanguage, (LANGID));
@ -1494,7 +1503,7 @@ DWORD WINAPI FormatThread(void* param)
goto out;
}
} else if ((((dt == DT_WINME) || (dt == DT_FREEDOS) || (dt == DT_REACTOS)) &&
(!use_large_fat32)) || ((dt == DT_ISO) && (fs == FS_NTFS))) {
(!use_large_fat32)) || ((dt == DT_ISO) && ((fs == FS_NTFS)||(iso_report.has_kolibrios)))) {
// We still have a lock, which we need to modify the volume boot record
// => no need to reacquire the lock...
hLogicalVolume = GetLogicalHandle(DriveIndex, TRUE, FALSE);
@ -1550,6 +1559,14 @@ DWORD WINAPI FormatThread(void* param)
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_CANNOT_COPY;
goto out;
}
if (iso_report.has_kolibrios) {
kolibri_dst[0] = drive_name[0];
uprintf("Installing: %s (KolibriOS loader)\n", kolibri_dst);
if (ExtractISOFile(iso_path, "HD_Load/USB_Boot/MTLD_F32", kolibri_dst,
FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM) == 0) {
uprintf("Warning: loader installation failed - KolibriOS will not boot!\n");
}
}
if ((bt == BT_UEFI) && (!iso_report.has_efi) && (iso_report.has_win7_efi)) {
PrintStatus(0, TRUE, MSG_232);
wim_image[0] = drive_name[0];

View file

@ -67,6 +67,7 @@ static const char* isolinux_bin = &dot_isolinux_bin[2];
static const char* pe_dirname[] = { "/i386", "/minint" };
static const char* pe_file[] = { "ntdetect.com", "setupldr.bin", "txtsetup.sif" };
static const char* reactos_name = "setupldr.sys"; // TODO: freeldr.sys doesn't seem to work
static const char* kolibri_name = "kolibri.img";
static const char* autorun_name = "autorun.inf";
static const char* stupid_antivirus = " NOTE: This is usually caused by a poorly designed security solution. "
"See http://rufus.akeo.ie/compatibility.\r\n This file will be skipped for now, but you should really "
@ -137,7 +138,7 @@ static BOOL check_iso_props(const char* psz_dirname, BOOL* is_syslinux_cfg, BOOL
}
if (scan_only) {
// Check for a "bootmgr(.efi)" file in root (psz_path = "")
// Check for various files in root (psz_dirname = "")
if (*psz_dirname == 0) {
if (safe_strnicmp(psz_basename, bootmgr_efi_name, safe_strlen(bootmgr_efi_name)-5) == 0) {
iso_report.has_bootmgr = TRUE;
@ -145,6 +146,9 @@ static BOOL check_iso_props(const char* psz_dirname, BOOL* is_syslinux_cfg, BOOL
if (safe_stricmp(psz_basename, bootmgr_efi_name) == 0) {
iso_report.has_win7_efi = TRUE;
}
if (safe_stricmp(psz_basename, kolibri_name) == 0) {
iso_report.has_kolibrios = TRUE;
}
}
// Check for ReactOS' setupldr.sys anywhere
@ -591,7 +595,7 @@ out:
uprintf("Will use %s for Syslinux\n", iso_report.cfg_path);
// Extract all of the isolinux.bin files we found to identify their versions
for (i=0; i<isolinux_path.Index; i++) {
size = (size_t)ExtractISOFile(src_iso, isolinux_path.String[i], dot_isolinux_bin);
size = (size_t)ExtractISOFile(src_iso, isolinux_path.String[i], dot_isolinux_bin, FILE_ATTRIBUTE_NORMAL);
if (size == 0) {
uprintf("Could not access %s\n", isolinux_path.String[i]);
} else {
@ -646,7 +650,7 @@ out:
// whether we should use 0x80 or 0x81 as the disk ID in the MBR
safe_sprintf(path, sizeof(path), "/%s/txtsetup.sif",
basedir[((iso_report.winpe&WINPE_I386) == WINPE_I386)?0:1]);
ExtractISOFile(src_iso, path, tmp_sif);
ExtractISOFile(src_iso, path, tmp_sif, FILE_ATTRIBUTE_NORMAL);
tmp = get_token_data_file("OsLoadOptions", tmp_sif);
if (tmp != NULL) {
for (i=0; i<strlen(tmp); i++)
@ -692,7 +696,7 @@ out:
return (r == 0);
}
int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file)
int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file, DWORD attributes)
{
size_t i;
ssize_t read_size;
@ -708,7 +712,7 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f
HANDLE file_handle = INVALID_HANDLE_VALUE;
file_handle = CreateFileU(dest_file, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, attributes, NULL);
if (file_handle == INVALID_HANDLE_VALUE) {
uprintf(" Unable to create file %s: %s\n", dest_file, WindowsErrorString());
goto out;

View file

@ -29,6 +29,7 @@
<ClInclude Include="..\inc\br_fat16_0x3e.h" />
<ClInclude Include="..\inc\br_fat32fd_0x3f0.h" />
<ClInclude Include="..\inc\br_fat32fd_0x52.h" />
<ClInclude Include="..\inc\br_fat32kos_0x52.h" />
<ClInclude Include="..\inc\br_fat32nt_0x1800.h" />
<ClInclude Include="..\inc\br_fat32nt_0x3f0.h" />
<ClInclude Include="..\inc\br_fat32nt_0x52.h" />
@ -49,6 +50,7 @@
<ClInclude Include="..\inc\mbr_95b.h" />
<ClInclude Include="..\inc\mbr_dos.h" />
<ClInclude Include="..\inc\mbr_dos_f2.h" />
<ClInclude Include="..\inc\mbr_kolibri.h" />
<ClInclude Include="..\inc\mbr_reactos.h" />
<ClInclude Include="..\inc\mbr_rufus.h" />
<ClInclude Include="..\inc\mbr_syslinux.h" />

View file

@ -125,6 +125,12 @@
<ClInclude Include="..\inc\mbr_rufus.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\inc\br_fat32kos_0x52.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\inc\mbr_kolibri.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\br.c">

View file

@ -120,6 +120,16 @@ int is_reactos_mbr(FILE *fp)
contains_data(fp, 0x1FE, aucRef, sizeof(aucRef));
} /* is_reactos_mbr */
int is_kolibri_mbr(FILE *fp)
{
#include "mbr_kolibri.h"
unsigned char aucRef[] = {0x55, 0xAA};
return
contains_data(fp, 0x0, mbr_kolibri_0x0, sizeof(mbr_kolibri_0x0)) &&
contains_data(fp, 0x1FE, aucRef, sizeof(aucRef));
} /* is_kolibri_mbr */
int is_syslinux_mbr(FILE *fp)
{
#include "mbr_syslinux.h"
@ -210,6 +220,16 @@ int write_reactos_mbr(FILE *fp)
write_data(fp, 0x1FE, aucRef, sizeof(aucRef));
} /* write_reactos_mbr */
int write_kolibri_mbr(FILE *fp)
{
#include "mbr_kolibri.h"
unsigned char aucRef[] = {0x55, 0xAA};
return
write_data(fp, 0x0, mbr_kolibri_0x0, sizeof(mbr_kolibri_0x0)) &&
write_data(fp, 0x1FE, aucRef, sizeof(aucRef));
} /* write_kolibri_mbr */
int write_syslinux_mbr(FILE *fp)
{
#include "mbr_syslinux.h"

View file

@ -220,3 +220,30 @@ int write_fat_32_ros_br(FILE *fp, int bKeepLabel)
write_data(fp, 0x1c00, br_fat32ros_0x1c00, sizeof(br_fat32ros_0x1c00))
);
} /* write_fat_32_ros_br */
int entire_fat_32_kos_br_matches(FILE *fp)
{
#include "br_fat32_0x0.h"
#include "br_fat32kos_0x52.h"
return
( contains_data(fp, 0x0, br_fat32_0x0, sizeof(br_fat32_0x0)) &&
contains_data(fp, 0x52, br_fat32kos_0x52, sizeof(br_fat32kos_0x52)) );
} /* entire_fat_32_kos_br_matches */
int write_fat_32_kos_br(FILE *fp, int bKeepLabel)
{
#include "label_11_char.h"
#include "br_fat32_0x0.h"
#include "br_fat32kos_0x52.h"
if(bKeepLabel)
return
( write_data(fp, 0x0, br_fat32_0x0, sizeof(br_fat32_0x0)) &&
write_data(fp, 0x52, br_fat32kos_0x52, sizeof(br_fat32kos_0x52)) );
else
return
( write_data(fp, 0x0, br_fat32_0x0, sizeof(br_fat32_0x0)) &&
write_data(fp, 0x47, label_11_char, sizeof(label_11_char)) &&
write_data(fp, 0x52, br_fat32kos_0x52, sizeof(br_fat32kos_0x52)) );
} /* write_fat_32_kos_br */

View file

@ -44,6 +44,10 @@ int is_rufus_mbr(FILE *fp);
FALSE.The file position will change when this function is called! */
int is_reactos_mbr(FILE *fp);
/* returns TRUE if the file has a KolibriOS master boot record, otherwise
FALSE.The file position will change when this function is called! */
int is_kolibri_mbr(FILE *fp);
/* returns TRUE if the file has a syslinux master boot record, otherwise
FALSE.The file position will change when this function is called! */
int is_syslinux_mbr(FILE *fp);
@ -80,6 +84,10 @@ int write_rufus_mbr(FILE *fp);
FALSE */
int write_reactos_mbr(FILE *fp);
/* Writes a KolibriOS master boot record to a file, returns TRUE on success, otherwise
FALSE */
int write_kolibri_mbr(FILE *fp);
/* Writes a syslinux master boot record to a file, returns TRUE on success, otherwise
FALSE */
int write_syslinux_mbr(FILE *fp);

View file

@ -0,0 +1,38 @@
unsigned char br_fat32kos_0x52[] = {
0x46, 0x41, 0x54, 0x33, 0x32, 0x20, 0x20, 0x20, 0x80, 0x3C, 0x80, 0x75,
0x09, 0x66, 0x8B, 0x44, 0x08, 0x2E, 0x66, 0xA3, 0x1C, 0x7C, 0x66, 0x31,
0xC0, 0x8E, 0xD8, 0x8E, 0xD0, 0xBC, 0x00, 0x7C, 0x89, 0xE5, 0x88, 0x16,
0x08, 0x7A, 0xFC, 0xFB, 0x68, 0x00, 0x08, 0x07, 0x66, 0x0F, 0xB7, 0x5E,
0x0E, 0x66, 0x89, 0x1E, 0x00, 0x7A, 0x8A, 0x46, 0x10, 0x66, 0xF7, 0x66,
0x24, 0x66, 0x01, 0xD8, 0x66, 0x0F, 0xB6, 0x5E, 0x0D, 0x01, 0xDB, 0x66,
0x29, 0xD8, 0x66, 0xA3, 0x04, 0x7A, 0x66, 0x8B, 0x46, 0x2C, 0x66, 0x25,
0xFF, 0xFF, 0xFF, 0x0F, 0x31, 0xDB, 0x89, 0xDF, 0x66, 0x50, 0xE8, 0x62,
0x00, 0x0F, 0xB6, 0x4E, 0x0D, 0xC1, 0xE1, 0x04, 0x26, 0x80, 0x3D, 0x00,
0x74, 0x4D, 0x51, 0x57, 0xB9, 0x0B, 0x00, 0xBE, 0xCB, 0x7D, 0xF3, 0xA6,
0x5F, 0x59, 0x74, 0x0E, 0x83, 0xC7, 0x20, 0xE2, 0xE7, 0x66, 0x58, 0xE8,
0x8D, 0x00, 0x73, 0x33, 0x72, 0xCE, 0x66, 0x58, 0x26, 0x8B, 0x45, 0x14,
0x25, 0xFF, 0x0F, 0x66, 0xC1, 0xE0, 0x10, 0x26, 0x8B, 0x45, 0x1A, 0x31,
0xDB, 0x66, 0x50, 0xE8, 0x21, 0x00, 0x8C, 0xC0, 0x0F, 0xB6, 0x4E, 0x0D,
0xC1, 0xE1, 0x05, 0x01, 0xC8, 0x8E, 0xC0, 0x66, 0x58, 0xE8, 0x5F, 0x00,
0x72, 0xE5, 0xEA, 0x00, 0x80, 0x00, 0x00, 0xBE, 0xBA, 0x7D, 0xE8, 0x98,
0x00, 0xEB, 0xFE, 0x66, 0x0F, 0xB6, 0x4E, 0x0D, 0x66, 0xF7, 0xE1, 0x66,
0x03, 0x06, 0x04, 0x7A, 0x66, 0x03, 0x46, 0x1C, 0x06, 0x66, 0x60, 0x6A,
0x00, 0x6A, 0x00, 0x66, 0x50, 0x06, 0x53, 0x83, 0xE9, 0x7F, 0x19, 0xC0,
0x21, 0xC8, 0x83, 0xC0, 0x7F, 0x50, 0xC1, 0xE0, 0x05, 0x8C, 0xC1, 0x01,
0xC1, 0x8E, 0xC1, 0x6A, 0x10, 0xB8, 0x00, 0x42, 0x8A, 0x16, 0x08, 0x7A,
0x89, 0xE6, 0xCD, 0x13, 0xBE, 0xD9, 0x7D, 0x72, 0xB9, 0x61, 0x66, 0x61,
0x66, 0x83, 0xC0, 0x7F, 0x83, 0xE9, 0x7F, 0x77, 0xC4, 0x07, 0xC3, 0x06,
0x1E, 0x07, 0xBB, 0x00, 0x7E, 0x66, 0x50, 0x66, 0xC1, 0xE8, 0x07, 0x66,
0x3B, 0x06, 0xF9, 0x7D, 0x74, 0x0F, 0x66, 0xA3, 0xF9, 0x7D, 0x66, 0x03,
0x06, 0x00, 0x7A, 0xB9, 0x01, 0x00, 0xE8, 0x9B, 0xFF, 0x66, 0x58, 0x66,
0x83, 0xE0, 0x7F, 0x67, 0x66, 0x8B, 0x04, 0x85, 0x00, 0x7E, 0x00, 0x00,
0x66, 0x25, 0xFF, 0xFF, 0xFF, 0x0F, 0x66, 0x3D, 0xF7, 0xFF, 0xFF, 0x0F,
0xBE, 0xEB, 0x7D, 0x0F, 0x84, 0x67, 0xFF, 0x07, 0xC3, 0xAC, 0x84, 0xC0,
0x74, 0x09, 0xB4, 0x0E, 0xBB, 0x07, 0x00, 0xCD, 0x10, 0xEB, 0xF2, 0xC3,
0x43, 0x61, 0x6E, 0x6E, 0x6F, 0x74, 0x20, 0x66, 0x69, 0x6E, 0x64, 0x20,
0x66, 0x69, 0x6C, 0x65, 0x20, 0x4D, 0x54, 0x4C, 0x44, 0x5F, 0x46, 0x33,
0x32, 0x20, 0x20, 0x20, 0x0D, 0x0A, 0x00, 0x44, 0x69, 0x73, 0x6B, 0x20,
0x72, 0x65, 0x61, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6F, 0x72, 0x0D, 0x0A,
0x00, 0x42, 0x61, 0x64, 0x20, 0x63, 0x6C, 0x75, 0x73, 0x74, 0x65, 0x72,
0x0D, 0x0A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x55, 0xAA
};

View file

@ -47,4 +47,13 @@ int entire_fat_32_ros_br_matches(FILE *fp);
FALSE */
int write_fat_32_ros_br(FILE *fp, int bKeepLabel);
/* returns TRUE if the file has an exact match of the FAT32 boot record this
program would create for KolibriOS, otherwise FALSE.
The file position will change when this function is called! */
int entire_fat_32_kos_br_matches(FILE *fp);
/* Writes a FAT32 KolibriOS boot record to a file, returns TRUE on success, otherwise
FALSE */
int write_fat_32_kos_br(FILE *fp, int bKeepLabel);
#endif

View file

@ -0,0 +1,40 @@
/* First 440 bytes of MBR from KolibriOS */
unsigned char mbr_kolibri_0x0[] = {
0x33, 0xC0, 0x8E, 0xD0, 0xBC, 0x00, 0x7C, 0xFB, 0x50, 0x07, 0x50, 0x1F,
0xFC, 0xBE, 0x1B, 0x7C, 0xBF, 0x1B, 0x06, 0x50, 0x57, 0xB9, 0xE5, 0x01,
0xF3, 0xA4, 0xCB, 0xBD, 0xBE, 0x07, 0xB1, 0x04, 0x38, 0x6E, 0x00, 0x7C,
0x09, 0x75, 0x13, 0x83, 0xC5, 0x10, 0xE2, 0xF4, 0xCD, 0x18, 0x8B, 0xF5,
0x83, 0xC6, 0x10, 0x49, 0x74, 0x19, 0x38, 0x2C, 0x74, 0xF6, 0xA0, 0xB5,
0x07, 0xB4, 0x07, 0x8B, 0xF0, 0xAC, 0x3C, 0x00, 0x74, 0xFC, 0xBB, 0x07,
0x00, 0xB4, 0x0E, 0xCD, 0x10, 0xEB, 0xF2, 0x88, 0x4E, 0x10, 0xE8, 0x46,
0x00, 0x73, 0x2A, 0xFE, 0x46, 0x10, 0x80, 0x7E, 0x04, 0x0B, 0x74, 0x0B,
0x80, 0x7E, 0x04, 0x0C, 0x74, 0x05, 0xA0, 0xB6, 0x07, 0x75, 0xD2, 0x80,
0x46, 0x02, 0x06, 0x83, 0x46, 0x08, 0x06, 0x83, 0x56, 0x0A, 0x00, 0xE8,
0x21, 0x00, 0x73, 0x05, 0xA0, 0xB6, 0x07, 0xEB, 0xBC, 0x81, 0x3E, 0xFE,
0x7D, 0x55, 0xAA, 0x74, 0x0B, 0x80, 0x7E, 0x10, 0x00, 0x74, 0xC8, 0xA0,
0xB7, 0x07, 0xEB, 0xA9, 0x8B, 0xFC, 0x1E, 0x57, 0x8B, 0xF5, 0xCB, 0xBF,
0x05, 0x00, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x60, 0xBB, 0xAA, 0x55, 0xB4, 0x41, 0xCD,
0x13, 0x72, 0x36, 0x81, 0xFB, 0x55, 0xAA, 0x75, 0x30, 0xF6, 0xC1, 0x01,
0x74, 0x2B, 0x61, 0x60, 0x6A, 0x00, 0x6A, 0x00, 0xFF, 0x76, 0x0A, 0xFF,
0x76, 0x08, 0x6A, 0x00, 0x68, 0x00, 0x7C, 0x6A, 0x01, 0x6A, 0x10, 0xB4,
0x42, 0x8B, 0xF4, 0xCD, 0x13, 0x61, 0x61, 0x73, 0x0E, 0x4F, 0x74, 0x0B,
0x32, 0xE4, 0x52, 0xCD, 0x13, 0x5A, 0x90, 0xEB, 0xD6, 0x61, 0xF9, 0xC3,
0x49, 0x6E, 0x76, 0x61, 0x6C, 0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74,
0x69, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x00,
0x45, 0x72, 0x72, 0x6F, 0x72, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x69, 0x6E,
0x67, 0x20, 0x6F, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6E, 0x67, 0x20,
0x73, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x00, 0x4D, 0x69, 0x73, 0x73, 0x69,
0x6E, 0x67, 0x20, 0x6F, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6E, 0x67,
0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x44, 0x63
};

View file

@ -450,10 +450,10 @@ static void SetFSFromISO(void)
}
// Syslinux and EFI have precedence over bootmgr (unless the user selected BIOS as target type)
if ((HAS_SYSLINUX(iso_report)) || (IS_REACTOS(iso_report)) || ( (IS_EFI(iso_report)) && (bt == BT_UEFI))) {
if ((HAS_SYSLINUX(iso_report)) || (IS_REACTOS(iso_report)) || (iso_report.has_kolibrios) || ( (IS_EFI(iso_report)) && (bt == BT_UEFI))) {
if (fs_mask & (1<<FS_FAT32)) {
selected_fs = FS_FAT32;
} else if (fs_mask & (1<<FS_FAT16)) {
} else if ((fs_mask & (1<<FS_FAT16)) && (!iso_report.has_kolibrios)) {
selected_fs = FS_FAT16;
}
} else if ((iso_report.has_bootmgr) || (IS_WINPE(iso_report.winpe))) {
@ -1221,10 +1221,11 @@ DWORD WINAPI ISOScanThread(LPVOID param)
if (HAS_SYSLINUX(iso_report)) {
safe_sprintf(isolinux_str, sizeof(isolinux_str), "Yes (%s)", iso_report.sl_version_str);
}
// TODO: This should become a DisplayISOProps() call or something
uprintf("ISO label: '%s'\r\n Size: %lld bytes\r\n Has a >64 chars filename: %s\r\n Has Symlinks: %s\r\n Has a >4GB file: %s\r\n"
" Uses ReactOS: %s\r\n Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s\r\n",
" Uses ReactOS: %s\r\n Uses KolibriOS: %s\r\n Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s\r\n",
iso_report.label, iso_report.projected_size, iso_report.has_long_filename?"Yes":"No", iso_report.has_symlinks?"Yes":"No",
iso_report.has_4GB_file?"Yes":"No", IS_REACTOS(iso_report)?"Yes":"No", (iso_report.has_efi || iso_report.has_win7_efi)?"Yes":"No",
iso_report.has_4GB_file?"Yes":"No", IS_REACTOS(iso_report)?"Yes":"No", iso_report.has_kolibrios?"Yes":"No", (iso_report.has_efi || iso_report.has_win7_efi)?"Yes":"No",
(iso_report.has_win7_efi && (!iso_report.has_efi))?" (win7_x64)":"", iso_report.has_bootmgr?"Yes":"No",
IS_WINPE(iso_report.winpe)?"Yes":"No", (iso_report.uses_minint)?" (with /minint)":"", isolinux_str);
if (HAS_SYSLINUX(iso_report) && (SL_MAJOR(iso_report.sl_version) < 5)) {
@ -1234,7 +1235,7 @@ DWORD WINAPI ISOScanThread(LPVOID param)
}
}
if ( (!iso_report.has_bootmgr) && (!HAS_SYSLINUX(iso_report)) && (!IS_WINPE(iso_report.winpe))
&& (!iso_report.has_efi) && (!IS_REACTOS(iso_report) && (!iso_report.is_bootable_img)) ) {
&& (!iso_report.has_efi) && (!IS_REACTOS(iso_report) && (!iso_report.has_kolibrios) && (!iso_report.is_bootable_img)) ) {
MessageBoxU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK|MB_ICONINFORMATION|MB_IS_RTL);
safe_free(iso_path);
SetMBRProps();
@ -1401,7 +1402,12 @@ static BOOL BootCheck(void)
MessageBoxU(hMainDialog, lmprintf(MSG_097), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL);
}
return FALSE;
} else if (((fs == FS_FAT16)||(fs == FS_FAT32)) && (!HAS_SYSLINUX(iso_report)) && (!IS_REACTOS(iso_report))) {
} else if ((fs == FS_FAT16) && (iso_report.has_kolibrios)) {
// KolibriOS doesn't support FAT16
MessageBoxU(hMainDialog, "This ISO is not compatible with the selected filesystem", lmprintf(MSG_099), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;
} else if (((fs == FS_FAT16)||(fs == FS_FAT32)) && (!HAS_SYSLINUX(iso_report)) &&
(!IS_REACTOS(iso_report)) && (!iso_report.has_kolibrios)) {
// FAT/FAT32 can only be used for isolinux based ISO images or when the Target Type is UEFI
MessageBoxU(hMainDialog, lmprintf(MSG_098), lmprintf(MSG_090), MB_OK|MB_ICONERROR|MB_IS_RTL);
return FALSE;

View file

@ -245,6 +245,7 @@ typedef struct {
BOOL has_autorun;
BOOL has_old_c32[NB_OLD_C32];
BOOL has_old_vesamenu;
BOOL has_kolibrios;
BOOL uses_minint;
BOOL is_bootable_img;
uint16_t sl_version; // Syslinux/Isolinux version
@ -337,7 +338,7 @@ extern BOOL Notification(int type, const notification_info* more_info, char* tit
extern BOOL Question(char* title, char* format, ...);
extern BOOL ExtractDOS(const char* path);
extern BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan);
extern int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file);
extern int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_file, DWORD attributes);
extern BOOL InstallSyslinux(DWORD drive_index, char drive_letter);
DWORD WINAPI FormatThread(void* param);
extern BOOL CreateProgress(void);

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 1.4.8.463"
CAPTION "Rufus 1.4.8.464"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -165,7 +165,7 @@ END
RTL_IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 1.4.8.463"
CAPTION "Rufus 1.4.8.464"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -427,8 +427,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,8,463
PRODUCTVERSION 1,4,8,463
FILEVERSION 1,4,8,464
PRODUCTVERSION 1,4,8,464
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -445,13 +445,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.8.463"
VALUE "FileVersion", "1.4.8.464"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.4.8.463"
VALUE "ProductVersion", "1.4.8.464"
END
END
BLOCK "VarFileInfo"