From d02b2e627a2ed4aedd5b90bccc9961c465500eed Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 8 Feb 2022 17:35:19 +0100 Subject: [PATCH] progress --- main.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index f9b54ca..2834611 100755 --- a/main.sh +++ b/main.sh @@ -113,6 +113,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 else parted "${TARGET_PHY_ID}" -s -- mklabel msdos sleep 2 @@ -121,6 +122,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 mkfs.btrfs -f "${TARGET_PHY_ID}-part1" TARGET_PART="2" fi @@ -139,7 +141,6 @@ do_partition() { lvcreate --name root -l 100%FREE "vg_${TARGETNAME_UNDERSCORE}" mkswap -f "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap" mkfs.btrfs -f "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root" - mkswap "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap" mount "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root" "${target}" btrfs subvol create "${target}/rootfs" btrfs subvol create "${target}/homefs"