Skip to content

Blockers for ParticleOS remote builds + netboot via netesp #80

@bluca

Description

@bluca

List of issues found when booting a netesp in vmspawn, and pointing to a uki-url that points to a particleos uki that sits next to a particleos ddi

  • sd-repart does not run due to missing conditions:
  Condition: start condition unmet at Fri 2025-09-26 14:44:31 UTC; 4min 21s ago
             ├─ ConditionDirectoryNotEmpty=|/usr/lib/repart.d was not met
             ├─ ConditionDirectoryNotEmpty=|/usr/local/lib/repart.d was not met
             ├─ ConditionDirectoryNotEmpty=|/etc/repart.d was not met
             ├─ ConditionDirectoryNotEmpty=|/run/repart.d was not met
             ├─ ConditionDirectoryNotEmpty=|/sysusr/usr/lib/repart.d was not met
             └─ ConditionDirectoryNotEmpty=|/sysusr/usr/local/lib/repart.d was not met

as the DDI's /usr is not mounted in /sysusr despite having been downlaoded and attached:

● systemd-loop@run-machines-rootdisk.raw.service - Attach File /run/machines/rootdisk.raw to Loopback Block Device
     Loaded: loaded (/usr/lib/systemd/system/systemd-loop@.service; enabled-runtime; preset: disabled)
     Active: active (exited) since Fri 2025-09-26 14:44:38 UTC; 2min 32s ago

this is with rd.systemd.pull=raw,machine,verify=no,blockdev,bootorigin:rootdisk:ParticleOS__x86-64.raw in the kernel cmdline

Aug 24 22:00:56 particle-132b-861e systemd[1]: Starting systemd-repart.service - Repartition Root Disk...
Aug 24 22:00:56 particle-132b-861e systemd-repart[397]: No machine ID set, using randomized partition UUIDs.
Aug 24 22:00:56 particle-132b-861e systemd-repart[397]: Can't fit requested partitions into available free space (0B), refusing.
Aug 24 22:00:56 particle-132b-861e systemd-repart[397]: Automatically determined minimal disk image size as 17.7G, current image size is 2.9G.
Aug 24 22:00:56 particle-132b-861e systemd[1]: systemd-repart.service: Main process exited, code=exited, status=1/FAILURE

needs to be pointed manually to the actual disk (ie: where the ESP is, should be able to find it automatically)

root@particle-132b-861e:~# systemd-repart --dry-run=no /dev/vda
No machine ID set, using randomized partition UUIDs.
Unable to automatically discover suitable partition to copy blocks from for partition type usr-verity-sig.

rd.systemd.pull=raw,machine,verify=no,blockdev,bootorigin:rootdisk:ParticleOS_x86-64.raw.zst

we should probably synthetize this from sd-boot if a uki-url entry is booted?
And the image name should be derived from the UKI filename + .raw + the default compression method, if not specified

  • sd-importd fails when it runs twice, which is common when debugging in the emergency console in the initrd
Aug 24 22:09:28 particle-132b-861e systemd-importd[561]: (transfer1) Image 'rootdisk' already exists.
Aug 24 22:09:28 particle-132b-861e systemd-importd[561]: Transfer process failed with exit code 1.
  • sd-importd and systemd-import@run-machines-rootdisk.raw.service sometimes fail to communicate and the latter fails, often when the network is slow and the latter times out. While it's receiving progress, it should probably avoid timing out?
Aug 24 18:58:38 particle-a19d-b14a systemd[1]: Starting systemd-import@run-machines-rootdisk.raw.service - Download of http://downloadcontentcdn.opensuse.org/repositories/system:/systemd/Debian_Testing_images/ParticleOS_x86-64.raw.zst...
Aug 24 18:59:23 particle-a19d-b14a varlinkctl[354]: Method call failed: Connection timed out
Aug 24 18:59:23 particle-a19d-b14a systemd-importd[355]: (transfer1) Got 35% of http://downloadcontentcdn.opensuse.org/repositories/system:/systemd/Debian_Testing_images/ParticleOS_x86-64.raw.zst. 1min 23s left at 3.5M/s.
Aug 24 18:59:23 particle-a19d-b14a systemd-importd[355]: Cannot emit log message varlink message, ignoring: Transport endpoint is not connected
  • root=dissect and mount.usr=dissect do not work with the sd-import download hooks, after systemd-import@run-machines-rootdisk.raw.service completes there's no /dev/disk/by-designator/ that refers to the downloaded and opened DDI
  • not sure if a repart or vmspawn issue, but booting the netesp with vmspawn --grow does not rewrite the GPT table, so repart still thinks there's no space and refuses to copy the partitions. Just running fdisk /dev/vda is enough to fix the GPT and make it recognize the full grown disk, and then repart can run. Not sure if repart should do this automatically, or vmspawn should do this when truncating a disk to new size, or both vmspawn: also adjust GPT headers with --grow systemd#38738

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions