unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Ignas Lapėnas" <ignas@lapenas.dev>
To: Caleb Herbert <csh@bluehome.net>
Cc: help-guix@gnu.org
Subject: Re: Always mount external disk
Date: Mon, 19 Aug 2024 12:04:42 +0300	[thread overview]
Message-ID: <87v7zwyjbp.fsf@lapenas.dev> (raw)
In-Reply-To: <2f251f4ead345ff601142c27b91c24c2bb793d9e.camel@bluehome.net> (Caleb Herbert's message of "Fri, 16 Aug 2024 18:29:10 -0500")

Hi,

Best example I could find was under guix/tests/system.scm, on how maybe
the service is used. Unsure.

>  ;; Make sure that mapped devices with at least one needed-for-boot user are
>  ;; handled exclusively from the initrd.  See <https://bugs.gnu.org/31889>.
>  (append-map file-system-dependencies
>              (service-value
>               ((@@ (gnu system) non-boot-file-system-service)
>                (operating-system
>                  (inherit %os-with-mapped-device)
>                  (file-systems
>                   (list (file-system
>                           (mount-point "/foo/bar")
>                           (device "qux:baz")
>                           (type "none")
>                           (dependencies (list %luks-device)))
>                         (file-system
>                           (device (file-system-label "my-root"))
>                           (mount-point "/")
>                           (type "ext4")
>                           (dependencies (list %luks-device))))))))))

It seems that 'non-boot-file-system-service' differs from
'boot-file-system-service' with the variable 'file-system-needed-for-boot?'

> (define (non-boot-file-system-service os)
>   "Return the file system service for the file systems of OS that are not
> marked as 'needed-for-boot'."
>   (define file-systems
>     (remove file-system-needed-for-boot?
>             (operating-system-file-systems os)))

Looking at the 'file-system' definition, it seems that you could try
changing 'mount-may-fail?' to #t. It may or may not help.

> (define-record-type* <file-system> file-system
>   make-file-system
>   file-system?
>   (device                file-system-device)               ; string | <uuid> | <file-system-label>
>   (mount-point           file-system-mount-point)          ; string
>   (type                  file-system-type)                 ; string
>   (flags                 file-system-flags                 ; list of symbols
>                          (default '())
>                          (sanitize validate-file-system-flags))
>   (options               file-system-options               ; string or #f
>                          (default #f))
>   (mount?                file-system-mount?                ; Boolean
>                          (default #t))
>   (mount-may-fail?       file-system-mount-may-fail?       ; Boolean
>                          (default #f))
>   (needed-for-boot?      %file-system-needed-for-boot?     ; Boolean
>                          (default #f))
>   (check?                file-system-check?                ; Boolean
>                          (default #t))
>   (skip-check-if-clean?  file-system-skip-check-if-clean?  ; Boolean
>                          (default #t))
>   (repair                file-system-repair                ; symbol or #f
>                          (default 'preen))
>   (create-mount-point?   file-system-create-mount-point?   ; Boolean
>                          (default #f))
>   (dependencies          file-system-dependencies          ; list of <file-system>
>                          (default '()))                    ; or <mapped-device>
>   (shepherd-requirements file-system-shepherd-requirements ; list of symbols
>                          (default '()))
>   (location              file-system-location
>                          (default (current-source-location))
>                          (innate)))

Hope any of these findings might help.
Also a lot of great info could be found on guix-cookbook.
https://guix.gnu.org/en/cookbook/en/guix-cookbook.html
Sometimes I find reading the source code directly is actually much
clearer than the manual.

-- 
Best Regards,
Ignas Lapėnas


  reply	other threads:[~2024-08-19  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 23:29 Always mount external disk Caleb Herbert
2024-08-19  9:04 ` Ignas Lapėnas [this message]
2024-08-20 10:17 ` Marek Paśnikowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v7zwyjbp.fsf@lapenas.dev \
    --to=ignas@lapenas.dev \
    --cc=csh@bluehome.net \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).