From b9b92d3dd7f10c4d6447f6af36299fa72ff904a2 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Fri, 18 Aug 2017 20:17:46 +0200 Subject: [PATCH] Add a tiny script to complete a Debian Netinstall for Btrfs. --- part.btrfs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 part.btrfs diff --git a/part.btrfs b/part.btrfs new file mode 100755 index 0000000..2782415 --- /dev/null +++ b/part.btrfs @@ -0,0 +1,29 @@ +#!/bin/sh + +# For Debian install +# Complete the Btrfs partitionning +# +# Source: https://wiki.101010.fr/doku.php?id=debian:installation_btrfs + +# Remount the partition with "compress" option +mount -o remount,defaults,compress=lzo /target + +# Create all subvolumes +btrfs subvolume create /target/home +btrfs subvolume create /target/opt +btrfs subvolume create /target/root +btrfs subvolume create /target/srv +btrfs subvolume create /target/tmp +btrfs subvolume create /target/usr +btrfs subvolume create /target/var + +# Specific actions for "etc" subvolume +mv /target/etc /target/etc.temp +btrfs subvolume create /target/etc +mv /target/etc.temp/* /target/etc +rmdir /target/etc.temp + +# Ensure everything is ok +btrfs subvolume list -p /target + +exit 0