aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-15 05:55:00 +0200
committerSven Gothel <[email protected]>2021-07-15 05:55:00 +0200
commitf31e72f7a4ef087675b90cd3971966220d10ef5c (patch)
tree0c0a258a6e9238bc44bb3fb0203ab9fa7094c176 /scripts
parent6f9c34459703bc9212c498987609e84b26fe2a48 (diff)
Use 2-partitions by default, one 4096 bytes per sector (advanced format), unified /boot across all
Diffstat (limited to 'scripts')
-rw-r--r--scripts/s01.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/scripts/s01.sh b/scripts/s01.sh
index 5b1e263..b3f309f 100644
--- a/scripts/s01.sh
+++ b/scripts/s01.sh
@@ -24,15 +24,18 @@ sgdisk --zap-all /dev/disk/by-id/$DISK3
# 2.2 Partition your disk:
#
-# Run this if you need legacy (BIOS) booting:
-sgdisk -a1 -n2:34:2047 -t2:EF02 /dev/disk/by-id/$DISK1
-sgdisk -a1 -n2:34:2047 -t2:EF02 /dev/disk/by-id/$DISK2
-sgdisk -a1 -n2:34:2047 -t2:EF02 /dev/disk/by-id/$DISK3
+# We assume advanced format: 4096 bytes per sector, 8 multiple
+#
+# Legacy (BIOS) booting (part-1):
+sgdisk -a1 -n1:40:2047 -t1:EF02 /dev/disk/by-id/$DISK1
+sgdisk -a1 -n1:40:2047 -t1:EF02 /dev/disk/by-id/$DISK2
+sgdisk -a1 -n1:40:2047 -t1:EF02 /dev/disk/by-id/$DISK3
+
+# ZFS partition:
+sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$DISK1
+sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$DISK2
+sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$DISK3
-#Run these in all cases:
-sgdisk -n1:0:0 -t1:BF01 /dev/disk/by-id/$DISK1
-sgdisk -n1:0:0 -t1:BF01 /dev/disk/by-id/$DISK2
-sgdisk -n1:0:0 -t1:BF01 /dev/disk/by-id/$DISK3
##
## Create POOL
@@ -42,9 +45,9 @@ zpool create -f -o ashift=12 -o autoexpand=on \
-O atime=off -O compression=off \
-O mountpoint=/ -R /mnt \
$POOL raidz2 \
- /dev/disk/by-id/$DISK1-part1 \
- /dev/disk/by-id/$DISK2-part1 \
- /dev/disk/by-id/$DISK3-part1
+ /dev/disk/by-id/$DISK1-part2 \
+ /dev/disk/by-id/$DISK2-part2 \
+ /dev/disk/by-id/$DISK3-part2
zpool autoexpand=on $POOL
zpool autoreplace=off $POOL