pmb/netboot: new feature (MR 2064)

pmbootstrap netboot command exposes the generated vendor-codename.img
rootfs through nbd interface so that device can mount it and boot
postmarketOS without having any storage medium at all.

Co-authored-by: Luca Weiss <luca@z3ntu.xyz>
This commit is contained in:
Mark Hargreaves 2021-07-01 18:16:34 +03:00 committed by Oliver Smith
parent 997e3fb1f5
commit 47539f1bef
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 96 additions and 2 deletions

View file

@ -29,6 +29,7 @@ import pmb.helpers.aportupgrade
import pmb.helpers.status
import pmb.install
import pmb.install.blockdevice
import pmb.netboot
import pmb.parse
import pmb.qemu
@ -140,6 +141,11 @@ def sideload(args):
args.packages)
def netboot(args):
if args.action_netboot == "serve":
pmb.netboot.start_nbd_server(args)
def chroot(args):
# Suffix
suffix = _parse_suffix(args)
@ -543,7 +549,7 @@ def zap(args):
distfiles=args.distfiles, pkgs_local=args.pkgs_local,
pkgs_local_mismatch=args.pkgs_local_mismatch,
pkgs_online_mismatch=args.pkgs_online_mismatch,
rust=args.rust)
rust=args.rust, netboot=args.netboot)
# Don't write the "Done" message
pmb.helpers.logging.disable()