This is not a curtin bug. In your config, you're providing a late_commands which invoke grep and do not eat the return code, so if grep fails to find it's query, it returns 1 and this fails the install (one or more of the late_commands failed).
From config:
late_commands: 01_efivars: - grep - efi - /proc/mounts 02_efimnt: - mountpoint - /sys/firmware/efi/efivars 03_hexdump: - curtin - in-target - -- - sh - -c - 'grep efi /proc/mounts
From the install log we can see install was OK, but late_commands which run after install is complete failed:
Installation finished. No error reported. Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False) Running command ['umount', '/tmp/tmpmg3cwxp7/target/sys'] with allowed return codes [0] (capture=False) Running command ['umount', '/tmp/tmpmg3cwxp7/target/proc'] with allowed return codes [0] (capture=False) Running command ['umount', '/tmp/tmpmg3cwxp7/target/dev'] with allowed return codes [0] (capture=False) finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: SUCCESS: curtin command curthooks start: cmd-install/stage-hook/builtin/cmd-hook: curtin command hook Finalizing /tmp/tmpmg3cwxp7/target finish: cmd-install/stage-hook/builtin/cmd-hook: SUCCESS: curtin command hook curtin: Installation failed with exception: Unexpected error while running command. Command: ['grep', 'efi', '/proc/mounts'] Exit code: 1
This is not a curtin bug. In your config, you're providing a late_commands which invoke grep and do not eat the return code, so if grep fails to find it's query, it returns 1 and this fails the install (one or more of the late_commands failed).
From config:
late_commands: efi/efivars
01_efivars:
- grep
- efi
- /proc/mounts
02_efimnt:
- mountpoint
- /sys/firmware/
03_hexdump:
- curtin
- in-target
- --
- sh
- -c
- 'grep efi /proc/mounts
From the install log we can see install was OK, but late_commands which run after install is complete failed:
Installation finished. No error reported. p7/target/ sys'] with allowed return codes [0] (capture=False) p7/target/ proc'] with allowed return codes [0] (capture=False) p7/target/ dev'] with allowed return codes [0] (capture=False) stage-curthooks /builtin/ cmd-curthooks: SUCCESS: curtin command curthooks stage-hook/ builtin/ cmd-hook: curtin command hook 7/target stage-hook/ builtin/ cmd-hook: SUCCESS: curtin command hook
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpmg3cwx
Running command ['umount', '/tmp/tmpmg3cwx
Running command ['umount', '/tmp/tmpmg3cwx
finish: cmd-install/
start: cmd-install/
Finalizing /tmp/tmpmg3cwxp
finish: cmd-install/
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['grep', 'efi', '/proc/mounts']
Exit code: 1