We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f340cf3 + 383a944 commit abdee51Copy full SHA for abdee51
twoliter/embedded/img2img
@@ -130,6 +130,12 @@ dd if="${OS_IMAGE}" of="${ROOT_IMAGE}" \
130
131
# For erofs, extract the root filesystem since we can't modify in-place.
132
if [[ "${EROFS_ROOT_PARTITION}" == "yes" ]]; then
133
+ # Validate that the root image is actually erofs
134
+ filesystem_type="$(blkid -c /dev/null -o value -s TYPE "${ROOT_IMAGE}")"
135
+ if [[ "${filesystem_type}" != "erofs" ]]; then
136
+ echo "root partition is not erofs as expected, found: '${filesystem_type}'" >&2
137
+ exit 1
138
+ fi
139
fsck.erofs --extract="${ROOT_MOUNT}" "${ROOT_IMAGE}"
140
touch -r "${ROOT_IMAGE}" "${ROOT_MOUNT}"
141
rm "${ROOT_IMAGE}"
0 commit comments