1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-16 21:05:10 +03:00
pmbootstrap/pmb/core
Casey Connolly ecf1d54e39 WIP: install: rootless disk image
Refactor the install code to stop using loop devices and instead create
and manipulate a disk image directly. Both ext4 and vfat have mechanisms
for formatting and populating partitions at an offset inside an image,
other filesystems likely do as well but so far have not been implemented
or tested.

With this "pmbootstrap install" works for standard EFI disk images (e.g.
QEMU, X64 or trailblazer) entirely rootless.

Since the creation of the disk images happens in the same user namespace
as everything else, the resulting disk images have correct ownership and
permissions even though from the host perspective they are all subuids.

This gets image building working properly *for the default case*. We can
now build disk images! In particular, we can build disk images with a 4k
sector size even on a host with a 512 byte sector size (or block size in
the filesystem). This is surprisingly hard for some reason since not all
libfdisk tools have the right flags. Thankfully sfdisk does.

In addition, we now generate UUIDs ourselves, to break the loop between
generating fstab and running mkfs (since we also populate the disk image
/with/ mkfs, we need to already know the UUID when we run it...).

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
2025-06-13 21:47:42 +02:00
..
__init__.py pmb: Use explicit re-exports (MR 2545) 2025-02-23 11:40:44 +01:00
apkindex_block.py Improvements to documentation (MR 2440) 2024-10-21 21:46:26 +02:00
arch.py pmb.arch: Add support for s390x 2025-05-25 11:32:01 +02:00
chroot.py Revert "chroot: allow mounting the device rootfs (MR 2252)" 2025-05-30 21:29:28 +02:00
config.py pmb.core.config: remove +1 from nproc defaults 2025-05-11 17:28:35 +02:00
context.py WIP: install: rootless disk image 2025-06-13 21:47:42 +02:00
dps.py pmb.core: add Discoverable Partitions Specification file (MR 2426) 2024-10-13 19:59:26 +02:00
package_metadata.py core: small typing improvement 2025-04-11 17:19:10 +02:00
pkgrepo.py docs, pmb: Add missing copyright headers (MR 2516) 2025-01-02 16:45:03 +01:00