Change partition flag name Boot -> BOOT (#2903)
This commit is contained in:
parent
7fd726f03f
commit
bda0752eec
|
|
@ -590,7 +590,7 @@ class PartitionFlagDataMixin:
|
||||||
|
|
||||||
|
|
||||||
class PartitionFlag(PartitionFlagDataMixin, Enum):
|
class PartitionFlag(PartitionFlagDataMixin, Enum):
|
||||||
Boot = parted.PARTITION_BOOT
|
BOOT = parted.PARTITION_BOOT
|
||||||
XBOOTLDR = parted.PARTITION_BLS_BOOT, "bls_boot"
|
XBOOTLDR = parted.PARTITION_BLS_BOOT, "bls_boot"
|
||||||
ESP = parted.PARTITION_ESP
|
ESP = parted.PARTITION_ESP
|
||||||
LINUX_HOME = parted.PARTITION_LINUX_HOME, "linux-home"
|
LINUX_HOME = parted.PARTITION_LINUX_HOME, "linux-home"
|
||||||
|
|
@ -713,8 +713,8 @@ class PartitionModification:
|
||||||
partuuid: str | None = None
|
partuuid: str | None = None
|
||||||
uuid: str | None = None
|
uuid: str | None = None
|
||||||
|
|
||||||
_efi_indicator_flags = (PartitionFlag.Boot, PartitionFlag.ESP)
|
_efi_indicator_flags = (PartitionFlag.BOOT, PartitionFlag.ESP)
|
||||||
_boot_indicator_flags = (PartitionFlag.Boot, PartitionFlag.XBOOTLDR)
|
_boot_indicator_flags = (PartitionFlag.BOOT, PartitionFlag.XBOOTLDR)
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
# needed to use the object as a dictionary key due to hash func
|
# needed to use the object as a dictionary key due to hash func
|
||||||
|
|
|
||||||
|
|
@ -116,13 +116,13 @@ class PartitioningList(ListManager):
|
||||||
case 'assign_mountpoint' if entry:
|
case 'assign_mountpoint' if entry:
|
||||||
entry.mountpoint = self._prompt_mountpoint()
|
entry.mountpoint = self._prompt_mountpoint()
|
||||||
if entry.mountpoint == Path('/boot'):
|
if entry.mountpoint == Path('/boot'):
|
||||||
entry.set_flag(PartitionFlag.Boot)
|
entry.set_flag(PartitionFlag.BOOT)
|
||||||
if SysInfo.has_uefi():
|
if SysInfo.has_uefi():
|
||||||
entry.set_flag(PartitionFlag.ESP)
|
entry.set_flag(PartitionFlag.ESP)
|
||||||
case 'mark_formatting' if entry:
|
case 'mark_formatting' if entry:
|
||||||
self._prompt_formatting(entry)
|
self._prompt_formatting(entry)
|
||||||
case 'mark_bootable' if entry:
|
case 'mark_bootable' if entry:
|
||||||
entry.invert_flag(PartitionFlag.Boot)
|
entry.invert_flag(PartitionFlag.BOOT)
|
||||||
if SysInfo.has_uefi():
|
if SysInfo.has_uefi():
|
||||||
entry.invert_flag(PartitionFlag.ESP)
|
entry.invert_flag(PartitionFlag.ESP)
|
||||||
case 'set_filesystem' if entry:
|
case 'set_filesystem' if entry:
|
||||||
|
|
@ -414,7 +414,7 @@ class PartitioningList(ListManager):
|
||||||
)
|
)
|
||||||
|
|
||||||
if partition.mountpoint == Path('/boot'):
|
if partition.mountpoint == Path('/boot'):
|
||||||
partition.set_flag(PartitionFlag.Boot)
|
partition.set_flag(PartitionFlag.BOOT)
|
||||||
if SysInfo.has_uefi():
|
if SysInfo.has_uefi():
|
||||||
partition.set_flag(PartitionFlag.ESP)
|
partition.set_flag(PartitionFlag.ESP)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ def select_lvm_config(
|
||||||
|
|
||||||
|
|
||||||
def _boot_partition(sector_size: disk.SectorSize, using_gpt: bool) -> disk.PartitionModification:
|
def _boot_partition(sector_size: disk.SectorSize, using_gpt: bool) -> disk.PartitionModification:
|
||||||
flags = [disk.PartitionFlag.Boot]
|
flags = [disk.PartitionFlag.BOOT]
|
||||||
size = disk.Size(1, disk.Unit.GiB, sector_size)
|
size = disk.Size(1, disk.Unit.GiB, sector_size)
|
||||||
if using_gpt:
|
if using_gpt:
|
||||||
start = disk.Size(1, disk.Unit.MiB, sector_size)
|
start = disk.Size(1, disk.Unit.MiB, sector_size)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ After running ``python -m archinstall test_installer`` it should print something
|
||||||
start=Size(value=2048, unit=<Unit.sectors: 'sectors'>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
start=Size(value=2048, unit=<Unit.sectors: 'sectors'>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
||||||
length=Size(value=535822336, unit=<Unit.B: 1>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
length=Size(value=535822336, unit=<Unit.B: 1>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
|
||||||
flags=[
|
flags=[
|
||||||
<PartitionFlag.Boot: flag_id=1, alias=None>,
|
<PartitionFlag.BOOT: flag_id=1, alias=None>,
|
||||||
<PartitionFlag.ESP: flag_id=18, alias=None>
|
<PartitionFlag.ESP: flag_id=18, alias=None>
|
||||||
],
|
],
|
||||||
partn=1,
|
partn=1,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ boot_partition = disk.PartitionModification(
|
||||||
length=disk.Size(512, disk.Unit.MiB, device.device_info.sector_size),
|
length=disk.Size(512, disk.Unit.MiB, device.device_info.sector_size),
|
||||||
mountpoint=Path('/boot'),
|
mountpoint=Path('/boot'),
|
||||||
fs_type=disk.FilesystemType.Fat32,
|
fs_type=disk.FilesystemType.Fat32,
|
||||||
flags=[disk.PartitionFlag.Boot]
|
flags=[disk.PartitionFlag.BOOT]
|
||||||
)
|
)
|
||||||
device_modification.add_partition(boot_partition)
|
device_modification.add_partition(boot_partition)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue