progress
This commit is contained in:
parent
3224c7723d
commit
d02b2e627a
3
main.sh
3
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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user