Migrate and load legacy configuration before preparation writes the root
password. Keep an existing usr/.env authoritative without overwriting
conflicting legacy files or disturbing aliases. Preparation uses stored
dotenv values with the same file-over-environment precedence as UI startup.
Preserve external symlink targets and their replacements, including when
usr/ is itself a symlink. Abort on invalid configuration before creating a
password-only replacement that would hide the saved login credentials.
Cover precedence, aliases, external target replacement, migration failures,
and preparation ordering with regression tests and update the owning docs.
Validation: 80 related tests passed locally; 21 focused tests passed in the
localhost:32081 Docker framework runtime. Full live update/rollback was not
run.