diff options
author | Ed Sutter <edsutterjr@gmail.com> | 2015-07-08 19:27:04 -0400 |
---|---|---|
committer | Ed Sutter <edsutterjr@gmail.com> | 2015-07-08 19:27:04 -0400 |
commit | 812918dbb86c0d6a2296ef7a07ac5814e1c2e459 (patch) | |
tree | de8232b739c073ebe8951a4da6f6066a0ca554d1 | |
parent | BBB: Add sd_setup.sh to create a bootable SD and README to document SD and UA... (diff) | |
download | umon-812918dbb86c0d6a2296ef7a07ac5814e1c2e459.tar.bz2 |
add sync to script to guarantee sd write completes, also missing '1' in fdisk
-rwxr-xr-x | ports/beagleboneblack/sd_setup.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ports/beagleboneblack/sd_setup.sh b/ports/beagleboneblack/sd_setup.sh index a90059f..402c630 100755 --- a/ports/beagleboneblack/sd_setup.sh +++ b/ports/beagleboneblack/sd_setup.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/bin/bash # # This script automates the process of setting up an SD card for # either "raw" or FAT mode booting for the Beaglebone Black. @@ -41,7 +41,7 @@ FAT) dd if=/dev/zero of=${SDDEV} bs=1M count=1 # Create the FAT16 primary partition and mark it bootable - echo -e "n\np\n1\n\n+3M\nt\n6\na\nw\n" | fdisk ${SDDEV} + echo -e "n\np\n1\n\n+3M\nt\n6\na\n1\nw\n" | fdisk ${SDDEV} # Wait for some time to allow the partition to register under /dev sleep 1 @@ -51,7 +51,9 @@ FAT) mkdir mnt mount ${SDDEV}1 mnt cp ./build_BEAGLEBONEBLACK/MLO mnt + sync umount mnt + sync rm -rf mnt ;; *) |