forked from Mirror/pmbootstrap
pmbootstrap install --ondev: new option (MR 1946)
Add initial support for the on-device installer in pmbootstrap. Let pmbootstrap create a regular split image, then prepare a new installer rootfs and copy the previously generated rootfs image into the installer rootfs. Put the installer rootfs into a new image, with reserved space. There is more to do from here, such as disabling the generation of the user account when using --ondev. But this requires support in postmarketos-ondev first, so let's build that iteratively. Related: https://wiki.postmarketos.org/wiki/On-device_installer Related: https://gitlab.com/postmarketOS/postmarketos-ondev/-/issues
This commit is contained in:
parent
8fb69f9c46
commit
ddb5d9ae2c
6 changed files with 90 additions and 8 deletions
|
@ -67,10 +67,11 @@ def shutdown(args, only_install_related=False):
|
|||
path = path_outside[len(chroot):]
|
||||
pmb.install.losetup.umount(args, path, auto_init=False)
|
||||
|
||||
# Umount device rootfs chroot
|
||||
chroot_rootfs = args.work + "/chroot_rootfs_" + args.device
|
||||
if os.path.exists(chroot_rootfs):
|
||||
pmb.helpers.mount.umount_all(args, chroot_rootfs)
|
||||
# Umount device rootfs and installer chroots
|
||||
for prefix in ["rootfs", "installer"]:
|
||||
path = f"{args.work}/chroot_{prefix}_{args.device}"
|
||||
if os.path.exists(path):
|
||||
pmb.helpers.mount.umount_all(args, path)
|
||||
|
||||
if not only_install_related:
|
||||
# Umount all folders inside args.work
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue