aboutsummaryrefslogtreecommitdiffstats
path: root/setup/new_gpt_mpr_disk.sh
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-12-02 07:08:24 +0100
committerSven Göthel <[email protected]>2024-12-02 07:08:24 +0100
commit0eae3b000704165acb41d4286682514836bf9d20 (patch)
tree7666220ef2da961a876b16c562388a641b7c42d4 /setup/new_gpt_mpr_disk.sh
parentb7ecb60d80cf0190af6a316cee99ef7ad51f47f6 (diff)
Fix UEFI notes in setup helper
Diffstat (limited to 'setup/new_gpt_mpr_disk.sh')
-rw-r--r--setup/new_gpt_mpr_disk.sh25
1 files changed, 8 insertions, 17 deletions
diff --git a/setup/new_gpt_mpr_disk.sh b/setup/new_gpt_mpr_disk.sh
index 4335a25..fba8aba 100644
--- a/setup/new_gpt_mpr_disk.sh
+++ b/setup/new_gpt_mpr_disk.sh
@@ -3,24 +3,15 @@ NDISK1=ata-WDC_WD40EFZX-68AWUN0_WD-WX92DA0798JN
NDISK2=ata-WDC_WD40EFZX-68AWUN0_WD-WX92DA0791VU
NDISK3=ata-WDC_WD40EFZX-68AWUN0_WD-WX92DA02K427
-# Clear the partition table:
-sgdisk --zap-all /dev/disk/by-id/$NDISK1
-#sgdisk --zap-all /dev/disk/by-id/$NDISK2
-#sgdisk --zap-all /dev/disk/by-id/$NDISK3
+# EF02 Bios-Boot (Grub core)
+# BF01 ZFS Root
+for dname in "${NDISK1}" "${NDISK2}" "${NDISK3}" ; do
+ sgdisk --zap-all \
+ --new 1::+1M --typecode=1:EF02 \
+ --new 2::0 --typecode=2:BF01 \
+ "/dev/disk/by-id/${dname}"
+done
-# 2.2 Partition your disk:
-#
-# Legacy (BIOS) booting (part-1): Used for GRUB boot-code in 'MBR-gap':
-sgdisk -a1 -n1:40:8191 -t1:EF02 /dev/disk/by-id/$NDISK1
-#sgdisk -a1 -n1:40:8191 -t1:EF02 /dev/disk/by-id/$NDISK2
-#sgdisk -a1 -n1:40:8191 -t1:EF02 /dev/disk/by-id/$NDISK3
-
-#Run these in all cases:
-sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$NDISK1
-#sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$NDISK2
-#sgdisk -n2:0:0 -t2:BF01 /dev/disk/by-id/$NDISK3
-
-sleep 3
sync
echo "Now replace the disk .."