2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2019-01-07 17:25:22 +01:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014-2017 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2018-2019 Collabora Ltd <arnaud.ferraris@collabora.com>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2019-01-07 17:25:22 +01:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2019-01-07 17:25:22 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-02-22 12:58:55 +01:00
|
|
|
#include "GlobalStorage.h"
|
|
|
|
#include "JobQueue.h"
|
|
|
|
|
2019-04-17 19:16:48 +02:00
|
|
|
#include "utils/Logger.h"
|
|
|
|
|
2019-01-07 17:25:22 +01:00
|
|
|
#include "core/PartitionLayout.h"
|
|
|
|
|
2019-01-07 17:26:37 +01:00
|
|
|
#include "core/KPMHelpers.h"
|
2020-02-14 11:15:57 +01:00
|
|
|
#include "core/PartUtils.h"
|
2019-01-07 17:26:37 +01:00
|
|
|
#include "core/PartitionActions.h"
|
|
|
|
#include "core/PartitionInfo.h"
|
|
|
|
|
2020-06-20 05:06:38 +02:00
|
|
|
#include "utils/Variant.h"
|
|
|
|
|
2019-01-07 17:26:37 +01:00
|
|
|
#include <kpmcore/core/device.h>
|
|
|
|
#include <kpmcore/core/partition.h>
|
2019-01-07 17:25:22 +01:00
|
|
|
#include <kpmcore/fs/filesystem.h>
|
|
|
|
|
2020-11-02 21:35:43 +01:00
|
|
|
PartitionLayout::PartitionLayout() {}
|
2019-01-07 17:25:22 +01:00
|
|
|
|
|
|
|
PartitionLayout::PartitionLayout( const PartitionLayout& layout )
|
2020-11-02 21:35:43 +01:00
|
|
|
: m_partLayout( layout.m_partLayout )
|
2019-01-07 17:25:22 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-02-14 11:15:57 +01:00
|
|
|
PartitionLayout::~PartitionLayout() {}
|
2019-01-07 17:25:22 +01:00
|
|
|
|
2020-06-21 02:30:22 +02:00
|
|
|
PartitionLayout::PartitionEntry::PartitionEntry()
|
|
|
|
: partAttributes( 0 )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-11-02 22:32:44 +01:00
|
|
|
PartitionLayout::PartitionEntry::PartitionEntry( FileSystem::Type fs,
|
2020-11-02 21:35:43 +01:00
|
|
|
const QString& mountPoint,
|
|
|
|
const QString& size,
|
|
|
|
const QString& minSize,
|
|
|
|
const QString& maxSize )
|
2020-11-02 22:32:44 +01:00
|
|
|
: partAttributes( 0 )
|
2020-06-22 00:02:04 +02:00
|
|
|
, partMountPoint( mountPoint )
|
2020-11-02 22:32:44 +01:00
|
|
|
, partFileSystem( fs )
|
2020-10-23 22:31:22 +02:00
|
|
|
, partSize( size )
|
2020-06-22 00:02:04 +02:00
|
|
|
, partMinSize( minSize )
|
|
|
|
, partMaxSize( maxSize )
|
2019-02-11 23:37:14 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-06-22 00:02:04 +02:00
|
|
|
PartitionLayout::PartitionEntry::PartitionEntry( const QString& label,
|
|
|
|
const QString& uuid,
|
|
|
|
const QString& type,
|
|
|
|
quint64 attributes,
|
|
|
|
const QString& mountPoint,
|
|
|
|
const QString& fs,
|
|
|
|
const QVariantMap& features,
|
|
|
|
const QString& size,
|
|
|
|
const QString& minSize,
|
|
|
|
const QString& maxSize )
|
|
|
|
: partLabel( label )
|
|
|
|
, partUUID( uuid )
|
|
|
|
, partType( type )
|
|
|
|
, partAttributes( attributes )
|
|
|
|
, partMountPoint( mountPoint )
|
|
|
|
, partFeatures( features )
|
|
|
|
, partSize( size )
|
|
|
|
, partMinSize( minSize )
|
|
|
|
, partMaxSize( maxSize )
|
2019-01-07 17:25:22 +01:00
|
|
|
{
|
2021-06-18 11:06:02 +02:00
|
|
|
PartUtils::canonicalFilesystemName( fs, &partFileSystem );
|
2020-06-22 00:02:04 +02:00
|
|
|
}
|
2019-04-17 19:16:48 +02:00
|
|
|
|
2020-06-22 00:02:04 +02:00
|
|
|
|
2019-04-17 19:16:48 +02:00
|
|
|
bool
|
2020-06-22 00:02:04 +02:00
|
|
|
PartitionLayout::addEntry( const PartitionEntry& entry )
|
2019-01-07 17:25:22 +01:00
|
|
|
{
|
2019-04-17 19:16:48 +02:00
|
|
|
if ( !entry.isValid() )
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2019-01-07 17:25:22 +01:00
|
|
|
|
2019-02-22 13:08:59 +01:00
|
|
|
m_partLayout.append( entry );
|
2019-04-17 19:16:48 +02:00
|
|
|
|
|
|
|
return true;
|
2019-01-07 17:25:22 +01:00
|
|
|
}
|
2019-01-07 17:26:37 +01:00
|
|
|
|
2020-06-20 05:06:38 +02:00
|
|
|
void
|
2020-11-02 21:35:43 +01:00
|
|
|
PartitionLayout::init( FileSystem::Type defaultFsType, const QVariantList& config )
|
2020-06-20 05:06:38 +02:00
|
|
|
{
|
2021-06-29 23:47:33 +02:00
|
|
|
bool ok = true; // bogus argument to getSubMap()
|
2020-06-20 05:06:38 +02:00
|
|
|
|
|
|
|
m_partLayout.clear();
|
|
|
|
|
|
|
|
for ( const auto& r : config )
|
|
|
|
{
|
|
|
|
QVariantMap pentry = r.toMap();
|
|
|
|
|
2020-10-31 13:09:13 +01:00
|
|
|
if ( !pentry.contains( "name" ) || !pentry.contains( "size" ) )
|
2020-06-20 05:06:38 +02:00
|
|
|
{
|
|
|
|
cError() << "Partition layout entry #" << config.indexOf( r )
|
|
|
|
<< "lacks mandatory attributes, switching to default layout.";
|
|
|
|
m_partLayout.clear();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2020-06-22 00:02:04 +02:00
|
|
|
if ( !addEntry( { CalamaresUtils::getString( pentry, "name" ),
|
|
|
|
CalamaresUtils::getString( pentry, "uuid" ),
|
|
|
|
CalamaresUtils::getString( pentry, "type" ),
|
|
|
|
CalamaresUtils::getUnsignedInteger( pentry, "attributes", 0 ),
|
|
|
|
CalamaresUtils::getString( pentry, "mountPoint" ),
|
2020-10-31 13:09:13 +01:00
|
|
|
CalamaresUtils::getString( pentry, "filesystem", "unformatted" ),
|
2020-06-22 00:02:04 +02:00
|
|
|
CalamaresUtils::getSubMap( pentry, "features", ok ),
|
|
|
|
CalamaresUtils::getString( pentry, "size", QStringLiteral( "0" ) ),
|
|
|
|
CalamaresUtils::getString( pentry, "minSize", QStringLiteral( "0" ) ),
|
|
|
|
CalamaresUtils::getString( pentry, "maxSize", QStringLiteral( "0" ) ) } ) )
|
2020-06-20 05:06:38 +02:00
|
|
|
{
|
|
|
|
cError() << "Partition layout entry #" << config.indexOf( r ) << "is invalid, switching to default layout.";
|
|
|
|
m_partLayout.clear();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !m_partLayout.count() )
|
|
|
|
{
|
2021-06-29 23:47:33 +02:00
|
|
|
// Unknown will be translated to defaultFsType at apply-time
|
|
|
|
addEntry( { FileSystem::Type::Unknown, QString( "/" ), QString( "100%" ) } );
|
2020-06-20 05:06:38 +02:00
|
|
|
}
|
2021-06-29 23:47:33 +02:00
|
|
|
|
|
|
|
setDefaultFsType( defaultFsType );
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PartitionLayout::setDefaultFsType(FileSystem::Type defaultFsType)
|
|
|
|
{
|
|
|
|
using T = FileSystem::Type;
|
|
|
|
switch ( defaultFsType )
|
|
|
|
{
|
|
|
|
case T::Unknown:
|
|
|
|
case T::Unformatted:
|
|
|
|
case T::Extended:
|
|
|
|
case T::LinuxSwap:
|
|
|
|
case T::Luks:
|
|
|
|
case T::Ocfs2:
|
|
|
|
case T::Lvm2_PV:
|
|
|
|
case T::Udf:
|
|
|
|
case T::Iso9660:
|
|
|
|
case T::Luks2:
|
|
|
|
case T::LinuxRaidMember:
|
|
|
|
case T::BitLocker:
|
|
|
|
// bad bad
|
|
|
|
cWarning() << "The selected default FS" << defaultFsType << "is not suitable." << "Using ext4 instead.";
|
|
|
|
defaultFsType = T::Ext4;
|
|
|
|
break;
|
|
|
|
case T::Ext2:
|
|
|
|
case T::Ext3:
|
|
|
|
case T::Ext4:
|
|
|
|
case T::Fat32:
|
|
|
|
case T::Ntfs:
|
|
|
|
case T::Reiser4:
|
|
|
|
case T::ReiserFS:
|
|
|
|
case T::Xfs:
|
|
|
|
case T::Jfs:
|
|
|
|
case T::Btrfs:
|
|
|
|
case T::Exfat:
|
|
|
|
case T::F2fs:
|
|
|
|
// ok
|
|
|
|
break;
|
|
|
|
case T::Fat12:
|
|
|
|
case T::Fat16:
|
|
|
|
case T::Hfs:
|
|
|
|
case T::HfsPlus:
|
|
|
|
case T::Ufs:
|
|
|
|
case T::Hpfs:
|
|
|
|
case T::Zfs:
|
|
|
|
case T::Nilfs2:
|
|
|
|
case T::Apfs:
|
|
|
|
case T::Minix:
|
|
|
|
// weird
|
|
|
|
cWarning() << "The selected default FS" << defaultFsType << "is unusual, but not wrong.";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
cWarning() << "The selected default FS" << defaultFsType << "is not known to Calamares." << "Using ext4 instead.";
|
|
|
|
defaultFsType = T::Ext4;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_defaultFsType = defaultFsType;
|
2020-06-20 05:06:38 +02:00
|
|
|
}
|
|
|
|
|
2021-06-29 23:47:33 +02:00
|
|
|
|
2019-01-07 17:26:37 +01:00
|
|
|
QList< Partition* >
|
2020-10-30 15:15:30 +01:00
|
|
|
PartitionLayout::createPartitions( Device* dev,
|
|
|
|
qint64 firstSector,
|
|
|
|
qint64 lastSector,
|
|
|
|
QString luksPassphrase,
|
|
|
|
PartitionNode* parent,
|
|
|
|
const PartitionRole& role )
|
2019-01-07 17:26:37 +01:00
|
|
|
{
|
2021-06-29 23:47:33 +02:00
|
|
|
// Make sure the default FS is sensible; warn and use ext4 if not
|
|
|
|
setDefaultFsType( m_defaultFsType );
|
|
|
|
|
2019-01-07 17:26:37 +01:00
|
|
|
QList< Partition* > partList;
|
2020-09-16 12:46:28 +02:00
|
|
|
// Map each partition entry to its requested size (0 when calculated later)
|
2020-06-22 16:36:20 +02:00
|
|
|
QMap< const PartitionLayout::PartitionEntry*, qint64 > partSectorsMap;
|
|
|
|
const qint64 totalSectors = lastSector - firstSector + 1;
|
|
|
|
qint64 currentSector, availableSectors = totalSectors;
|
2019-01-07 17:26:37 +01:00
|
|
|
|
2020-06-22 16:36:20 +02:00
|
|
|
// Let's check if we have enough space for each partitions, using the size
|
|
|
|
// propery or the min-size property if unit is in percentage.
|
2020-06-22 19:56:57 +02:00
|
|
|
for ( const auto& entry : qAsConst( m_partLayout ) )
|
2019-01-07 17:26:37 +01:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( !entry.partSize.isValid() )
|
2020-10-23 22:34:53 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
cWarning() << "Partition" << entry.partMountPoint << "size is invalid, skipping...";
|
2020-10-23 22:34:53 +02:00
|
|
|
continue;
|
|
|
|
}
|
2020-09-16 12:46:28 +02:00
|
|
|
|
2020-10-23 22:34:53 +02:00
|
|
|
// Calculate partition size: Rely on "possibly uninitialized use"
|
|
|
|
// warnings to ensure that all the cases are covered below.
|
|
|
|
// We need to ignore the percent-defined until later
|
2020-06-22 16:36:20 +02:00
|
|
|
qint64 sectors = 0;
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( entry.partSize.unit() != CalamaresUtils::Partition::SizeUnit::Percent )
|
2020-10-23 22:34:53 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
sectors = entry.partSize.toSectors( totalSectors, dev->logicalSize() );
|
2020-10-23 22:34:53 +02:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
else if ( entry.partMinSize.isValid() )
|
2019-04-17 19:16:48 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
sectors = entry.partMinSize.toSectors( totalSectors, dev->logicalSize() );
|
2019-04-17 19:16:48 +02:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
partSectorsMap.insert( &entry, sectors );
|
2020-06-22 16:36:20 +02:00
|
|
|
availableSectors -= sectors;
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
2019-04-17 19:16:48 +02:00
|
|
|
|
2020-06-22 16:36:20 +02:00
|
|
|
// There is not enough space for all partitions, use the min-size property
|
|
|
|
// and see if we can do better afterward.
|
|
|
|
if ( availableSectors < 0 )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 16:36:20 +02:00
|
|
|
availableSectors = totalSectors;
|
2020-06-22 19:56:57 +02:00
|
|
|
for ( const auto& entry : qAsConst( m_partLayout ) )
|
2020-02-14 11:15:57 +01:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
qint64 sectors = partSectorsMap.value( &entry );
|
|
|
|
if ( entry.partMinSize.isValid() )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
sectors = entry.partMinSize.toSectors( totalSectors, dev->logicalSize() );
|
|
|
|
partSectorsMap.insert( &entry, sectors );
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
2020-06-22 16:36:20 +02:00
|
|
|
availableSectors -= sectors;
|
2020-02-14 11:15:57 +01:00
|
|
|
}
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
2019-04-17 19:16:48 +02:00
|
|
|
|
2020-06-22 16:36:20 +02:00
|
|
|
// Assign sectors for percentage-defined partitions.
|
2020-06-22 19:56:57 +02:00
|
|
|
for ( const auto& entry : qAsConst( m_partLayout ) )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( entry.partSize.unit() == CalamaresUtils::Partition::SizeUnit::Percent )
|
2019-04-17 19:16:48 +02:00
|
|
|
{
|
2020-11-02 21:35:43 +01:00
|
|
|
qint64 sectors
|
|
|
|
= entry.partSize.toSectors( availableSectors + partSectorsMap.value( &entry ), dev->logicalSize() );
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( entry.partMinSize.isValid() )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
sectors = std::max( sectors, entry.partMinSize.toSectors( totalSectors, dev->logicalSize() ) );
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( entry.partMaxSize.isValid() )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 19:56:57 +02:00
|
|
|
sectors = std::min( sectors, entry.partMaxSize.toSectors( totalSectors, dev->logicalSize() ) );
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
partSectorsMap.insert( &entry, sectors );
|
2019-04-17 19:16:48 +02:00
|
|
|
}
|
2020-09-16 12:46:28 +02:00
|
|
|
}
|
|
|
|
|
2021-06-29 23:47:33 +02:00
|
|
|
auto correctFS = [d=m_defaultFsType]( FileSystem::Type t ) { return t == FileSystem::Type::Unknown ? d : t; };
|
|
|
|
|
2020-06-22 16:36:20 +02:00
|
|
|
// Create the partitions.
|
|
|
|
currentSector = firstSector;
|
|
|
|
availableSectors = totalSectors;
|
2020-06-22 19:56:57 +02:00
|
|
|
for ( const auto& entry : qAsConst( m_partLayout ) )
|
2020-09-16 12:46:28 +02:00
|
|
|
{
|
2020-06-22 16:36:20 +02:00
|
|
|
// Adjust partition size based on available space.
|
2020-06-22 19:56:57 +02:00
|
|
|
qint64 sectors = partSectorsMap.value( &entry );
|
2020-06-22 16:36:20 +02:00
|
|
|
sectors = std::min( sectors, availableSectors );
|
|
|
|
if ( sectors == 0 )
|
2020-02-14 11:15:57 +01:00
|
|
|
{
|
2020-06-22 16:36:20 +02:00
|
|
|
continue;
|
2020-02-14 11:15:57 +01:00
|
|
|
}
|
2020-10-01 15:38:18 +02:00
|
|
|
|
2020-06-22 22:34:06 +02:00
|
|
|
Partition* part = nullptr;
|
2019-01-07 17:26:37 +01:00
|
|
|
if ( luksPassphrase.isEmpty() )
|
|
|
|
{
|
2020-11-02 21:35:43 +01:00
|
|
|
part = KPMHelpers::createNewPartition( parent,
|
|
|
|
*dev,
|
|
|
|
role,
|
2021-06-29 23:47:33 +02:00
|
|
|
correctFS( entry.partFileSystem ),
|
2021-03-27 14:45:34 +01:00
|
|
|
entry.partLabel,
|
2020-11-02 21:35:43 +01:00
|
|
|
currentSector,
|
|
|
|
currentSector + sectors - 1,
|
|
|
|
KPM_PARTITION_FLAG( None ) );
|
2019-01-07 17:26:37 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-11-02 21:35:43 +01:00
|
|
|
part = KPMHelpers::createNewEncryptedPartition( parent,
|
|
|
|
*dev,
|
|
|
|
role,
|
2021-06-29 23:47:33 +02:00
|
|
|
correctFS( entry.partFileSystem ),
|
2021-03-27 14:45:34 +01:00
|
|
|
entry.partLabel,
|
2020-11-02 21:35:43 +01:00
|
|
|
currentSector,
|
|
|
|
currentSector + sectors - 1,
|
|
|
|
luksPassphrase,
|
|
|
|
KPM_PARTITION_FLAG( None ) );
|
2019-01-07 17:26:37 +01:00
|
|
|
}
|
2020-06-22 22:34:06 +02:00
|
|
|
PartitionInfo::setFormat( part, true );
|
|
|
|
PartitionInfo::setMountPoint( part, entry.partMountPoint );
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( !entry.partLabel.isEmpty() )
|
2020-02-14 11:15:57 +01:00
|
|
|
{
|
2020-06-22 22:34:06 +02:00
|
|
|
part->setLabel( entry.partLabel );
|
|
|
|
part->fileSystem().setLabel( entry.partLabel );
|
2020-02-14 11:15:57 +01:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( !entry.partUUID.isEmpty() )
|
2020-05-14 18:30:58 +02:00
|
|
|
{
|
2020-06-22 22:34:06 +02:00
|
|
|
part->setUUID( entry.partUUID );
|
2020-05-14 18:30:58 +02:00
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( !entry.partType.isEmpty() )
|
2020-03-19 13:37:21 +01:00
|
|
|
{
|
|
|
|
#if defined( WITH_KPMCORE42API )
|
2020-06-22 22:34:06 +02:00
|
|
|
part->setType( entry.partType );
|
2020-03-19 13:37:21 +01:00
|
|
|
#else
|
|
|
|
cWarning() << "Ignoring type; requires KPMcore >= 4.2.0.";
|
2020-03-21 19:21:16 +01:00
|
|
|
#endif
|
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( entry.partAttributes )
|
2020-03-21 19:21:16 +01:00
|
|
|
{
|
|
|
|
#if defined( WITH_KPMCORE42API )
|
2020-06-22 22:34:06 +02:00
|
|
|
part->setAttributes( entry.partAttributes );
|
2020-03-21 19:21:16 +01:00
|
|
|
#else
|
|
|
|
cWarning() << "Ignoring attributes; requires KPMcore >= 4.2.0.";
|
2020-03-23 17:09:44 +01:00
|
|
|
#endif
|
|
|
|
}
|
2020-06-22 19:56:57 +02:00
|
|
|
if ( !entry.partFeatures.isEmpty() )
|
2020-03-16 22:25:55 +01:00
|
|
|
{
|
|
|
|
#if defined( WITH_KPMCORE42API )
|
2020-06-22 19:56:57 +02:00
|
|
|
for ( const auto& k : entry.partFeatures.keys() )
|
2020-03-23 17:09:44 +01:00
|
|
|
{
|
2020-06-22 22:34:06 +02:00
|
|
|
part->fileSystem().addFeature( k, entry.partFeatures.value( k ) );
|
2020-03-23 17:09:44 +01:00
|
|
|
}
|
2020-03-16 22:25:55 +01:00
|
|
|
#else
|
|
|
|
cWarning() << "Ignoring features; requires KPMcore >= 4.2.0.";
|
2020-03-19 13:37:21 +01:00
|
|
|
#endif
|
|
|
|
}
|
2019-01-07 17:26:37 +01:00
|
|
|
// 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.
|
2020-06-22 22:34:06 +02:00
|
|
|
partList.append( part );
|
2020-06-22 16:36:20 +02:00
|
|
|
currentSector += sectors;
|
|
|
|
availableSectors -= sectors;
|
2019-01-07 17:26:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return partList;
|
|
|
|
}
|