# secondary gpt is not it the end of the disk, and a warning that has to
# do with the "Last Usable LBA" entry in gpt.
if ! output="$("$PARTED" -s -m "$dev" unit s print | grep -E -v "^(Warning|Error): ")"; then
- log_error "Unable to read partition table for device \`${dev}'"
+ log_error "Unable to read partition table for device \`${dev}'. The image seems corrupted."
fi
echo "$output"
if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then
+ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "" ]; then
+ log_error "Required image property \`OSFAMILY' is missing or empty."
+ fi
+
+ if [ "$SNF_IMAGE_PROPERTY_ROOT_PARTITION" = "" ]; then
+ log_error "Required image property \`ROOT_PARTITION' is missing or empty."
+ fi
+
export SNF_IMAGE_RESIZE_PART="$(get_partition_to_resize "$SNF_IMAGE_DEV")"
if [[ ! "$SNF_IMAGE_PROPERTY_OSFAMILY" =~ ^(linux|windows)$ ]]; then
fi
if [ -z "$SNF_IMAGE_PROPERTY_ROOT_PARTITION" ]; then
- log_error "Root Partition image property not defined"
+ log_error "Required image property \`ROOT_PARTITION' not defined or empty"
fi
rootdev="${SNF_IMAGE_DEV}${SNF_IMAGE_PROPERTY_ROOT_PARTITION}"
if [ ! -b "$rootdev" ]; then
- log_error "Image root partition device:\`$rootdev' is not a block device"
+ log_error "Root partition device:\`$rootdev' is not a block device. " \
+ "Please check if the value for image property \`ROOT_PARTITION' " \
+ "(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid."
fi
mount "$rootdev" "$SNF_IMAGE_TARGET" -o rw
echo "@echo off" > "$target/Windows/SnfScripts/ChangeAdminPassword.cmd"
if [ -z "$SNF_IMAGE_PROPERTY_USERS" ]; then
+ warn "Image property \`USERS' is missing or empty. " \
+ "Changing the password for default user: \`Administrator'."
+
SNF_IMAGE_PROPERTY_USERS="Administrator"
fi
users+=("$usr")
done
else
+ warn "Image property \`USERS' is missing or empty. " \
+ "Changing the password for default user: \'root'."
users+=("root")
fi