From 812918dbb86c0d6a2296ef7a07ac5814e1c2e459 Mon Sep 17 00:00:00 2001 From: Ed Sutter Date: Wed, 8 Jul 2015 19:27:04 -0400 Subject: add sync to script to guarantee sd write completes, also missing '1' in fdisk --- ports/beagleboneblack/sd_setup.sh | 6 ++++-- 1 file 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 ;; *) -- cgit v1.2.3