From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnaud B Subject: Re: Instantiating the OS declaration after a small change Date: Fri, 6 Apr 2018 15:03:05 +0200 Message-ID: References: <87woxk212f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c7b8a5b6b2905692daddb" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4R1P-0005yh-KT for help-guix@gnu.org; Fri, 06 Apr 2018 09:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f4R1J-0003Vl-H8 for help-guix@gnu.org; Fri, 06 Apr 2018 09:03:15 -0400 In-Reply-To: <87woxk212f.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: help-guix@gnu.org --f403045c7b8a5b6b2905692daddb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Ludo Thanks for helping me. Actually I had come up with that declaration : (file-systems (cons* (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4")) (file-system (device "backup3") (title 'label) ;; ntfs uuid requires conversion (mount-point "/home/arnaud/backup3") (needed-for-boot? #f) (mount? #t) (flags '()) ;; options such as ro come here (type "ntfs-3g")) %base-file-systems)) but reading the sources in guix/file-systems.scm, I see that is not an option in fact. But I see that besides ext and btrfs there is now support for luks encrypted partitions in the way, and that is great news for my other disks. So, for the ntfs one, I guess I'll have to manually mount / unmount it as you explained. Actually, after installing the ntfs-3g package, it worked with this : sudo ntfs-3g -o uid=3D1000 -o gid=3D998 /dev/sdb1 /home/arnaud/backup3/ The uid / gid bits were necessary to get read-write access ; it worked flawlessly in console but not in Gnome's file manager for some reason, but that didn't bother me as I rely on emacs dired instead. As for the GUI, yes I'm using Gnome at the moment but I intend to go back to my usual stumpwm, as I have not managed to have guile-wm running (but on paper that would be awesome - without the capital of course !) Cheers Arnaud 2018-04-06 10:26 GMT+02:00 Ludovic Court=C3=A8s : > Hello, > > Arnaud B skribis: > > > Context : > > In the process of trying to build packages, through the use of guix > > environments, I need more space on my home partition. > > To do so, deleting former generations followed by 'guix gc' was not > enough, > > and I need to move things to my external ntfs drive (please don't ask > why I > > have to use that file system...). > > As I'm regularly going to mount it, I added a file-system declaration i= n > my > > config.scm. > > OK. > > > Question : > > Do I have to apply 'guix system reconfigure', a lenghty process (on my > > computer at least) for such a small change, especially if I did not wri= te > > it correctly, or is there another possibility ? I actually just want t= o > > test that file system declaration. > > From 6.2.13 of the manual, I'm thinking about 'guix system build'. Or > could > > I do it temporarily in another scm file ? > > I have a similar use case: an external HDD that I plug in from time to > time. > > What I do is declare it as not being automatically mounted on startup: > > (file-system > (title 'uuid) > (device (uuid "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee")) > (mount-point "/mnt/disk") > (type "ext3") > (mount? #f)) > > This adds an entry to /etc/fstab so when I plug it in, I can simply time > =E2=80=9Csudo mount /mnt/disk=E2=80=9D. > > Now, if you use GNOME or similar, the udisks service and its friends are > support to automatically mount partitions from removable storage. > > HTH, > Ludo=E2=80=99. > --f403045c7b8a5b6b2905692daddb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hel= lo Ludo
Thanks for helping me.
Actually I had come up with that declaration :
=C2=A0 (file-systems (cons* (file-system
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (device "my-root")
=C2= =A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (title 'label)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mount-point &quo= t;/")
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (type "ext4"))
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (file-system
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (device "backup3")
=C2=A0 = =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (title 'label)=C2=A0=C2=A0=C2=A0 ;= ; ntfs uuid requires conversion
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (mount-point "/home/arnaud/backup3")
= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (needed-for-boot? #f)
= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mount? #t)=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (flags '())=C2=A0= =C2=A0 ;; options such as ro come here
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (type "ntfs-3g"))
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 %base-file-systems))
but reading the so= urces in guix/file-systems.scm, I see that is not an option in fact. But I = see that besides ext and btrfs there is now support for luks encrypted part= itions in the way, and that is great news for my other disks.

So, for the ntfs one= , I guess I'll have to manually mount / unmount it as you explained. Ac= tually, after installing the ntfs-3g package, it worked with this :
sudo ntfs-3g -o uid=3D1000 -o gid=3D998 /dev/sdb1 /home/arnau= d/backup3/
The uid / gid bits were necessary = to get read-write access ; it worked flawlessly in console but not in Gnome= 's file manager for some reason, but that didn't bother me as I rel= y on emacs dired=C2=A0 instead.

<= /div>
As for the GUI,= yes I'm using Gnome at the moment but I intend to go back to my usual = stumpwm, as I have not managed to have guile-wm running (but on paper that = would be awesome - without the capital of course !)

Cheers

Arnaud


2018-04-06 10:26 GMT+02:00 Ludovic = Court=C3=A8s <ludo@gnu.org>:
= Hello,

Arnaud B <arnaud.beaudhuin= @gmail.com> skribis:

> Context :
> In the process of trying to build packages, through the use of guix > environments, I need more space on my home partition.
> To do so, deleting former generations followed by 'guix gc' wa= s not enough,
> and I need to move things to my external ntfs drive (please don't = ask why I
> have to use that file system...).
> As I'm regularly going to mount it, I added a file-system declarat= ion in my
> config.scm.

OK.

> Question :
> Do I have to apply 'guix system reconfigure', a lenghty proces= s (on my
> computer at least) for such a small change, especially if I did not wr= ite
> it correctly, or is there another possibility ?=C2=A0 I actually just = want to
> test that file system declaration.
> From 6.2.13 of the manual, I'm thinking about 'guix system bui= ld'. Or could
> I do it temporarily in another scm file ?

I have a similar use case: an external HDD that I plug in from time = to
time.

What I do is declare it as not being automatically mounted on startup:

=C2=A0 =C2=A0 =C2=A0(file-system
=C2=A0 =C2=A0 =C2=A0 =C2=A0(title 'uuid)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(device (uuid "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(mount-point "/mnt/disk")
=C2=A0 =C2=A0 =C2=A0 =C2=A0(type "ext3")
=C2=A0 =C2=A0 =C2=A0 =C2=A0(mount? #f))

This adds an entry to /etc/fstab so when I plug it in, I can simply time =E2=80=9Csudo mount /mnt/disk=E2=80=9D.

Now, if you use GNOME or similar, the udisks service and its friends are support to automatically mount partitions from removable storage.

HTH,
Ludo=E2=80=99.

--f403045c7b8a5b6b2905692daddb--