Hello everyone. After lots of tinkering I realised that my current system did not contain any btrfs subvolumes and I tried to create them manually but it made a mess in my file system. Therefore, I decided to wipe the drive and start fresh.
I have read the wikis, I tried to puzzle all the bits and pieces of information about this topic here and there. I am unsure what I have to do so I would like to have some help reinstalling my system.
Since the Gnome GUI installer doesn’t create any btrfs subvolumes by default, I will have to manually install the system through the terminal.
I have got a 2TB nvme ssd so I planned to do:
500MB for boot (FAT32 or VFAT [What is the point of VFAT and does it work as boot?)
1.5TB for root with all the directories mounted to their relative subvolumes from the get go.
> @
> @home
> @.cache
> @var
> @var/cache
> @var/log
> @var/lib
> @tmp
> @swap
This is my plan but I do not know how to create them and mount them because I am so confused.
I also wonder why /boot has to be FAT32 format, can it be BTRFS as well?
After I got the parititioning done, I will need to install the system.
If you have been following my posts from before, I live in China and I had trouble accessing nixOS’ official server, any server file downloads will slow to basically unusable and might corrupt the file, in which I suspect that might be the reason my system will randomly crash and frozen. so I need Chinese mirrors for the channel and binary cache. I got them working in my current system but I do not know how to use them while installing the system.
Context:
https://discourse.nixos.org/t/help-i-broke-my-nix-channel/58309
https://discourse.nixos.org/t/help-nixos-kde-plasma-6-kept-crashing-and-freezing-even-in-tty/58425
I also got my current configuration.nix that I am pretty happy with because it contains fixes for a lot of issues. I would like to apply them from the get go. I wonder if there is any " nixos-rebuild switch" equivalent for system install?
Thank you for reading my post.
BTW, I understand that I need to create a swap subvolume in order to isolate it from the other directories so that snapshots can be used. But I am confused after reading the wiki.
> Swap file
>
> Optionally, create a separate subvolume for the swap file. Be sure to regenerate your hardware-configuration.nix if you choose to do this.
>
> # mkdir -p /mnt
> # mount /dev/sdXY /mnt
> # btrfs subvolume create /mnt/swap
> # umount /mnt
> # mkdir /swap
> # mount -o noatime,subvol=swap /dev/sdXY /swap
>
> Then, create the swap file and adjust its size as desired:
>
> # btrfs filesystem mkswapfile --size 8g --uuid clear /swap/swapfile
>
> Finally, add the swap file to your configuration and nixos-rebuild switch:
>
> swapDevices = [ { device = "/swap/swapfile"; } ];
It did not use btrfs to create any subvolume but it asks me to mount it?
I am sorry I just confused.