diff options
| author | Hilton Chain <hako@ultrarare.space> | 2026-05-03 20:50:19 +0800 |
|---|---|---|
| committer | Hilton Chain <hako@ultrarare.space> | 2026-05-24 23:05:34 +0800 |
| commit | 93635a2bff9a4ec29b8a56a4cc2c1277ec7e7570 (patch) | |
| tree | bfad67faf5578492c9b44f61f79369188de7d41f /gnu/system | |
| parent | 4c824e25c42b8b4c63883fd9188c18374d53a5f1 (diff) | |
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
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/file-systems.scm | 10 |
1 files changed, 7 insertions, 3 deletions
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 <file-system> record." | |||
| 303 | ","))) | 303 | ","))) |
| 304 | 304 | ||
| 305 | (define (file-system-needed-for-boot? fs) | 305 | (define (file-system-needed-for-boot? fs) |
| 306 | "Return true if FS has the 'needed-for-boot?' flag set, or if it holds the | 306 | "Return true if FS has the 'needed-for-boot?' flag set, or if it's used in the |
| 307 | store--e.g., if FS is the root file system." | 307 | boot process--e.g., if FS is the root file system / holds the store." |
| 308 | (or (%file-system-needed-for-boot? fs) | 308 | (or (%file-system-needed-for-boot? fs) |
| 309 | (and (file-prefix? (file-system-mount-point fs) (%store-prefix)) | 309 | (and (any (cut file-prefix? (file-system-mount-point fs) <>) |
| 310 | (list (%store-prefix) | ||
| 311 | "/etc" | ||
| 312 | "/var/lib" | ||
| 313 | "/var/log")) | ||
| 310 | (not (memq 'bind-mount (file-system-flags fs)))))) | 314 | (not (memq 'bind-mount (file-system-flags fs)))))) |
| 311 | 315 | ||
| 312 | (define (file-system->spec fs) | 316 | (define (file-system->spec fs) |
