[partition] Document how the configurable EFI size is coordinated
This commit is contained in:
parent
05f287ebbb
commit
d556dae415
@ -235,16 +235,18 @@ fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configu
|
||||
if ( configurationMap.contains( "efiSystemPartitionSize" ) )
|
||||
{
|
||||
const QString sizeString = CalamaresUtils::getString( configurationMap, "efiSystemPartitionSize" );
|
||||
CalamaresUtils::Partition::PartitionSize part_size = CalamaresUtils::Partition::PartitionSize( sizeString );
|
||||
if ( part_size.isValid() )
|
||||
CalamaresUtils::Partition::PartitionSize part_size
|
||||
= CalamaresUtils::Partition::PartitionSize( sizeString );
|
||||
if (part_size.isValid())
|
||||
{
|
||||
gs->insert( "efiSystemPartitionSize", sizeString );
|
||||
gs->insert( "efiSystemPartitionSize_i", part_size.toBytes() );
|
||||
// Insert once as string, once as a size-in-bytes;
|
||||
// changes to these keys should be synchronized with PartUtils.cpp
|
||||
gs->insert( "efiSystemPartitionSize", sizeString );
|
||||
gs->insert( "efiSystemPartitionSize_i", part_size.toBytes());
|
||||
|
||||
if ( part_size.toBytes() != PartUtils::efiFilesystemMinimumSize() )
|
||||
if (part_size.toBytes() != PartUtils::efiFilesystemMinimumSize())
|
||||
{
|
||||
cWarning() << "EFI partition size" << sizeString << "has been adjusted to"
|
||||
<< PartUtils::efiFilesystemMinimumSize() << "bytes";
|
||||
cWarning() << "EFI partition size" << sizeString << "has been adjusted to" << PartUtils::efiFilesystemMinimumSize() << "bytes";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -527,6 +527,9 @@ efiFilesystemMinimumSize()
|
||||
using CalamaresUtils::Units::operator""_MiB;
|
||||
|
||||
auto uefisys_part_sizeB = 300_MiB;
|
||||
|
||||
// The default can be overridden; the key used here comes
|
||||
// from the partition module Config.cpp
|
||||
auto* gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
if ( gs->contains( "efiSystemPartitionSize_i" ) )
|
||||
{
|
||||
|
@ -100,6 +100,12 @@ bool isEfiFilesystemSuitableSize( const Partition* candidate );
|
||||
* and EFI documentation (and not a little discussion in Calamares
|
||||
* issues about what works, what is effective, and what is mandated
|
||||
* by the standard and how all of those are different).
|
||||
*
|
||||
* This can be configured through the `partition.conf` file,
|
||||
* key *efiSystemPartitionSize*, which will then apply to both
|
||||
* automatic partitioning **and** the warning for manual partitioning.
|
||||
*
|
||||
* A minimum of 32MiB (which is bonkers-small) is enforced.
|
||||
*/
|
||||
size_t efiFilesystemMinimumSize();
|
||||
|
||||
|
@ -10,6 +10,12 @@ efiSystemPartition: "/boot/efi"
|
||||
|
||||
# This optional setting specifies the size of the EFI system partition.
|
||||
# If nothing is specified, the default size of 300MiB will be used.
|
||||
#
|
||||
# This size applies both to automatic partitioning and the checks
|
||||
# during manual partitioning. A minimum of 32MiB is enforced,
|
||||
# 300MiB is the default, M is treated as MiB, and if you really want
|
||||
# one-million (10^6) bytes, use MB.
|
||||
#
|
||||
# efiSystemPartitionSize: 300M
|
||||
|
||||
# This optional setting specifies the name of the EFI system partition (see
|
||||
|
Loading…
Reference in New Issue
Block a user