aboutsummaryrefslogtreecommitdiffstats
path: root/setup/new_gpt_mpr_disk.sh
blob: 4335a256d803d082974b466ce79f68f2930004a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

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

# 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 .."
echo "zpool replace risa 12458555210078177352 /dev/disk/by-id/ata-WDC_WD40EFZX-68AWUN0_WD-WX92DA0798JN-part1"