From bd3be915e00397922e6349f7bbcc0daf00646d24 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Fri, 22 Mar 2024 23:57:08 +0100 Subject: [PATCH] creating a subvolume needs the parent to be r/w --- __frzr-deploy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/__frzr-deploy b/__frzr-deploy index b93e364..4189068 100644 --- a/__frzr-deploy +++ b/__frzr-deploy @@ -330,10 +330,18 @@ main() { else echo "System image ${NAME} will use an /etc subvolume" + # unlock the subvolume to be able to create a nested subvolume + btrfs property set -f -ts "${SUBVOL}/" ro false + + # create the nested subvolume for /etc btrfs subvolume create "${SUBVOL}/etc" + # create the nested subvolume for /snapshots btrfs subvolume create "${SUBVOL}/snapshots" + # re-lock the subvolume. ${SUBVOL}/etc will remain R/W + btrfs property set -f -ts "${SUBVOL}/" ro true + btrfs subvolume create "${SUBVOL}/snapshots/etc" # copy every stock /etc (that has been moved to /usr/etc) file to the actual /etc