Miniboot wipes the backup-partition when the persistent size
is set to a value less than the existing size. The expectation is
that the install should fail and the contents of platform-backup
should be preserved.
This fix solves the issue by failing the installation during the
ks-early phase, where the provided persistent size value in the
kernel commandline can be read, and no disk operations have been
performed.
Test Plan:
PASS: Verify that installation with valid parameters passes.
PASS: Verify that reinstall fails if persistent_size less
than the current persistent_size is provided.
PASS: Verify that contents of /opt/platform-backup are preserved
when persistent_size less than the current size is
provided.
PASS: Verify that reinstall fails if persistent_size greater
than the size of the rootfs device is provided.
PASS: Verify that the contents of /opt/platform-backup are
preserved when persistent-size greater than size of rootfs
device is provided.
Closes-Bug: 1998932
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
Change-Id: I51351cb14cdcfa63b4b5839d935589d997b5403a