From 661fed8dc29737218a0fa6904c333ba5ea4dbcbd Mon Sep 17 00:00:00 2001 From: Michael Banks Date: Sun, 3 Jul 2016 02:36:33 -0400 Subject: [PATCH 1/3] Translated unmount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “unmount” isn’t recognized in Mac OS X. Used Disk Utility command to unmount the disk. Also used mount -f to force the mount to get rid of the block resource warning. Should fix issue #277 --- writeimage.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/writeimage.sh b/writeimage.sh index 940af69325..8b81670e33 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -99,8 +99,8 @@ mkdir -p $BOOT if [ `uname` == "Darwin" ]; then BOOT_DEV=${SDCARD_DEV}s1 # e.g. /dev/disk4s1 - umount ${SDCARD_DEV}* 2>/dev/null || true - mount_msdos $BOOT_DEV $BOOT + diskutil unmountDisk ${SDCARD_DEV} + mount -ft msdos $BOOT_DEV $BOOT else # assuming Linux BOOT_DEV=${SDCARD_DEV}p1 # e.g. /dev/mmcblk0p1 if ! [ -e ${SDCARD_DEV}p1 ]; then @@ -158,4 +158,3 @@ umount $BOOT rmdir $BOOT msg "you can now remove the sdcard" - From 542dae635574dc23ca92d19cefdc4eaa7d1747d9 Mon Sep 17 00:00:00 2001 From: Michael Banks Date: Sun, 3 Jul 2016 15:43:43 -0400 Subject: [PATCH 2/3] Revert "Translated unmount" This reverts commit 661fed8dc29737218a0fa6904c333ba5ea4dbcbd. --- writeimage.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/writeimage.sh b/writeimage.sh index 8b81670e33..940af69325 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -99,8 +99,8 @@ mkdir -p $BOOT if [ `uname` == "Darwin" ]; then BOOT_DEV=${SDCARD_DEV}s1 # e.g. /dev/disk4s1 - diskutil unmountDisk ${SDCARD_DEV} - mount -ft msdos $BOOT_DEV $BOOT + umount ${SDCARD_DEV}* 2>/dev/null || true + mount_msdos $BOOT_DEV $BOOT else # assuming Linux BOOT_DEV=${SDCARD_DEV}p1 # e.g. /dev/mmcblk0p1 if ! [ -e ${SDCARD_DEV}p1 ]; then @@ -158,3 +158,4 @@ umount $BOOT rmdir $BOOT msg "you can now remove the sdcard" + From d0e5b3bdf84cb55613e858428c44ba35a6a437c3 Mon Sep 17 00:00:00 2001 From: Michael Banks Date: Sun, 3 Jul 2016 15:47:25 -0400 Subject: [PATCH 3/3] Used diskutil instead of umount Used disk utility instead of umount to unmount the disk and used mount -f to force the mounting of the drive. --- writeimage.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/writeimage.sh b/writeimage.sh index 940af69325..8b81670e33 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -99,8 +99,8 @@ mkdir -p $BOOT if [ `uname` == "Darwin" ]; then BOOT_DEV=${SDCARD_DEV}s1 # e.g. /dev/disk4s1 - umount ${SDCARD_DEV}* 2>/dev/null || true - mount_msdos $BOOT_DEV $BOOT + diskutil unmountDisk ${SDCARD_DEV} + mount -ft msdos $BOOT_DEV $BOOT else # assuming Linux BOOT_DEV=${SDCARD_DEV}p1 # e.g. /dev/mmcblk0p1 if ! [ -e ${SDCARD_DEV}p1 ]; then @@ -158,4 +158,3 @@ umount $BOOT rmdir $BOOT msg "you can now remove the sdcard" -