From 93635a2bff9a4ec29b8a56a4cc2c1277ec7e7570 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sun, 3 May 2026 20:50:19 +0800 Subject: file-systems: file-system-needed-for-boot?: Include more mount points. This is useful when separating rootfs into many mount points, especially for mounting tmpfs as /. Mount points in this change are found and tested by booting from a clean rootfs with such setup. * gnu/system/file-systems.scm (file-system-needed-for-boot?): Mark /etc, /var/lib and /var/log as needed for boot. Merges: #8345 --- gnu/system/file-systems.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index ef08bf4de53..8e654394b00 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -303,10 +303,14 @@ string obtained can be used as the option field of a record." ","))) (define (file-system-needed-for-boot? fs) - "Return true if FS has the 'needed-for-boot?' flag set, or if it holds the -store--e.g., if FS is the root file system." + "Return true if FS has the 'needed-for-boot?' flag set, or if it's used in the +boot process--e.g., if FS is the root file system / holds the store." (or (%file-system-needed-for-boot? fs) - (and (file-prefix? (file-system-mount-point fs) (%store-prefix)) + (and (any (cut file-prefix? (file-system-mount-point fs) <>) + (list (%store-prefix) + "/etc" + "/var/lib" + "/var/log")) (not (memq 'bind-mount (file-system-flags fs)))))) (define (file-system->spec fs) -- cgit v1.2.3