From 9459ef7d93885ac96763e6514e08f9967d377549 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 12 Nov 2018 15:15:22 +0100 Subject: [PATCH] [partition] Set FlagBoot for the root partition - This only applies to legacy (non-EFI) BIOS systems, and adds the FlagBoot to whatever is already set for the root filesystem, and only when autopartitioning the device. Submitted by aliveafter1000. FIXES: #1046 CLOSES: #1049 --- src/modules/partition/core/PartitionActions.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index 458961d2f..fc4914696 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -223,7 +223,11 @@ doAutopartition( PartitionCoreModule* core, Device* dev, const QString& luksPass } PartitionInfo::setFormat( rootPartition, true ); PartitionInfo::setMountPoint( rootPartition, "/" ); - core->createPartition( dev, rootPartition ); + // Some buggy (legacy) BIOSes test if the bootflag of at least one partition is set. + // Otherwise they ignore the device in boot-order, so add it here. + core->createPartition( dev, rootPartition, + rootPartition->activeFlags() | ( isEfi ? PartitionTable::FlagNone : PartitionTable::FlagBoot ) + ); if ( shouldCreateSwap ) {