[partition] Allow a configurable EFI System Partition name

This commit adds the new configuration `efiSystemPartitionName` to the
file partition.conf.

This option sets the partition name to the EFI System Partition that is
created. If this option is unset, the partition is left unnamed.
This commit is contained in:
Gaël PORTAY 2020-04-21 18:11:16 -04:00
parent c59af8881c
commit d6c373c48d
3 changed files with 14 additions and 0 deletions

View File

@ -151,6 +151,10 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
KPM_PARTITION_FLAG( None ) ); KPM_PARTITION_FLAG( None ) );
PartitionInfo::setFormat( efiPartition, true ); PartitionInfo::setFormat( efiPartition, true );
PartitionInfo::setMountPoint( efiPartition, o.efiPartitionMountPoint ); PartitionInfo::setMountPoint( efiPartition, o.efiPartitionMountPoint );
if ( gs->contains( "efiSystemPartitionName" ) )
{
efiPartition->setLabel( gs->value( "efiSystemPartitionName" ).toString() );
}
core->createPartition( dev, efiPartition, KPM_PARTITION_FLAG_ESP ); core->createPartition( dev, efiPartition, KPM_PARTITION_FLAG_ESP );
firstFreeSector = lastSector + 1; firstFreeSector = lastSector + 1;
} }

View File

@ -538,6 +538,12 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
gs->insert( "efiSystemPartitionSize", CalamaresUtils::getString( configurationMap, "efiSystemPartitionSize" ) ); gs->insert( "efiSystemPartitionSize", CalamaresUtils::getString( configurationMap, "efiSystemPartitionSize" ) );
} }
// Read and parse key efiSystemPartitionName
if ( configurationMap.contains( "efiSystemPartitionName" ) )
{
gs->insert( "efiSystemPartitionName", CalamaresUtils::getString( configurationMap, "efiSystemPartitionName" ) );
}
// SWAP SETTINGS // SWAP SETTINGS
// //
// This is a bit convoluted because there's legacy settings to handle as well // This is a bit convoluted because there's legacy settings to handle as well

View File

@ -7,6 +7,10 @@ efiSystemPartition: "/boot/efi"
# If nothing is specified, the default size of 300MiB will be used. # If nothing is specified, the default size of 300MiB will be used.
# efiSystemPartitionSize: 300M # efiSystemPartitionSize: 300M
# This optional setting specifies the name of the EFI system partition.
# If nothing is specified, the partition name is left unset.
# efiSystemPartitionName: EFI
# In autogenerated partitioning, allow the user to select a swap size? # In autogenerated partitioning, allow the user to select a swap size?
# If there is exactly one choice, no UI is presented, and the user # If there is exactly one choice, no UI is presented, and the user
# cannot make a choice -- this setting is used. If there is more than # cannot make a choice -- this setting is used. If there is more than