Compare commits
2 commits
4fd94e7984
...
fa12f695a8
Author | SHA1 | Date | |
---|---|---|---|
fa12f695a8 | |||
094b154d13 |
1 changed files with 33 additions and 31 deletions
|
@ -52,6 +52,35 @@ iwctl
|
|||
station wlan0 show
|
||||
exit
|
||||
|
||||
# create the system partition
|
||||
|
||||
# first: take a peek
|
||||
|
||||
sgdisk /dev/nvme0n1 -p
|
||||
|
||||
Number Start (sector) End (sector) Size Code Name
|
||||
1 6 128005 500.0 MiB AF0B iBootSystemContainer
|
||||
2 128006 121547013 463.2 GiB AF0A Container
|
||||
3 121547014 122157317 2.3 GiB AF0A
|
||||
4 122157318 122279429 477.0 MiB EF00
|
||||
5 242965551 244276259 5.0 GiB AF0C RecoveryOSContainer
|
||||
|
||||
# create partition
|
||||
|
||||
sgdisk /dev/nvme0n1 -n 0:0 -s
|
||||
|
||||
# take a look again
|
||||
|
||||
sgdisk /dev/nvme0n1 -p
|
||||
|
||||
Number Start (sector) End (sector) Size Code Name
|
||||
1 6 128005 500.0 MiB AF0B iBootSystemContainer
|
||||
2 128006 121547013 463.2 GiB AF0A Container
|
||||
3 121547014 122157317 2.3 GiB AF0A
|
||||
4 122157318 122279429 477.0 MiB EF00
|
||||
5 122279430 242965550 460.4 GiB 8300
|
||||
6 242965551 244276259 5.0 GiB AF0C RecoveryOSContainer
|
||||
|
||||
#
|
||||
# install script below
|
||||
#
|
||||
|
@ -59,36 +88,9 @@ iwctl
|
|||
# host name to use
|
||||
HOST=zeta
|
||||
|
||||
# disks to use
|
||||
DISK=/dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-000L2_S4DZNX0R362286
|
||||
DISKS="$DISK"
|
||||
|
||||
# create partition table on all disks and EFI partition
|
||||
RAID=""
|
||||
for D in $DISKS; do
|
||||
# kill old data
|
||||
sgdisk --zap-all $D
|
||||
blkdiscard -v -f $D
|
||||
wipefs -a $D
|
||||
sleep 5
|
||||
|
||||
# Create partition table
|
||||
parted $D -- mklabel gpt
|
||||
|
||||
# Create a /boot as $D-part1
|
||||
parted $D -- mkpart ESP fat32 1MiB 1024MiB
|
||||
parted $D -- set 1 boot on
|
||||
|
||||
# Create a /nix as $D-part2
|
||||
parted $D -- mkpart NIX 1024MiB 100%
|
||||
|
||||
# boot partition after short sleep, needed on some machines
|
||||
sleep 5
|
||||
mkfs.vfat $D-part1
|
||||
|
||||
# add part2 to raid
|
||||
RAID="$RAID $D-part2"
|
||||
done
|
||||
# partitions to use
|
||||
BOOT=/dev/disk/by-id/nvme-APPLE_SSD_AP1024Z_0ba01e0141400628-part4
|
||||
RAID=/dev/disk/by-id/nvme-APPLE_SSD_AP1024Z_0ba01e0141400628-part5
|
||||
|
||||
# take a look at the partitions
|
||||
lsblk
|
||||
|
@ -147,7 +149,7 @@ mount -t zfs zpool/root /mnt
|
|||
mkdir -p /mnt/{data,nix,boot,root,etc/nixos}
|
||||
|
||||
# mount the ESP
|
||||
mount $DISK-part1 /mnt/boot
|
||||
mount $BOOT /mnt/boot
|
||||
|
||||
# mount volumes
|
||||
mount -t zfs zpool/data /mnt/data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue