Use an seperate .mount file instead of the generator.

This commit is contained in:
Hadi Chokr
2025-10-16 09:32:04 +02:00
parent a9cab5fa13
commit 89c3bd24eb
3 changed files with 20 additions and 24 deletions

View File

@@ -106,30 +106,6 @@ EOF
exit 0
fi
# --- Normal system boot phase: essential mounts first ---
# /home subvolume mount
cat <<- EOF > "$normal_dir/home.mount"
# Generated by $(basename "$0")
[Unit]
Description=Home Volume
Before=local-fs.target
After=systemd-remount-fs.service
After=blockdev@dev-gpt\x2dauto\x2droot.target
[Mount]
What=/dev/gpt-auto-root
Where=/home
Type=btrfs
Options=subvol=@home,compress=zstd:1
[Install]
WantedBy=local-fs.target
EOF
mkdir -p "$normal_dir/local-fs.target.requires" || true
ln -sf ../home.mount "$normal_dir/local-fs.target.requires/home.mount"
# --- Optional debug mount for sysexts ---
cat <<- EOF > "$normal_dir/var-lib-extensions-debug.mount"
# Generated by $(basename "$0")

View File

@@ -33,6 +33,7 @@ enable kde-linux-volatile-var-lib-flatpak.service
enable kde-linux-auto-hide-bootloader.service
enable plasma-setup-live-system.service
enable var-lib-snapd-snap.mount
enable home.mount
# also one of ours but not prefixed with kde-linux- so others can use it too
enable etc-factory.service

View File

@@ -0,0 +1,19 @@
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: 2025 Hadi Chokr <hadichokr@icloud.com>
# /etc/systemd/system/home.mount
# Static mount unit for /home Btrfs subvolume
[Unit]
Description=Home Volume
Before=local-fs.target
After=systemd-remount-fs.service
After=blockdev@dev-gpt\x2dauto\x2droot.target
[Mount]
What=/dev/gpt-auto-root
Where=/home
Type=btrfs
Options=subvol=@home,compress=zstd:1
[Install]
WantedBy=local-fs.target