Browse Source

do not fail conversion in disk_image_shrink_rootfs

That is if it fails, proceed with conversion without it.

The current logic only supports shrinking a rootfs on BBB and RPi
devices (this is deducted from $raw_disk_counts) and calling
'disk_image_shrink_rootfs' would fail on 'qemux86_64' device.

Shrinking the rootfs is not a hard-requirement and is only an
optimization (mainly for RPi devices).

Changelog: None

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
1.2.x
Mirza Krak 6 years ago
parent
commit
340af407d5
  1. 4
      mender-convert

4
mender-convert

@ -150,8 +150,8 @@ do_raw_disk_image_shrink_rootfs() {
elif [[ $raw_disk_counts -eq 2 ]]; then elif [[ $raw_disk_counts -eq 2 ]]; then
sudo losetup $loopdevice $raw_disk_image -o $((${raw_disk_sizes[prootfs_start]} * $sector_size)) sudo losetup $loopdevice $raw_disk_image -o $((${raw_disk_sizes[prootfs_start]} * $sector_size))
else else
log "Error: invalid/unsupported embedded raw disk image. Aborting." log "Warning: invalid/unsupported embedded raw disk image. Skipping resize..."
return 1 return 0
fi fi
block_size=($(sudo dumpe2fs -h $loopdevice | grep 'Block size' | tr -s ' ' | cut -d ' ' -f3)) block_size=($(sudo dumpe2fs -h $loopdevice | grep 'Block size' | tr -s ' ' | cut -d ' ' -f3))

Loading…
Cancel
Save