Skip to content

Commit

Permalink
Refactor default partition table (#3194)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Feb 23, 2025
1 parent d69441a commit a51475e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions archinstall/lib/disk/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

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 (
Expand Down Expand Up @@ -62,9 +61,7 @@ def perform_filesystem_operations(self, show_countdown: bool = True) -> None:

# 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:
Expand Down
4 changes: 4 additions & 0 deletions archinstall/lib/models/device_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a51475e

Please sign in to comment.