Ejemplo n.º 1
0
    def setDefaultPartitioning(self, storage):
        autorequests = [
            PartSpec(mountpoint="/",
                     fstype=storage.defaultFSType,
                     size=Size("1GiB"),
                     maxSize=Size("3GiB"),
                     grow=True,
                     lv=True)
        ]

        bootreqs = platform.setDefaultPartitioning()
        if bootreqs:
            autorequests.extend(bootreqs)

        disk_space = getAvailableDiskSpace(storage)
        swp = swap.swapSuggestion(disk_space=disk_space)
        autorequests.append(
            PartSpec(fstype="swap",
                     size=swp,
                     grow=False,
                     lv=True,
                     encrypted=True))

        for autoreq in autorequests:
            if autoreq.fstype is None:
                if autoreq.mountpoint == "/boot":
                    autoreq.fstype = storage.defaultBootFSType
                    autoreq.size = Size("300MiB")
                else:
                    autoreq.fstype = storage.defaultFSType

        storage.autoPartitionRequests = autorequests
Ejemplo n.º 2
0
    def setDefaultPartitioning(self, storage):
        autorequests = [
            PartSpec(mountpoint="/",
                     fstype=storage.default_fstype,
                     size=Size("1GiB"),
                     max_size=Size("50GiB"),
                     grow=True,
                     btr=True,
                     lv=True,
                     thin=True,
                     encrypted=True),
            PartSpec(mountpoint="/home",
                     fstype=storage.default_fstype,
                     size=Size("500MiB"),
                     grow=True,
                     required_space=Size("50GiB"),
                     btr=True,
                     lv=True,
                     thin=True,
                     encrypted=True)
        ]

        bootreqs = platform.set_default_partitioning()
        if bootreqs:
            autorequests.extend(bootreqs)

        disk_space = getAvailableDiskSpace(storage)
        swp = swap_suggestion(disk_space=disk_space)
        autorequests.append(
            PartSpec(fstype="swap",
                     size=swp,
                     grow=False,
                     lv=True,
                     encrypted=True))

        for autoreq in autorequests:
            if autoreq.fstype is None:
                if autoreq.mountpoint == "/boot":
                    autoreq.fstype = storage.default_boot_fstype
                else:
                    autoreq.fstype = storage.default_fstype

        storage.autopart_requests = autorequests