unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Théo Tyburn" <theo.tyburn@gmail.com>
To: help-guix@gnu.org
Subject: 
Date: Fri, 8 Oct 2021 15:24:17 +0000	[thread overview]
Message-ID: <CACcFj3mOY9_S7sQH2fD2nSUwaUoX_whyZub9LGQFwdUhBshuGg@mail.gmail.com> (raw)

Hi :)

I'm trying to mount an internal hard drive with ntfs partition
automatically when I boot. So I added this to
file-systems in my operating-system definition :

(file-system
    (device "/dev/sdb1")
    (mount-point "/mnt/ihd")
    (type "ntfs")
    (check? #f))

By doing so the filesystem is owned by root and other users don't have
any permissions on it.

So based on what I found running "man mount" I tried adding one after
the other these options
(options "rw"), (options "defaults"), (options "guid=users,umask=000")

so for example I tried
(file-system
    (device "/dev/sdb1")
    (mount-point "/mnt/ihd")
    (type "ntfs")
    (options "rw")
    (check? #f))

but I always get the same error when I reboot after reconfiguring:
'ntfs: (device sdb1): parse_options(): Unrecognized mount option rw'

From what I found here
https://wiki.archlinux.org/title/Udisks#NTFS_mount_failing
the problem might come from the fact that the ntfs used is that from the kernel
and not the version from ntfs-3g.
The first doens't seem to recognize mount options.

This might also be linked to another problem : notice I add the field
(check? #f).
Without it I got the error :
"ntfsfix : no such file or directory"
I guess ntfsfix also comes bundled with ntfs-3g
so it would make sense that these two bugs have the same origin.

So the question is : how do I make make guix use the ntfs-3g package
in my operating system definition ?
Of course the package is available in the package list of the
operating system definition.

I looked a bit at the source but couldn't figure out how the command
(mount.ntfs or mount.ntfs-3g)
is selected depending on the fs type.
The decisive steps seem to happen in the "mount-file-system" define*
at the end of gnu/build/file-system.scm.
What I don't understand there is what "(mount source target type flags
options)" does,
because I don't find where (mount) is defined.
This is as far as my guile/geiser hacking level can take me for now.
If sommeone can explain me, I'd be gratefull !

Théo Tyburn


             reply	other threads:[~2021-10-08 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 15:24 Théo Tyburn [this message]
2021-10-08 16:24 ` Mounting ntfs-3g file systems at Guix System boot time Tobias Geerinckx-Rice
2021-10-08 17:55   ` Théo Tyburn

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=CACcFj3mOY9_S7sQH2fD2nSUwaUoX_whyZub9LGQFwdUhBshuGg@mail.gmail.com \
    --to=theo.tyburn@gmail.com \
    --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).