use dd instead of cat, thanks to Ady
parent
796a925a5f
commit
0f727c57f5
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Setup booting from disk (USB or harddrive)
|
# 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
|
set -e
|
||||||
|
|
||||||
# change working directory to dir from which we are started
|
# change working directory to dir from which we are started
|
||||||
|
|
@ -17,7 +17,7 @@ extlinux --install $BOOT
|
||||||
|
|
||||||
if [ "$DEV" != "$PART" ]; then
|
if [ "$DEV" != "$PART" ]; then
|
||||||
# Setup MBR on the first block
|
# 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
|
# Toggle a bootable flag
|
||||||
PART="$(echo "$PART" | sed -r "s:.*[^0-9]::")"
|
PART="$(echo "$PART" | sed -r "s:.*[^0-9]::")"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue