From b6228d137ca11353c94c784438d0f87630229b88 Mon Sep 17 00:00:00 2001 From: demmm Date: Tue, 24 Mar 2020 16:59:31 +0100 Subject: [PATCH] Adding popup warning/instructions for GPT with BIOS see https://github.com/calamares/calamares/issues/1339#issuecomment-600862507 this is a very generic warning, used downstream since 2016 stopped virtual all BIOS GPT failures and questions --- .../partition/gui/PartitionViewStep.cpp | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 28ed77409..1cfc010e5 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -402,7 +402,11 @@ PartitionViewStep::onLeave() if ( m_widget->currentWidget() == m_manualPartitionPage ) { + bool isEfi = false; if ( PartUtils::isEfiSystem() ) + isEfi = true; + + if ( isEfi ) { QString espMountPoint = Calamares::JobQueue::instance()->globalStorage()-> value( "efiSystemPartition" ).toString(); @@ -448,7 +452,39 @@ PartitionViewStep::onLeave() description ); } } + + if ( !isEfi ) + { + + cDebug() << "device: BIOS"; + + Partition* bios_p = m_core->findPartitionByMountPoint( "" ); + QString message; + QString description; + message = tr( "Option to use GPT on BIOS" ); + description = tr( "A GPT partition table is the best option for all " + "systems. This installer supports such a setup for " + "BIOS systems too." + "

" + "To configure a GPT partition table on BIOS, " + "(if not done so already) go back " + "and set the partion table to GPT, next create a 8 MB " + "unformatted partition with the " + "bios_grub flag enabled.

" + "An unformatted 8 MB partition is necessary " + "to start %1 on a BIOS system with GPT." ) + .arg( Calamares::Branding::instance()-> + string( Calamares::Branding::ShortProductName ) ); + + if ( !message.isEmpty() ) + { + QMessageBox::information( m_manualPartitionPage, + message, + description ); + } + } + Partition* root_p = m_core->findPartitionByMountPoint( "/" ); Partition* boot_p = m_core->findPartitionByMountPoint( "/boot" );