Thanks, @Anton - We've been using this trickery in early-commands to customize the autoinstall yaml file and it seems to work in late-commands as well.
One related note that may help others. By the time late-commands is called, subiquity has unmounted all the bind filesystems in /target, so things like networking in the chroot don't work. If you need the chroot system to be more functional in late-commands, you need to wrap the above with:
for mount in dev proc run sys; do
mount --bind /${mount} /target/${mount}
done
<late-command chroot commands>
for mount in dev proc run sys; do
umount /target/${mount}
done
Thanks, @Anton - We've been using this trickery in early-commands to customize the autoinstall yaml file and it seems to work in late-commands as well.
One related note that may help others. By the time late-commands is called, subiquity has unmounted all the bind filesystems in /target, so things like networking in the chroot don't work. If you need the chroot system to be more functional in late-commands, you need to wrap the above with:
for mount in dev proc run sys; do
mount --bind /${mount} /target/${mount}
done
<late-command chroot commands>
for mount in dev proc run sys; do
umount /target/${mount}
done