Debian Codegraph @

scripts/mkfs.btrfs-mobian

raw
1 #!/bin/sh
2 # This script exists to create a snapshotable subvolume
3 # for the BTRFS root partition.
4 mkfs.btrfs -f -L 'root' $@
5 targetdisk=$(echo "$@" | awk '{ print $NF }')
6
7 mkdir -p /subvolume
8 mount ${targetdisk} /subvolume
9 btrfs subvolume create /subvolume/root
10 btrfs subvolume set-default /subvolume/root
11 umount /subvolume
12