Browse Source

on Linux partprobe might be useful, but not before every filesystem creation

Waldemar Brodkorb 8 years ago
parent
commit
f782421d7e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      scripts/install.sh

+ 5 - 1
scripts/install.sh

@@ -209,7 +209,6 @@ case $ostype {
 	}
 	function create_fs {
 		(( quiet )) || print "Creating filesystem on ${1}..."
-		partprobe $tgt
 		mkfs.$3 "$1"
 	}
 	function tune_fs {
@@ -498,6 +497,11 @@ else
 fi
 dd if="$T/firsttrack" of="$tgt" > /dev/null 2>&1
 
+if [[ $ostype = Linux ]]; then
+  partprobe $tgt
+  sync
+fi
+
 fwdir=$(dirname "$src")
 
 case $target {