More explicit instructions on copying image

This commit is contained in:
Bob Mottram 2018-05-17 18:05:24 +01:00
parent 5f01c28c7d
commit 2f9f5be961
1 changed files with 10 additions and 9 deletions

View File

@ -697,7 +697,7 @@ Image was created.
"
fi
ls -lh ${PROJECT_NAME}*.img ${PROJECT_NAME}*.sig ${PROJECT_NAME}*.xz ${PROJECT_NAME}*.vdi ${PROJECT_NAME}*.qcow2
#ls -lh ${PROJECT_NAME}*.img ${PROJECT_NAME}*.sig ${PROJECT_NAME}*.xz ${PROJECT_NAME}*.vdi ${PROJECT_NAME}*.qcow2
# Remove the mesh script after use
if [[ $VARIANT == "mesh"* ]]; then
@ -710,16 +710,17 @@ Password: $PASSWORD" > "${CURR_DIR}/${PROJECT_NAME}_login_credentials.txt"
chmod 600 "${CURR_DIR}/${PROJECT_NAME}_login_credentials.txt"
if [[ $IMAGE_TYPE != "qemu"* ]]; then
IMAGE_FILENAME=$(find "${CURR_DIR}" -name "*.img" | head -n 1 | awk -F '/' '{print $2}')
echo ''
if [[ $VARIANT != 'meshclient' && $VARIANT != 'meshusb' ]]; then
echo $'You can copy the image to a microSD card with:'
else
echo $'You can copy the image to a USB drive with:'
fi
echo $'To compress:'
echo ''
echo " xz --no-warn --verbose --keep --threads=0 -3 ${IMAGE_FILENAME}"
echo ''
echo 'To copy to microSD, USB drive or SSD'
echo ''
echo " unxz -k ${PROJECT_NAME}*.img.xz"
echo ' sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8'
echo " sudo dd bs=32M if=${PROJECT_NAME}*.img of=/dev/sdX conv=fdatasync,sync,noerror"
echo " sudo dd bs=32M if=${IMAGE_FILENAME} of=/dev/sdX conv=fdatasync,sync,noerror"
echo ''
fi