vitorpy's Dotfiles

Automate disk partitioning in archinstall config - reuse EFI, format root

vitorpy 593c8b85 f3f6b2b7

+50 -10
+25 -8
private_dot_config/private_arch/ARCHINSTALL-GUIDE.md
··· 91 91 92 92 ## Disk Partitioning 93 93 94 - The config is set to `manual_partitioning` - archinstall will guide you through: 94 + The configuration is **fully automated** for replacing Fedora on `/dev/nvme0n1`. 95 + 96 + ### What It Does 97 + 98 + The archinstall config will: 99 + 1. **Keep** the existing EFI partition (600M) - **NO FORMATTING** 100 + 2. **Delete** existing partitions 2 and 3 (old /boot and Fedora root) 101 + 3. **Create** new root partition using all remaining space (~464G) 102 + 4. **Enable** zram swap (configured via `"swap": true`) 95 103 96 - ### Recommended Layout (UEFI): 104 + ### Resulting Layout 97 105 ``` 98 - /dev/nvme0n1p1 512M EFI System /boot 99 - /dev/nvme0n1p2 Rest Linux filesystem / 100 - swap 8-16G Linux swap [swap] 106 + /dev/nvme0n1p1 600M EFI (existing) /boot [KEPT - not wiped] 107 + /dev/nvme0n1p2 ~464G ext4 (new) / [FORMATTED] 108 + [zram0] ~8G zram [swap] [IN-MEMORY] 101 109 ``` 102 110 103 - ### For dual-boot or existing EFI: 104 - - Reuse existing EFI partition (don't format!) 105 - - Create new partition for Arch root 111 + ### IMPORTANT: Different Disk? 112 + 113 + If your disk is **NOT** `/dev/nvme0n1`, edit the config before running: 114 + 115 + ```bash 116 + # Check your disk name 117 + lsblk 118 + 119 + # Edit the config to change device 120 + nvim archinstall-config.json 121 + # Change "device": "/dev/nvme0n1" to your disk (e.g., /dev/sda) 122 + ``` 106 123 107 124 ## Customization 108 125
+25 -2
private_dot_config/private_arch/archinstall-config.json
··· 17 17 } 18 18 }, 19 19 "disk_config": { 20 - "config_type": "manual_partitioning", 21 - "device_modifications": [] 20 + "device_modifications": [ 21 + { 22 + "device": "/dev/nvme0n1", 23 + "partitions": [ 24 + { 25 + "type": "primary", 26 + "start": "1MiB", 27 + "size": "600MiB", 28 + "filesystem": {"type": "fat32"}, 29 + "mountpoint": "/boot", 30 + "flags": ["boot", "esp"], 31 + "wipe": false 32 + }, 33 + { 34 + "type": "primary", 35 + "start": "601MiB", 36 + "size": "100%", 37 + "filesystem": {"type": "ext4"}, 38 + "mountpoint": "/", 39 + "wipe": true 40 + } 41 + ], 42 + "wipe": false 43 + } 44 + ] 22 45 }, 23 46 "bootloader": "systemd-bootctl", 24 47 "swap": true,