start to work on better partition creation
This commit is contained in:
parent
ede0092128
commit
539084beb4
1 changed files with 10 additions and 7 deletions
|
@ -39,20 +39,23 @@ sleep 5
|
||||||
for D in $DISK $DISK2 $DISK3; do
|
for D in $DISK $DISK2 $DISK3; do
|
||||||
# kill old data
|
# kill old data
|
||||||
sgdisk --zap-all $D
|
sgdisk --zap-all $D
|
||||||
blkdiscard -v $D
|
blkdiscard -v -f $D
|
||||||
wipefs -a $D
|
wipefs -a $D
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# create partitions
|
# Create partition table
|
||||||
parted $D -- mklabel gpt
|
parted $D -- mklabel gpt
|
||||||
sgdisk -n 1:0:+1024M -c 1:"EFI System Partition" -t 1:EF00 $D
|
|
||||||
sgdisk -n 2:0:0 -c 2:"Linux" -t 2:8e00 $D
|
# Create a /boot as $D-part1
|
||||||
|
parted $D -- mkpart ESP fat32 1MiB 1024MiB
|
||||||
parted $D -- set 1 boot on
|
parted $D -- set 1 boot on
|
||||||
|
|
||||||
sleep 5
|
# Create a /nix as $D-part2
|
||||||
|
parted $D -- mkpart NIX 1024MiB 100%
|
||||||
|
|
||||||
# boot partition
|
# boot partition after short sleep, needed on some machines
|
||||||
mkfs.fat -F 32 -n EFIBOOT $D-part1
|
sleep 5
|
||||||
|
mkfs.vfat $D-part1
|
||||||
done
|
done
|
||||||
|
|
||||||
# take a look at the partitions
|
# take a look at the partitions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue