mirror of
https://github.com/KDE/kde-linux.git
synced 2026-06-16 11:29:18 -04:00
btrfs: compress and simple quota please
should help prevent disk space problems Fixes #10
This commit is contained in:
@@ -23,9 +23,11 @@ umount -R ./*
|
||||
rm -rfv ./*
|
||||
|
||||
mount -o ro /dev/gpt-auto-root /system
|
||||
mount -o rw "$device" "$tmpdir"
|
||||
mount -o rw,compress=zstd:1 "$device" "$tmpdir"
|
||||
cd "$tmpdir"
|
||||
rm -rfv ./*
|
||||
|
||||
btrfs quota enable --simple .
|
||||
btrfs send "/system/@kdeos_$IMAGE_VERSION" | btrfs receive .
|
||||
btrfs subvolume create @home
|
||||
btrfs subvolume create @root
|
||||
|
||||
@@ -20,7 +20,8 @@ FILES=()
|
||||
HOOKS=(base systemd autodetect modconf kms keyboard block sd-encrypt filesystems fsck systemd-extension plymouth microcode)
|
||||
EOF
|
||||
|
||||
echo "rw rootflags=subvol=@kdeos_$IMAGE_VERSION systemd.volatile=overlay systemd.firstboot=false systemd.hostname=kdeos kdeos.live=1 plasma.live.user=live \
|
||||
echo "rw rootflags=subvol=@kdeos_$IMAGE_VERSION,compress=zstd:1 \
|
||||
systemd.volatile=overlay systemd.firstboot=false systemd.hostname=kdeos kdeos.live=1 plasma.live.user=live \
|
||||
lsm=landlock,lockdown,yama,integrity,apparmor,bpf \
|
||||
quiet splash" > cmdline
|
||||
mkinitcpio --config mkinitcpio.conf --generate initrd --kernel "$kernel_version"
|
||||
@@ -31,7 +32,7 @@ ukify build \
|
||||
--output live.efi
|
||||
|
||||
# lsm= defaulting to apparmor from https://wiki.archlinux.org/title/AppArmor
|
||||
echo "rw rootflags=subvol=@kdeos_$IMAGE_VERSION \
|
||||
echo "rw rootflags=subvol=@kdeos_$IMAGE_VERSION,compress=zstd:1 \
|
||||
lsm=landlock,lockdown,yama,integrity,apparmor,bpf \
|
||||
quiet splash" > cmdline
|
||||
mkinitcpio --config mkinitcpio.conf --generate initrd --kernel "$kernel_version"
|
||||
|
||||
@@ -10,6 +10,7 @@ enable apparmor.service
|
||||
enable systemd-oomd.service
|
||||
enable bluetooth.service
|
||||
|
||||
enable kde-linux-btrfs.service
|
||||
enable kde-linux-live-setup.service
|
||||
enable plasma-setup-live-system.service
|
||||
enable kdeos-overlay.service
|
||||
|
||||
13
mkosi.extra/usr/lib/systemd/system/kde-linux-btrfs.service
Normal file
13
mkosi.extra/usr/lib/systemd/system/kde-linux-btrfs.service
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
# SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
|
||||
|
||||
[Unit]
|
||||
Description=Configuring Root Filesystem
|
||||
# live has an overlayed /, don't try to fiddle with it
|
||||
ConditionKernelCommandLine=!kdeos.live=1
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/btrfs quota enable --simple /system
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user