From 0bca7555d795d566ea4c0c9745bac235e360413c Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Sun, 13 Apr 2025 11:36:28 +0200 Subject: [PATCH] pmb.netboot: Initialize chroot before checking path in chroot Otherwise with zapped chroots, the check will fail and pmbootstrap won't be able to locate the netboot image. Fixes: d01f6b90 ("pmb.netboot: Only attempt to install nbd after rootfs existance check (MR 2540)") Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2583 --- pmb/netboot/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pmb/netboot/__init__.py b/pmb/netboot/__init__.py index 72ae5d84..8485d44d 100644 --- a/pmb/netboot/__init__.py +++ b/pmb/netboot/__init__.py @@ -20,6 +20,7 @@ def start_nbd_server(device: str, replace: bool, ip: str = "172.16.42.2", port: """ chroot = Chroot.native() + pmb.chroot.init(chroot) rootfs_path = Path("/mnt/pmbootstrap/netboot") / f"{device}.img" if not (chroot / rootfs_path).exists() or replace: