I'm burning a disk without using rpi-imager*, trying to stuff my own /boot/firmware/user-data into it and having some problems.
I'm hoping that someone with some cloud-init experience could lend some assistance.
The disk ends up with /boot/firmware/user-data contents:After the system boots, the user 'blsxyz' is not created. If I look in /var/log/cloud-init.log I seeWhy is it getting this set of errors? Why is cloud-init not trapping all these python errors and reporting them nicely?
Thanks!
I'm hoping that someone with some cloud-init experience could lend some assistance.
The disk ends up with /boot/firmware/user-data contents:
Code:
#cloud-confighostname: pitmanage_etc_hosts: truepackages:- avahi-daemonapt: conf: | Acquire { Check-Date "false"; };timezone: America/Los_Angeleskeyboard: model: pc105 layout: "us"enable_ssh: trueusers: - name: blsxyz groups: users,adm,dialout,audio,netdev,video,plugdev,cdrom,games,input,gpio,spi,i2c,render,sudo shell: /bin/bash lock_passwd: false passwd: $y$jB5$BVJN8BbGNtqG/J2PIV3PL/$AkDVbIyLSIgZ2DVkZk4AibSdbFScIy91h2w/XEC8MMA ssh_authorized_keys: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL47EYszr9zbpijGZ96LVSeD7jO1rK27nrBDhXFLFnN6 bls sudo: ALL=(ALL) NOPASSWD:ALLrpi: interfaces: serial: trueruncmd: - [ rfkill, unblock, wifi ] - [ sh, -c, "for f in /var/lib/systemd/rfkill/*:wlan; do echo 0 > \"$f\"; done" ] Code:
2025-12-08 20:30:24,188 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/nocloud/sem/config_users_groups - wb: [644] 24 bytes2025-12-08 20:30:24,188 - helpers.py[DEBUG]: Running config-users_groups using lock (<FileLock using file '/var/lib/cloud/instances/nocloud/sem/config_users_groups'>)2025-12-08 20:30:24,188 - subp.py[DEBUG]: Running command ['/usr/lib/userconf-pi/userconf', 'blsxyz', '$y$jB5$BVJN8BbGNtqG/J2PIV3PL/$AkDVbIyLSIgZ2DVkZk4AibSdbFScIy91h2w/XEC8MMA'] with allowed return codes [0] (shell=False, capture=True)2025-12-08 20:30:25,441 - performance.py[DEBUG]: Running ['/usr/lib/userconf-pi/userconf', 'blsxyz', '$y$jB5$BVJN8BbGNtqG/J2PIV3PL/$AkDVbIyLSIgZ2DVkZk4AibSdbFScIy91h2w/XEC8MMA'] took 1.253 seconds2025-12-08 20:30:25,441 - subp.py[DEBUG]: Running command ['systemctl', 'mask', 'userconfig.service', '--now'] with allowed return codes [0] (shell=False, capture=True)2025-12-08 20:30:25,730 - performance.py[DEBUG]: Running ['systemctl', 'mask', 'userconfig.service', '--now'] took 0.289 seconds2025-12-08 20:30:25,730 - subp.py[DEBUG]: Running command ['usermod', '-s', '/bin/bash', 'blsxyz'] with allowed return codes [0] (shell=False, capture=True)2025-12-08 20:30:25,732 - handlers.py[DEBUG]: finish: init-local/config-users_groups: FAIL: running config-users_groups with frequency once-per-instance2025-12-08 20:30:25,732 - log_util.py[WARNING]: Running module users_groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failed2025-12-08 20:30:25,733 - log_util.py[DEBUG]: Running module users_groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failedTraceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 297, in _run_modules ran, _r = cc.run( ~~~~~~^ run_name, mod.handle, func_args, freq=freq ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 71, in run return self._runners.run(name, functor, args, freq, clear_on_fail) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 156, in run results = functor(**args) File "/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py", line 80, in handle cloud.distro.create_user(user, **config) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line 871, in create_user pre_existing_user = not self.add_user(name, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/cloudinit/distros/raspberry_pi_os.py", line 100, in add_user subp.subp(["usermod", "-s", kwargs["shell"], name]) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 291, in subp raise ProcessExecutionError( stdout=out, stderr=err, exit_code=rc, cmd=args )cloudinit.subp.ProcessExecutionError: Unexpected error while running command.Command: ['usermod', '-s', '/bin/bash', 'blsxyz']Exit code: 6Reason: -Stdout: Stderr: usermod: user 'blsxyz' does not existThanks!
Statistics: Posted by bls — Mon Dec 08, 2025 8:34 pm — Replies 2 — Views 105