Skip to content
Snippets Groups Projects
Commit 5796b05f authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

Allow disabling automated LUKS modes.

parent 5bf4bb87
No related branches found
No related tags found
No related merge requests found
......@@ -82,12 +82,16 @@ ChoicePage::ChoicePage( QWidget* parent )
, m_beforePartitionLabelsView( nullptr )
, m_bootloaderComboBox( nullptr )
, m_lastSelectedDeviceIndex( -1 )
, m_enableEncryptionWidget( true )
{
setupUi( this );
m_defaultFsType = Calamares::JobQueue::instance()->
globalStorage()->
value( "defaultFileSystemType" ).toString();
m_enableEncryptionWidget = Calamares::JobQueue::instance()->
globalStorage()->
value( "enableLuksAutomatedPartitioning" ).toBool();
if ( FileSystem::typeForName( m_defaultFsType ) == FileSystem::Unknown )
m_defaultFsType = "ext4";
......@@ -884,7 +888,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
{
case Alongside:
{
m_encryptWidget->show();
if ( m_enableEncryptionWidget )
m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) );
m_selectLabel->setText( tr( "<strong>Select a partition to shrink, "
"then drag the bottom bar to resize</strong>" ) );
......@@ -930,7 +935,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
case Erase:
case Replace:
{
m_encryptWidget->show();
if ( m_enableEncryptionWidget )
m_encryptWidget->show();
m_previewBeforeLabel->setText( tr( "Current:" ) );
m_afterPartitionBarsView = new PartitionBarsView( m_previewAfterFrame );
m_afterPartitionBarsView->setNestedPartitionsMode( mode );
......
......@@ -123,6 +123,7 @@ private:
int m_lastSelectedDeviceIndex;
QString m_defaultFsType;
bool m_enableEncryptionWidget;
QMutex m_coreMutex;
};
......
......@@ -508,6 +508,17 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
}
if ( configurationMap.contains( "enableLuksAutomatedPartitioning" ) &&
configurationMap.value( "enableLuksAutomatedPartitioning" ).type() == QVariant::Bool )
{
gs->insert( "enableLuksAutomatedPartitioning",
configurationMap.value( "enableLuksAutomatedPartitioning" ).toBool() );
}
else
{
gs->insert( "enableLuksAutomatedPartitioning", true );
}
// Now that we have the config, we load the PartitionCoreModule in the background
// because it could take a while. Then when it's done, we can set up the widgets
......
......@@ -18,3 +18,23 @@ alwaysShowPartitionLabels: true
# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs
# If nothing is specified, Calamares defaults to "ext4".
defaultFileSystemType: "ext4"
# Show/hide LUKS related functionality in automated partitioning modes.
# Disable this if you choose not to deploy early unlocking support in GRUB2
# and/or your distribution's initramfs solution.
#
# BIG FAT WARNING:
# This option is unsupported, as it cuts out a crucial security feature.
# Disabling LUKS and shipping Calamares without a correctly configured GRUB2
# and initramfs is considered suboptimal use of the Calamares software. The
# Calamares team will not provide user support for any potential issue that
# may arise as a consequence of setting this option to false.
# It is strongly recommended that system integrators put in the work to support
# LUKS unlocking support in GRUB2 and initramfs/dracut/mkinitcpio/etc.
# Support is offered to system integrators that wish to do so, through the
# Calamares bug tracker, as well as in #calamares on Freenode.
# For more information on setting up GRUB2 for Calamares with LUKS, see
# https://github.com/calamares/calamares/wiki/LUKS-Deployment
#
# If nothing is specified, LUKS is enabled in automated modes.
#enableLuksAutomatedPartitioning: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment