Check for boot/active flag on 0xEE protective partition in verify
function.
This commit is contained in:
5
NEWS
5
NEWS
@@ -1,7 +1,10 @@
|
|||||||
0.8.8 (?/??/2013):
|
0.8.8 (?/??/2013):
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- Added check for an active/bootable 0xEE protective partition to the
|
||||||
|
verify ('v') function. If found, this is not counted as an error, but
|
||||||
|
it is called out to the user, since it can cause some EFIs (such as
|
||||||
|
VirtualBox's EFI) to ignore the disk.
|
||||||
|
|
||||||
0.8.7 (7/8/2013):
|
0.8.7 (7/8/2013):
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
12
basicmbr.cc
12
basicmbr.cc
@@ -921,6 +921,18 @@ int BasicMBRData::IsLegal(void) {
|
|||||||
return allOK;
|
return allOK;
|
||||||
} // BasicMBRData::IsLegal()
|
} // BasicMBRData::IsLegal()
|
||||||
|
|
||||||
|
// Returns 1 if the 0xEE partition in the protective/hybrid MBR is marked as
|
||||||
|
// active/bootable.
|
||||||
|
int BasicMBRData::IsEEActive(void) {
|
||||||
|
int i, IsActive = FALSE;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_MBR_PARTS; i++) {
|
||||||
|
if (partitions[i].GetStatus() & 0x80)
|
||||||
|
IsActive = TRUE;
|
||||||
|
}
|
||||||
|
return IsActive;
|
||||||
|
} // BasicMBRData::IsEEActive()
|
||||||
|
|
||||||
// Finds the next in-use partition, starting with start (will return start
|
// Finds the next in-use partition, starting with start (will return start
|
||||||
// if it's in use). Returns -1 if no subsequent partition is in use.
|
// if it's in use). Returns -1 if no subsequent partition is in use.
|
||||||
int BasicMBRData::FindNextInUse(int start) {
|
int BasicMBRData::FindNextInUse(int start) {
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public:
|
|||||||
int DoTheyFit(void);
|
int DoTheyFit(void);
|
||||||
int SpaceBeforeAllLogicals(void);
|
int SpaceBeforeAllLogicals(void);
|
||||||
int IsLegal(void);
|
int IsLegal(void);
|
||||||
|
int IsEEActive(void);
|
||||||
int FindNextInUse(int start);
|
int FindNextInUse(int start);
|
||||||
|
|
||||||
// Functions to create, delete, or change partitions
|
// Functions to create, delete, or change partitions
|
||||||
|
|||||||
9
gpt.cc
9
gpt.cc
@@ -279,6 +279,15 @@ int GPTData::Verify(void) {
|
|||||||
// Check for MBR-specific problems....
|
// Check for MBR-specific problems....
|
||||||
problems += VerifyMBR();
|
problems += VerifyMBR();
|
||||||
|
|
||||||
|
// Check for a 0xEE protective partition that's marked as active....
|
||||||
|
if (protectiveMBR.IsEEActive()) {
|
||||||
|
cout << "\nWarning: The 0xEE protective partition in the MBR is marked as active. This is\n"
|
||||||
|
<< "technically a violation of the GPT specification, and can cause some EFIs to\n"
|
||||||
|
<< "ignore the disk, but it is required to boot from a GPT disk on some BIOS-based\n"
|
||||||
|
<< "computers. You can clear this flag by creating a fresh protective MBR using\n"
|
||||||
|
<< "the 'n' option on the experts' menu.\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Verify that partitions don't run into GPT data areas....
|
// Verify that partitions don't run into GPT data areas....
|
||||||
problems += CheckGPTSize();
|
problems += CheckGPTSize();
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#ifndef __GPTSUPPORT
|
#ifndef __GPTSUPPORT
|
||||||
#define __GPTSUPPORT
|
#define __GPTSUPPORT
|
||||||
|
|
||||||
#define GPTFDISK_VERSION "0.8.7"
|
#define GPTFDISK_VERSION "0.8.7.1"
|
||||||
|
|
||||||
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
|
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
|
||||||
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
|
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
|
||||||
|
|||||||
Reference in New Issue
Block a user