forked from Mirror/pmbootstrap
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
This commit is contained in:
parent
2177271fc8
commit
0bca7555d7
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue