mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-26 20:05:45 -05:00
[partition] WIP: EFI partition search
- Add some logging (not even sure it compiles) because my openSUSE Krypton Secureboot-enabled VM says "no EFI system partitions found".
This commit is contained in:
parent
cf02f7aab5
commit
092529da45
1 changed files with 7 additions and 1 deletions
|
@ -343,21 +343,27 @@ isEfiSystem()
|
||||||
bool
|
bool
|
||||||
isEfiBootable( const Partition* candidate )
|
isEfiBootable( const Partition* candidate )
|
||||||
{
|
{
|
||||||
|
cDebug() << "Check EFI bootable" << candidate->partitionPath() << candidate->devicePath();
|
||||||
|
cDebug() << " .. flags" << candidate->activeFlags();
|
||||||
|
|
||||||
/* If bit 17 is set, old-style Esp flag, it's OK */
|
/* If bit 17 is set, old-style Esp flag, it's OK */
|
||||||
if ( candidate->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
if ( candidate->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
||||||
const PartitionNode* root = candidate;
|
const PartitionNode* root = candidate;
|
||||||
while ( root && !root->isRoot() )
|
while ( root && !root->isRoot() )
|
||||||
|
{
|
||||||
root = root->parent();
|
root = root->parent();
|
||||||
|
cDebug() << " .. moved towards root" << (void *)root;
|
||||||
|
}
|
||||||
|
|
||||||
// Strange case: no root found, no partition table node?
|
// Strange case: no root found, no partition table node?
|
||||||
if ( !root )
|
if ( !root )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const PartitionTable* table = dynamic_cast<const PartitionTable*>( root );
|
const PartitionTable* table = dynamic_cast<const PartitionTable*>( root );
|
||||||
|
cDebug() << " .. partition table" << (void *)table << "type" << ( table ? table->type() : PartitionTable::TableType::unknownTableType );
|
||||||
return table && ( table->type() == PartitionTable::TableType::gpt ) &&
|
return table && ( table->type() == PartitionTable::TableType::gpt ) &&
|
||||||
candidate->activeFlags().testFlag( PartitionTable::FlagBoot );
|
candidate->activeFlags().testFlag( PartitionTable::FlagBoot );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue