forked from Mirror/pmbootstrap
pmb/install: Add option to create single combined boot/root partition
With recent rework in postmarketos-initramfs, we no longer need to mount the /boot partition in the initramfs (assuming initramfs-extra is not used). On devices that boot without accessing the boot file system (e.g. Android boot images, fastboot, ...), that makes it possible to install postmarketOS on a single (potentially encrypted) partition that contains both root (/) and /boot files. This avoids the extra complexity of the subpartition setup we usually use on such devices, and also avoids having to flash two partitions (when using --split to avoid the subpartitions). Add a --single-partition option to pmbootstrap install that allows installing postmarketOS in this mode. For now this is just an option that must be selected explicitly, in the future we could choose to make this the default for Android-based devices with a large enough boot partition. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2512
This commit is contained in:
parent
ec0163ce63
commit
e9038e50d6
4 changed files with 88 additions and 38 deletions
|
@ -120,6 +120,14 @@ def arguments_install(subparser: argparse._SubParsersAction) -> None:
|
|||
choices=[512, 2048, 4096],
|
||||
)
|
||||
|
||||
ret.add_argument(
|
||||
"--single-partition",
|
||||
action="store_true",
|
||||
help="Create a single partition that contains both boot and root files."
|
||||
" This can be used on devices that boot without mounting the boot file"
|
||||
" system (e.g. Android boot images or fastboot).",
|
||||
)
|
||||
|
||||
# Image type
|
||||
group_desc = ret.add_argument_group(
|
||||
"optional image type",
|
||||
|
|
|
@ -118,6 +118,7 @@ class Deviceinfo:
|
|||
# bootloader
|
||||
flash_method: str = ""
|
||||
boot_filesystem: str | None = ""
|
||||
create_initfs_extra: bool | None = False
|
||||
|
||||
# flash
|
||||
flash_heimdall_partition_kernel: str | None = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue