Skip to content

Commit

Permalink
medcom-wide/make-sdcard: fix sfdisk partioning bug
Browse files Browse the repository at this point in the history
The sfdisk tool used for partitioning SD-cards has, especially in an
older 2.23.2 version on CentOS 7, problems re-reading the partitions it
just created. As even the --force parameter does not prevent sfdisk from
grinding to a halt, use --no-reread instead. This avoids races with
udev, as stated in numerous bug reports:

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/942788
coreos/bugs#152
https://bugs.centos.org/view.php?id=986

Change-Id: I09c4a90c99e324abb8469d6bad1465713d7c8b32
Signed-off-by: Bert van Hall <bert.vanhall@avionic-design.de>
Reviewed-on: http://review.adnet.avionic-design.de/5446
Reviewed-by: Dirk Leber <dirk.leber@avionic-design.de>
  • Loading branch information
Bert van Hall authored and dirkleber committed Apr 20, 2016
1 parent 9283572 commit fe8b137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medcom-wide/make-sdcard
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fi

device="$1"

/sbin/sfdisk --force -uM "$device" <<EOF
/sbin/sfdisk --no-reread -uM "$device" <<EOF
,512,L,*
,128,L
,,L
Expand Down

0 comments on commit fe8b137

Please sign in to comment.