Compare commits

...

2 commits

Author SHA1 Message Date
fa12f695a8
set right partitions 2025-07-04 16:20:24 +02:00
094b154d13
create partition 2025-07-04 16:16:14 +02:00

View file

@ -52,6 +52,35 @@ iwctl
station wlan0 show station wlan0 show
exit 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 # install script below
# #
@ -59,36 +88,9 @@ iwctl
# host name to use # host name to use
HOST=zeta HOST=zeta
# disks to use # partitions to use
DISK=/dev/disk/by-id/nvme-SAMSUNG_MZVLB1T0HBLR-000L2_S4DZNX0R362286 BOOT=/dev/disk/by-id/nvme-APPLE_SSD_AP1024Z_0ba01e0141400628-part4
DISKS="$DISK" RAID=/dev/disk/by-id/nvme-APPLE_SSD_AP1024Z_0ba01e0141400628-part5
# 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
# take a look at the partitions # take a look at the partitions
lsblk lsblk
@ -147,7 +149,7 @@ mount -t zfs zpool/root /mnt
mkdir -p /mnt/{data,nix,boot,root,etc/nixos} mkdir -p /mnt/{data,nix,boot,root,etc/nixos}
# mount the ESP # mount the ESP
mount $DISK-part1 /mnt/boot mount $BOOT /mnt/boot
# mount volumes # mount volumes
mount -t zfs zpool/data /mnt/data mount -t zfs zpool/data /mnt/data