From 0f727c57f5167afb3ba4262f06ca90b2f142d93d Mon Sep 17 00:00:00 2001 From: Tomas M Date: Tue, 9 Oct 2012 22:11:10 -0500 Subject: [PATCH] use dd instead of cat, thanks to Ady --- bootfiles/bootinst.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootfiles/bootinst.sh b/bootfiles/bootinst.sh index bf94044..15b4af2 100755 --- a/bootfiles/bootinst.sh +++ b/bootfiles/bootinst.sh @@ -1,6 +1,6 @@ #!/bin/sh # Setup booting from disk (USB or harddrive) -# Requires: extlinux, fdisk, df, tail, tr, cut, cat, sed +# Requires: extlinux, fdisk, df, tail, tr, cut, dd, sed set -e # change working directory to dir from which we are started @@ -17,7 +17,7 @@ extlinux --install $BOOT if [ "$DEV" != "$PART" ]; then # Setup MBR on the first block - cat "$BOOT/mbr.bin" > "$DEV" + dd bs=440 count=1 conv=notrunc if="$BOOT/mbr.bin" of="$DEV" # Toggle a bootable flag PART="$(echo "$PART" | sed -r "s:.*[^0-9]::")"