image_to_usb: actually fail if umount fails

Unmount failures were being masked by the "| grep" for the chroot helper
message. Remove all of this, since it is critical that the umount
failure stop the script. Otherwise we'll end up with corrupted images
from situations like the Ubuntu automounter.

TEST=attempted image writing with an automounted drive

Change-Id: I171a0f298688f56df3a34384b0cc2052e97f8d85
Signed-off-by: Kees Cook <>
Reviewed-by: Marc MERLIN <>
1 file changed