From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: mounting NTFS read-write Date: Mon, 05 Feb 2018 14:34:25 +0100 Message-ID: <87r2pzblwe.fsf@gnu.org> References: <20180204225925.6a436bbc@jasniac.instanton> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eigun-0002JO-34 for help-guix@gnu.org; Mon, 05 Feb 2018 08:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eigui-0005Q4-VM for help-guix@gnu.org; Mon, 05 Feb 2018 08:34:33 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:40556) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eigui-0005P9-O9 for help-guix@gnu.org; Mon, 05 Feb 2018 08:34:28 -0500 In-Reply-To: <20180204225925.6a436bbc@jasniac.instanton> (Marco van Hulten's message of "Sun, 04 Feb 2018 22:59:25 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Marco van Hulten Cc: help-guix@gnu.org Hi Marco, Marco van Hulten skribis: > I have this in my Guix configuration: > > (file-system > (device "my-scratch") > (title 'label) > (mount-point "/scratch") > (type "ntfs") > (flags '(read-write user))) > > There are two problems with it. > > 1. The file system with label 'my-scratch' is not found. Of course, I > can use (device "/dev/sda6") instead. But why can it not use the > label? It does turn up in cfdisk(8), just like for the root file > system /dev/sda1. The code in (gnu build file-systems) currently supports labels for ext2/3/4, Btrfs, LUKS, FAT, and ISO9660. It does not support NTFS. Two options: 1. Implement the missing bits in (gnu build file-systems). :-) It=E2=80=99s really not that hard, there are examples you can use as a starting point. 2. Stick to /dev/foo. > 2. The flags are ignored. At least the first one, read-write, is > likely ignored because Linux does not support write access to NTFS > file systems. Then I looked in the manual [1], and found out that the > flags read-write and user do not exist. The former is maybe redundant > because it is default (in case there is support for writable mount of > the respective filesystem!), but the second could be useful, at least > for removable media (though for that might exist other solutions). OK. I think =E2=80=98file-system=E2=80=99 declarations don=E2=80=99t work with = FUSE file systems, though. Currently we just call mount(2) with the given system type, whereas for NTFS it would need to invoke the mount.ntfs-3g program. This is what would need to be fixed. > Instead, NTFS file systems can be mounted with write access through > fuse, using ntfs-3g. So I installed ntfs-3g, and added a cron job to > my /etc/config.scm; excerpt here: > > > (use-modules (gnu services mcron)) > ... > (define mount-ntfs-job > #~(job "@reboot" > "/root/.guix-profile/sbin/mount.ntfs-3g -o > rw /dev/sda6 /scratch")) You could follow the Findutils example in instead of use /root/.guix-profile. However I don=E2=80=99t think =E2=80=9C@reboot=E2=80=9D is supposed by mcro= n. HTH, Ludo=E2=80=99.