1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 06:11:12 +00:00

installer: copy 1M zeroes to the target device before running fdisk

otherwise grub-install chokes, even after the new partition table has been created
This commit is contained in:
Ivan Mikushin
2015-10-01 13:53:48 +05:00
parent 60399d5fe1
commit 21453e38a9

View File

@@ -28,11 +28,11 @@ if [ "$PARTITION_COUNT" -gt "1" ]; then
exit 1
fi
done
dd if=/dev/zero of=${DEVICE} bs=512 count=1
partprobe ${DEVICE}
fi
dd if=/dev/zero of=${DEVICE} bs=512 count=2048
partprobe ${DEVICE}
fdisk ${DEVICE} <<EOF
n
p