start to prepare to do btrfs

This commit is contained in:
Christoph Cullmann 2024-10-28 21:27:17 +01:00
parent c73b0bb62b
commit c5c2372749
No known key found for this signature in database

View file

@ -33,43 +33,31 @@ HOST=neko
# ensure 4k sector size # ensure 4k sector size
nvme format --lbaf=1 --force $DISK nvme format --lbaf=1 --force $DISK
nvme id-ns -H $DISK nvme id-ns -H $DISK
sleep 5 sleep 5
# kill old data # create partition table on all disks and EFI partition
sgdisk --zap-all $DISK for D in $DISK $DISK2 $DISK3; do
blkdiscard -v $DISK # kill old data
wipefs -a $DISK sgdisk --zap-all $D
gdisk -l $DISK blkdiscard -v $D
wipefs -a $D
sleep 5
# wipe second disk # create partitions
sgdisk --zap-all $DISK2 parted $D -- mklabel gpt
blkdiscard -v $DISK2 sgdisk -n 1:0:+1024M -c 1:"EFI System Partition" -t 1:EF00 $D
wipefs -a $DISK2 sgdisk -n 2:0:0 -c 2:"Linux" -t 2:8e00 $D
parted $D -- set 1 boot on
sleep 5
# wipe third disk # boot partition
sgdisk --zap-all $DISK3 mkfs.fat -F 32 -n EFIBOOT $D-part1
blkdiscard -v $DISK3 sleep 5
wipefs -a $DISK3 done
sleep 5 # take a look at the partitions
# create partitions
parted $DISK -- mklabel gpt
sgdisk -n 1:0:+1024M -c 1:"EFI System Partition" -t 1:EF00 $DISK
sgdisk -n 2:0:0 -c 2:"Linux" -t 2:8e00 $DISK
parted $DISK -- set 1 boot on
sleep 5
# take a look
cat /proc/partitions cat /proc/partitions
# boot partition
mkfs.fat -F 32 -n EFIBOOT $DISK-part1
sleep 5
# ZFS zpool creation with encryption # ZFS zpool creation with encryption
zpool create \ zpool create \
-o ashift=13 \ -o ashift=13 \