MCPcopy Create free account
hub / github.com/archlinux/archinstall / process_root_partition_size

Function process_root_partition_size

archinstall/lib/disk/disk_menu.py:568–580  ·  view source on GitHub ↗
(total_size: Size, sector_size: SectorSize)

Source from the content-addressed store, hash-verified

566
567
568def process_root_partition_size(total_size: Size, sector_size: SectorSize) -> Size:
569 # root partition size processing
570 total_device_size = total_size.convert(Unit.GiB)
571 if total_device_size.value > 500:
572 # maximum size
573 return Size(value=50, unit=Unit.GiB, sector_size=sector_size)
574 elif total_device_size.value < 320:
575 # minimum size
576 return Size(value=32, unit=Unit.GiB, sector_size=sector_size)
577 else:
578 # 10% of total size
579 length = total_device_size.value // 10
580 return Size(value=length, unit=Unit.GiB, sector_size=sector_size)
581
582
583def get_default_btrfs_subvols() -> list[SubvolumeModification]:

Callers 2

suggest_lvm_layoutFunction · 0.85

Calls 2

SizeClass · 0.90
convertMethod · 0.80

Tested by

no test coverage detected