Skip to content

[BUG]: --cli --cloudinit-config doesn't appear to do anything #1385

@NorthIsUp

Description

@NorthIsUp

What happened?

when running the following command the image is written but the user-data and network-config files are never actually copied anywhere

/Applications/Raspberry\ Pi\ Imager.app/Contents/MacOS/rpi-imager \
    --cli --debug \
    --cloudinit-userdata=cloudinit/user-data \
    --cloudinit-networkconfig=cloudinit/network-config \
    /tmp/raspbian-images/2025-12-04-raspios-trixie-arm64-lite.img \
    /dev/disk6

Version

2.0.2 (Default)

What host operating system were you using?

macOS

Host OS Version

26.1 (25B78)

Selected OS

Trixie

Which Raspberry Pi Device are you using?

Raspberry Pi 5, 500, and Compute Modules 5

What kind of storage device are you using?

microSD Card in an internal reader

OS Customisation

  • Yes, I was using OS Customisation when the bug occurred.

Relevant log output

/Applications/Raspberry\ Pi\ Imager.app/Contents/MacOS/rpi-imager \
    --cli --debug \
    --cloudinit-userdata=cloudinit/user-data \
    --cloudinit-networkconfig=cloudinit/network-config \
    /tmp/raspbian-images/2025-12-04-raspios-trixie-arm64-lite.img \
    /dev/disk6
Loading cache settings:
  Caching enabled: true
  Last file name: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache"
  Uncompressed hash (extract_sha256): "d2a54d6a13e95603fc70f332c87b9f4cebfafaa2d14da5708e183f1089697852"
  Compressed hash (image_download_sha256): "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
Loaded cache file info: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache" ( 511063968 bytes)
CacheManager initialized with background thread
Starting background cache operations
Found cached file info, starting background verification: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache"
Background: Checking disk space for cache operations
Starting cache verification:
  File name: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache"
  Expected uncompressed hash (extract_sha256): "d2a54d6a13e95603fc70f332c87b9f4cebfafaa2d14da5708e183f1089697852"
  Hash to verify (image_download_sha256): "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
  Custom cache: false
Starting background drive list polling
Background: Cache directory: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager"
Background: Available space: 2593 GiB
Background: Starting cache file verification for "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache"
Detected total system memory: 131072 MB on "macOS"
Background: Cache verification using 3072 KB buffer for 487 MiB file
Custom config.txt entries: ""
Custom cmdline.txt entries: ""
Custom firstrun.sh: ""
Cloudinit: "#cloud-config\n# host\nhostname: proxy3\nmanage_etc_hosts: true\n\n# users\nusers:\n    - name: max\n      groups: users,adm,dialout,audio,netdev,video,plugdev,cdrom,games,input,gpio,spi,i2c,render,sudo\n      shell: /bin/zsh\n      lock_passwd: false\n      passwd: $6$ocmRGLZXjQn3Oiio$LMow.pO7BjeRvYLiwycXWriaGB/04XWi6HhMMKYZCjvi3QvA/9JN9y0q1ILAk/1LONU9sGTTafLhE7reh.FWK0\n      ssh_authorized_keys:\n          - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDgGI0m4EQbuzGLRRo74zpIg6pfz0T64ZRiVbCVcfjHl\n      sudo: ALL=(ALL) NOPASSWD:ALL\n\n# apt\napt:\n    # sources:\n    #     # how to get the key id:\n    #     #   the line starting with \"fpr\" is the key id, retreive with:\n    #     #   curl -L https://pkgs.tailscale.com/stable/debian/trixie.noarmor.gpg \\\n    #     #   | gpg --with-fingerprint --with-colons \\\n    #     #   | awk -F: '/^fpr/ { print $10 }'\n    #     #\n    #     # check if the key is listed with a keyserver\n    #     #   gpg --keyserver=keyserver.ubuntu.com --recv-keys 2596A99EAAB33821893C0A79458CA832957F5868\n    #     tailscale:\n    #         # keyurl: https://pkgs.tailscale.com/stable/debian/trixie.noarmor.gpg\n    #         # keyid: 2596A99EAAB33821893C0A79458CA832957F5868\n    #         # keyserver: keyserver.ubuntu.com\n    #         source: \"deb https://pkgs.tailscale.com/stable/debian trixie main\"\n    conf: |\n        Acquire {\n          Check-Date \"false\";\n        };\n\n# packages\npackage_update: true\npackage_upgrade: true\npackages:\n    - avahi-daemon\n    - curl\n    - zsh\n    - podman\n    - git\n    - curl\n    - vim\n    - software-properties-common\n\ntimezone: America/Los_Angeles\nkeyboard:\n    model: pc105\n    layout: \"us\"\n\nrpi:\n    enable_ssh: true\n    interfaces:\n        serial: true\nssh_pwauth: true\n\n# Write files to the instance (defer: true waits until user exists)\nwrite_files:\n    - path: /home/max/.zshrc\n      owner: max:max\n      permissions: \"0644\"\n      defer: true\n      content: |\n          # ~/.zshrc file for a simple server setup\n\n          # --- Zsh Options ---\n          # Change directory just by typing its name (e.g., typing '..' instead of 'cd ..')\n          setopt autocd\n\n          # Allow comments in interactive mode\n          setopt interactivecomments\n\n          # Do not show an error message if a pattern has no matches (useful for globs)\n          setopt nonomatch\n\n          # Enable command substitution in the prompt\n          setopt promptsubst\n\n          # Append history lines to the history file immediately\n          setopt inc_append_history\n\n          # Share history between all sessions\n          setopt share_history\n\n          # --- History Configuration ---\n          HISTFILE=~/.zsh_history # Location of the history file\n          HISTSIZE=10000         # Number of history entries to keep in memory\n          SAVEHIST=10000         # Number of history entries to save to the file\n\n          # Make history search in reverse chronological order\n          bindkey \"^[[A\" history-beginning-search-backward\n          bindkey \"^[[B\" history-beginning-search-forward\n\n          # --- Environment Variables & Aliases ---\n\n          # Set a basic editor if one isn't already set (e.g., nano is generally available on servers)\n          export EDITOR=${EDITOR:-nano}\n\n          # Enable colors for various commands\n          alias ls='ls --color=auto -hv'\n          alias grep='grep --color=auto'\n          alias ip='ip -c=auto'\n\n          # Common navigation and listing aliases\n          alias ll='ls -l'\n          alias la='ls -lA'\n          alias ..='cd ..'\n\n          # cloud-init helpers\n          alias re-runcmd='/var/lib/cloud/instance/scripts/runcmd'\n          alias re-cloud-init='sudo cloud-init clean --logs --reboot'\n\n          # --- Prompt Configuration ---\n          # A simple, informative prompt showing the hostname in brackets and the current directory\n          # This helps you know immediately if you are on a remote server\n          PS1=\"[%m] %~%# \"\n          # %m: the hostname\n          # %~: the current working directory (shortened)\n          # %#: a # if root, a % otherwise\n    - path: /home/max/dante-proxy/sockd.conf\n      owner: max:max\n      permissions: \"0644\"\n      defer: true\n      content: |\n          logoutput: stderr\n\n          # Network interfaces\n          internal: 0.0.0.0 port=1080\n          external: eth0\n\n          # Authentication methods\n          socksmethod: none\n          clientmethod: none\n\n          # User settings\n          user.privileged: root\n          user.notprivileged: nobody\n\n          # Client rules - who can connect to the proxy\n          client pass {\n            from: 0.0.0.0/0 to: 0.0.0.0/0\n            log: error connect disconnect\n          }\n\n          # Socks rules - allow all destinations\n          socks pass {\n            from: 0.0.0.0/0 to: 0.0.0.0/0\n            log: error connect disconnect\n          }\n\n    - path: /home/max/dante-proxy/Dockerfile\n      owner: max:max\n      permissions: \"0644\"\n      defer: true\n      content: |\n          FROM alpine:3\n\n          # Install Dante server\n          RUN apk --no-cache add dante-server\n\n          # Create config directory\n          RUN mkdir -p /etc/sockd\n\n          # Copy in the sockd configuration\n          COPY sockd.conf /etc/sockd/sockd.conf\n\n          # Expose the proxy port\n          EXPOSE 1080\n\n          # Run the SOCKS server\n          CMD [\"sockd\", \"-f\", \"/etc/sockd/sockd.conf\"]\n\nruncmd:\n    - systemctl mask userconfig.service\n    - systemctl disable userconfig.service\n    - systemctl start ssh\n\n    # tailscale setup\n    - echo \"========= tailscale\"\n    - | # Set sysctl settings for IP forwarding (useful when configuring an exit node)\n        echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf \\\n        && echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf \\\n        && sudo sysctl -p /etc/sysctl.d/99-tailscale.conf\n    - | # One-command install, from https://tailscale.com/download/\n        curl -fsSL https://tailscale.com/install.sh | sh && \\\n        tailscale up \\\n            --auth-key=tskey-auth-kiay3L6Qx711CNTRL-uaQFBsy4TZD1QKrdHrNtYDJcKjVAVTKM \\\n            --ssh\n\n    # podman setup\n    - echo \"========= podman\"\n    - systemctl enable podman.socket\n    - systemctl start podman.socket\n    # proxy setup\n    - echo \"========== proxy\"\n    - |\n        podman build \\\n            -f /home/max/dante-proxy/Dockerfile \\\n            -t dante-proxy:latest \\\n            /home/max/dante-proxy\n    - |\n        podman run \\\n            -d \\\n            -p 1080:1080 \\\n            -v /home/max/dante-proxy/sockd.conf:/etc/sockd/sockd.conf:ro \\\n            --name dante-proxy \\\n            dante-proxy:latest\n    - podman generate systemd --name dante-proxy > /etc/systemd/system/dante.service\n    # proxy autoload\n    - systemctl daemon-reload\n    - systemctl enable dante.service\n\nfinal_message: \"The system is up, after $UPTIME seconds\"\n\n# Reboot the instance after configuration\npower_state:\n    mode: reboot\n    message: Rebooting after initial setup\n    timeout: 30\n    condition: True\n"
Advanced options: QFlags<ImageOptions::AdvancedOption>(NoAdvancedOptions)
Device selection changed to: "/dev/disk6"
Disk space check complete: 2593 GiB available in "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager"
Adaptive sync configuration: "High memory (131072MB)" - Sync interval: 256 MB - Time interval: 7000 ms - Platform: "macOS"
Optimal write buffer size: 8192 KB for 131072 MB system
Using buffer size: 8388608 bytes with page size: 16384 bytes
Optimal write buffer size: 8192 KB for 131072 MB system
Unmounting: "/dev/disk6"
Opening macOS device: /dev/disk6
Device path detected, using macOS authorization...
Background: Cache verification complete
  File size: 511063968 bytes
  Expected hash: "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
  Computed hash: "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
  Valid: true
Cache verification complete for "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache" - Valid: true
Updated cache status after verification:
  isValid: true
  verificationComplete: true
  cacheFileName: "/Users/adam/Library/Caches/Raspberry Pi/Raspberry Pi Imager/lastdownload.cache"
  cachedHash (uncompressed, extract_sha256): "d2a54d6a13e95603fc70f332c87b9f4cebfafaa2d14da5708e183f1089697852"
  cacheFileHash (compressed, image_download_sha256): "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
  verified against hash: "681a775e20b53a9e4c7341d748a5a8cdc822039d8c67c1fd6ca35927abbe6290"
Emitting cacheFileUpdated signal after successful verification
Received cacheFileUpdated signal - refreshing UI for hash: "d2a54d6a13e95603fc70f332c87b9f4cebfafaa2d14da5708e183f1089697852"
RECEIVED SIZE: 2
SCMRIGHTS
fd received: 12
Successfully opened device with authorization, fd=13
Zeroing out first and last MB of drive
Done zero'ing out start and end of drive. Took 0 seconds
File can be handled by libarchive as archive format
Started progress updates after successful drive opening
_writeFile: captured first block ( 8388608 ) and advanced file offset via seek
Performing periodic sync at 33554432 bytes written ( 33554432 bytes since last sync, 7267 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 117440512 bytes written ( 83886080 bytes since last sync, 7557 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 201326592 bytes written ( 83886080 bytes since last sync, 7533 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 285212672 bytes written ( 83886080 bytes since last sync, 7538 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 369098752 bytes written ( 83886080 bytes since last sync, 7528 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 452984832 bytes written ( 83886080 bytes since last sync, 7511 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 536870912 bytes written ( 83886080 bytes since last sync, 7529 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 620756992 bytes written ( 83886080 bytes since last sync, 7552 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 704643072 bytes written ( 83886080 bytes since last sync, 7522 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 788529152 bytes written ( 83886080 bytes since last sync, 7508 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 872415232 bytes written ( 83886080 bytes since last sync, 7522 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 956301312 bytes written ( 83886080 bytes since last sync, 7521 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1040187392 bytes written ( 83886080 bytes since last sync, 7524 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1124073472 bytes written ( 83886080 bytes since last sync, 7519 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1207959552 bytes written ( 83886080 bytes since last sync, 7500 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1291845632 bytes written ( 83886080 bytes since last sync, 7502 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1375731712 bytes written ( 83886080 bytes since last sync, 7503 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1459617792 bytes written ( 83886080 bytes since last sync, 7506 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1543503872 bytes written ( 83886080 bytes since last sync, 7499 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1627389952 bytes written ( 83886080 bytes since last sync, 7512 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1711276032 bytes written ( 83886080 bytes since last sync, 7517 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1795162112 bytes written ( 83886080 bytes since last sync, 7504 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1879048192 bytes written ( 83886080 bytes since last sync, 7511 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 1962934272 bytes written ( 83886080 bytes since last sync, 7512 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2046820352 bytes written ( 83886080 bytes since last sync, 7509 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2130706432 bytes written ( 83886080 bytes since last sync, 7510 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2214592512 bytes written ( 83886080 bytes since last sync, 7508 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2298478592 bytes written ( 83886080 bytes since last sync, 7513 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2382364672 bytes written ( 83886080 bytes since last sync, 7496 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2466250752 bytes written ( 83886080 bytes since last sync, 7517 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2550136832 bytes written ( 83886080 bytes since last sync, 7511 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2634022912 bytes written ( 83886080 bytes since last sync, 7494 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2717908992 bytes written ( 83886080 bytes since last sync, 7535 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2801795072 bytes written ( 83886080 bytes since last sync, 7502 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2885681152 bytes written ( 83886080 bytes since last sync, 7508 ms elapsed) on "macOS"
Periodic sync completed successfully
Performing periodic sync at 2969567232 bytes written ( 83886080 bytes since last sync, 7504 ms elapsed) on "macOS"
Periodic sync completed successfully
Hash of uncompressed image: "9d6859c61292c7ea6cd4a5ed15c71b800aec4c63933e2a674954af544165f0b0"
Write done in 267 seconds
DownloadExtractThread::_verify() called (child class implementation with progress updates)
Post-write verification using 6144 KB buffer for 2848 MB image
Verify hash: "9d6859c61292c7ea6cd4a5ed15c71b800aec4c63933e2a674954af544165f0b0"
Verify done in 82.079 seconds
Writing first block (which we skipped at first)
Write successful.
Stopping background drive list polling
Cleaning up CacheManager
CacheManager destructor: cleaning up background thread
CacheManager destructor: cleanup complete
Cancelling running thread in ImageWriter destructor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions