2017-08-18 20:17:46 +02:00
|
|
|
#!/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
|
2019-01-23 17:27:32 +01:00
|
|
|
## In case the installation is based on LUKS/cryptsetup, we need to keep
|
|
|
|
## the generated cryptsetup's configuration.
|
2017-08-18 20:17:46 +02:00
|
|
|
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
|