Skip to content

Instantly share code, notes, and snippets.

@erenfro
Created June 21, 2024 06:22
Show Gist options
  • Save erenfro/3bf149d2cb5a3e08062862c7ebec1744 to your computer and use it in GitHub Desktop.
Save erenfro/3bf149d2cb5a3e08062862c7ebec1744 to your computer and use it in GitHub Desktop.
Rhino Linux alter Calamares BtrFS Setup
#!/bin/bash
sudo sed -i /etc/calamares/modules/mount.conf -E \
-e 's/, autodefrag//' \
-e 's/compress=lzo/compress=zstd/' \
-e '/^mountOptions:$/ { r /dev/stdin' -e'd;}' <<EOF
btrfsSwapSubvol: /@swap
btrfsSubvolumes:
- mountPoint: /
subvolume: /@
- mountPoint: /root
subvolume: /@root
- mountPoint: /home
subvolume: /@home
- mountPoint: /var/cache
subvolume: /@cache
- mountPoint: /var/log
subvolume: /@log
- mountPoint: /usr/local
subvolume: /@local
- mountPoint: /var/lib/containers
subvolume: /@containers
- mountPoint: /var/lib/libvirt/images
subvolume: /@libvirt
- mountPoint: /var/lib/machines
subvolume: /@machines
- mountPoint: /var/lib/portables
subvolume: /@portables
- mountPoint: /var/spool
subvolume: /@spool
- mountPoint: /var/tmp
subvolume: /@tmp
- mountPoint: /var/www
subvolume: /@www
- mountPoint: /srv
subvolume: /@srv
- mountPoint: /opt
subvolume: /@opt
- mountPoint: /.snapshots
subvolume: /@snapshots
mountOptions:
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment