This commit is contained in:
teldra 2022-02-08 17:41:23 +01:00
parent 1dc09f1100
commit f8b06639ff

View File

@ -102,7 +102,6 @@ do_partition() {
start=1
TARGET_PART="1"
if [ "$EFI" == "1" ]; then
set -x
parted "${TARGET_PHY_ID}" -s -- mklabel gpt
sleep 2
size=512
@ -113,7 +112,7 @@ do_partition() {
parted "${TARGET_PHY_ID}" unit mib -s -- mkpart root ext4 "$start" 100%
mkfs.vfat -I -F32 "${TARGET_PHY_ID}-part1"
TARGET_PART="2"
dd if=/dev/random of="${TARGET_PHY_ID}-part2" bs=512 count=4
dd if=/dev/random of="${TARGET_PHY_ID}-part2" bs=512 count=4 > /dev/null 2>&1
else
parted "${TARGET_PHY_ID}" -s -- mklabel msdos
sleep 2
@ -122,7 +121,7 @@ do_partition() {
sleep 2
start="$(( start + size ))"
parted $TARGET_PHY_ID unit mib -s -- mkpart primary ext4 "$start" -1s
dd if=/dev/random of="${TARGET_PHY_ID}-part2" bs=512 count=4
dd if=/dev/random of="${TARGET_PHY_ID}-part2" bs=512 count=4 > /dev/null 2>&1
mkfs.btrfs -f "${TARGET_PHY_ID}-part1"
TARGET_PART="2"
fi