diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index adedd2bb..385f0de5 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -1781,7 +1781,14 @@ if [ "${backup_part_extension_required}" -ne 0 ]; then wlog "Platform Backup partition: resizing ${BACKUP_PART} from ${BACKUP_PART_CURRENT_SIZE}MiB to ${BACKUP_SIZE}MiB" e2fsck -p -f ${BACKUP_PART} rc=$? - [ ${rc} -ne 0 ] && report_failure_with_msg "e2fsck failed on platform backup partition [rc=${rc}]" + # Handle e2fsck exit code, non-zero can still indicate success: + # 0 - No errors + # 1 - File system errors corrected + # 2 - File system errors corrected, system should be rebooted + # > 2 are all hard failures (see man e2fsck) + # Include 2 as a failure in our case, since it should only happen if the filesystem + # is mounted while e2fsck is run (not a valid scenario here). + [ ${rc} -gt 1 ] && report_failure_with_msg "e2fsck failed on platform backup partition [rc=${rc}]" resize2fs -f ${BACKUP_PART} rc=$? [ ${rc} -ne 0 ] && report_failure_with_msg "Failed to resize ext4 fs of platform backup partition [rc=${rc}]"