Refactor default partition table (#3194)
This commit is contained in:
parent
d69441a2da
commit
a51475e0ed
|
|
@ -6,7 +6,6 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from archinstall.tui import Tui
|
||||
|
||||
from ..hardware import SysInfo
|
||||
from ..interactions.general_conf import ask_abort
|
||||
from ..luks import Luks2
|
||||
from ..models.device_model import (
|
||||
|
|
@ -62,9 +61,7 @@ class FilesystemHandler:
|
|||
|
||||
# Setup the blockdevice, filesystem (and optionally encryption).
|
||||
# Once that's done, we'll hand over to perform_installation()
|
||||
partition_table = PartitionTable.GPT
|
||||
if SysInfo.has_uefi() is False:
|
||||
partition_table = PartitionTable.MBR
|
||||
partition_table = PartitionTable.default()
|
||||
|
||||
# make sure all devices are unmounted
|
||||
for mod in device_mods:
|
||||
|
|
|
|||
|
|
@ -205,6 +205,10 @@ class PartitionTable(Enum):
|
|||
def is_mbr(self) -> bool:
|
||||
return self == PartitionTable.MBR
|
||||
|
||||
@classmethod
|
||||
def default(cls) -> PartitionTable:
|
||||
return cls.GPT if SysInfo.has_uefi() else cls.MBR
|
||||
|
||||
|
||||
class Units(Enum):
|
||||
BINARY = 'binary'
|
||||
|
|
|
|||
Loading…
Reference in New Issue