* guixsd install questions
@ 2017-01-27 8:29 Divan Santana
2017-01-27 19:24 ` Marius Bakke
2017-01-28 23:20 ` Ludovic Courtès
0 siblings, 2 replies; 11+ messages in thread
From: Divan Santana @ 2017-01-27 8:29 UTC (permalink / raw)
To: help-guix
Hi All,
Few newbie questions regarding install.
* How to get sshd running on install image for easier remote install.
Useful for a VM:
I'm doing this nasty hack for now.
Get ssh working on boot image:
#+BEGIN_EXAMPLE
guix package -i shadow openssh
export PATH="/root/.guix-profile/bin:/root/.guix-profile/sbin${PATH:+}$PATH"
zile /etc/passwd # add sshd account
zile /etc/shadow # add sshd account
mkdir /etc/ssh
echo "PermitRootLogin yes" > /etc/ssh/sshd_config
ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key
`which sshd`
passwd root
#+END_EXAMPLE
Sure there's a better way then the above hack?
Then then use Emacs tramp to put my install system manifest in place:
Using emacs to remotely edit the file, which requires sshd on the
install image.
#+BEGIN_SRC emacs-lisp
;; TRAMP and guix settings
(setq tramp-default-method "ssh")
;; workaround for guixsd
;; https://lists.gnu.org/archive/html/help-guix/2016-10/msg00049.html
;; Make sure we work on remote guixsd machines :)
(setq tramp-remote-path
(append tramp-remote-path
'("~/.guix-profile/bin" "~/.guix-profile/sbin"
"/run/current-system/profile/bin"
"/run/current-system/profile/sbin")))
#+END_SRC
Then one can open this path:
=/ssh:root@192.168.122.236:/mnt/etc/config.scm= with tramp.
* How to setup encrypted root with mdadm software raid 0?
I've done the following and none are working yet.
Partitioning
#+BEGIN_EXAMPLE
fdisk, one partition of each only marked as fd
mdadm --create --level=0 --raid-devices=2 /dev/md0 /dev/vd[bc]1
cryptsetup luksFormat /dev/md0
cryptsetup luksOpen /dev/md0 crypt
mkfs.ext4 -L root -m2 /dev/mapper/crypt
mount /dev/mapper/crypt /mnt
#+END_EXAMPLE
Then do the install with this guile code:
#+BEGIN_SRC scheme
;; two devices in raid0 striped with LUKS full disk encryption.
(bootloader (grub-configuration (device "/dev/vdb")))
(mapped-devices (list
(mapped-device
(source (list "/dev/vdb1" "/dev/vdc1"))
(target "/dev/md0")
(type raid-device-mapping))
(mapped-device
(source (uuid "fb29c6f6-b2c0-4c87-8651-4962b7125dc0"))
(target "crypt")
(type luks-device-mapping))))
#+END_SRC
And this too:
#+BEGIN_SRC scheme
(file-systems (cons (file-system
(device "root")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
#+END_SRC
The above fails. So tried another install with device like so
#+BEGIN_SRC scheme
(file-systems (cons (file-system
(device "/dev/mapper/crypt")
(title 'device)
(mount-point "/")
(type "ext4"))
%base-file-systems))
#+END_SRC
That failed, I then tried the UUID method, via =blkid
/dev/mapper/crypt=, get the UUID and did another install with this
snippet instead:
#+BEGIN_SRC scheme
(file-systems (cons (file-system
(device (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb"))
(title 'uuid)
(mount-point "/")
(type "ext4"))
%base-file-systems))
#+END_SRC
This fails with waiting for root device.
* How to recover a failed install. How to chroot a broken system and
fix?
You can see why I'm asking this. When my failed crypt install fails, I
sometimes just want to reconfigure the system to try another method.
Now when I run =guix system init /mnt/etc/config.scm /mnt= to recover
the install to the same preveiously install disk it re-downloads,
re-compiles and redoes the whole install, instead of just perhaps
changing grub to (attempt to) fix my crypt issue.
Ideally I want to chroot into the installed (and broken) environment and
do a =guix system reconfigure /etc/config.scm=.
How can one do this?
* How to use a proxy to do the install
This is from the boot install media.
I've read the docs on using proxy though it's not working like I expect.
Prob doing something wrong.
I've done the following
On tt1 I did =herd stop guix-daemon=
Then exported proxy like so:
export http_proxy=http://server.domain.co.za:8080/ ; export ftp_proxy=$http_proxy ; export https_proxy=$http_proxy
=herd start guix-daemon=
=guix package -i something= and note the proxy is not working.
Try do the install =guix system init /mnt/etc/config.scm /mnt= and note
the proxy env is not being used.
Greetings from South Africa :)
--
Best regards,
Divan Santana
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-27 8:29 guixsd install questions Divan Santana
@ 2017-01-27 19:24 ` Marius Bakke
2017-01-27 19:29 ` Marius Bakke
2017-02-05 7:14 ` Divan Santana
2017-01-28 23:20 ` Ludovic Courtès
1 sibling, 2 replies; 11+ messages in thread
From: Marius Bakke @ 2017-01-27 19:24 UTC (permalink / raw)
To: Divan Santana, help-guix
[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]
Divan Santana <divan@santanas.co.za> writes:
> Hi All,
>
> Few newbie questions regarding install.
>
> * How to get sshd running on install image for easier remote install.
>
> Useful for a VM:
>
> I'm doing this nasty hack for now.
>
> Get ssh working on boot image:
> #+BEGIN_EXAMPLE
> guix package -i shadow openssh
> export PATH="/root/.guix-profile/bin:/root/.guix-profile/sbin${PATH:+}$PATH"
> zile /etc/passwd # add sshd account
> zile /etc/shadow # add sshd account
> mkdir /etc/ssh
> echo "PermitRootLogin yes" > /etc/ssh/sshd_config
> ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key
> `which sshd`
> passwd root
> #+END_EXAMPLE
>
> Sure there's a better way then the above hack?
Hi Divan,
That is a nasty hack indeed. Yet it's about the best approach right now.
I think it could be useful to ship a SSH server in the install image.
You can generate a disk image containing a service for "lsh" by adding
something like this to the file "gnu/system/install.scm", under
"%installation-services".
(lsh-service #:port-number 22
#:root-login? #t
#:password-authentication? #f
;; The root account is passwordless, so
;; make sure a password is required.
#:allow-empty-passwords? #f)
Then generate a new disk image with
`guix system disk-image --image-size=1G gnu/system/install.scm`.
Can you try that? If it works, feel free to submit it as a patch to the
"guix-devel" mailing list and we can consider adding it to the next
release.
Thanks for the report! Unfortunately I don't know the answer to the
other questions.
> Greetings from South Africa :)
Welcomings from Norway! :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-27 19:24 ` Marius Bakke
@ 2017-01-27 19:29 ` Marius Bakke
2017-02-05 7:14 ` Divan Santana
1 sibling, 0 replies; 11+ messages in thread
From: Marius Bakke @ 2017-01-27 19:29 UTC (permalink / raw)
To: Divan Santana, help-guix
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
Marius Bakke <mbakke@fastmail.com> writes:
> (lsh-service #:port-number 22
> #:root-login? #t
> #:password-authentication? #f
Sorry, this should be: #:password-authentication? #t
..so that users can SSH in if they set a password first.
Hope this helps! :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-27 19:24 ` Marius Bakke
2017-01-27 19:29 ` Marius Bakke
@ 2017-02-05 7:14 ` Divan Santana
1 sibling, 0 replies; 11+ messages in thread
From: Divan Santana @ 2017-02-05 7:14 UTC (permalink / raw)
To: Marius Bakke; +Cc: help-guix
Marius Bakke <mbakke@fastmail.com> writes:
>> * How to get sshd running on install image for easier remote install.
>>
>> Useful for a VM:
>>
>> I'm doing this nasty hack for now.
>>
>> Get ssh working on boot image:
>> #+BEGIN_EXAMPLE
>> guix package -i shadow openssh
>> export PATH="/root/.guix-profile/bin:/root/.guix-profile/sbin${PATH:+}$PATH"
>> zile /etc/passwd # add sshd account
>> zile /etc/shadow # add sshd account
>> mkdir /etc/ssh
>> echo "PermitRootLogin yes" > /etc/ssh/sshd_config
>> ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key
>> `which sshd`
>> passwd root
>> #+END_EXAMPLE
>>
>> Sure there's a better way then the above hack?
>
> Hi Divan,
>
> That is a nasty hack indeed. Yet it's about the best approach right now.
>
> I think it could be useful to ship a SSH server in the install image.
> You can generate a disk image containing a service for "lsh" by adding
> something like this to the file "gnu/system/install.scm", under
> "%installation-services".
>
> (lsh-service #:port-number 22
> #:root-login? #t
> #:password-authentication? #f
> ;; The root account is passwordless, so
> ;; make sure a password is required.
> #:allow-empty-passwords? #f)
>
> Then generate a new disk image with
> `guix system disk-image --image-size=1G gnu/system/install.scm`.
>
> Can you try that? If it works, feel free to submit it as a patch to the
> "guix-devel" mailing list and we can consider adding it to the next
> release.
Thanks a ton for the feedback.
I'll certainly try look into this and when I do, give feedback.
--
Best regards,
Divan Santana
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-27 8:29 guixsd install questions Divan Santana
2017-01-27 19:24 ` Marius Bakke
@ 2017-01-28 23:20 ` Ludovic Courtès
2017-02-05 7:25 ` Divan Santana
2017-06-30 20:49 ` Divan Santana
1 sibling, 2 replies; 11+ messages in thread
From: Ludovic Courtès @ 2017-01-28 23:20 UTC (permalink / raw)
To: Divan Santana; +Cc: help-guix
Hello!
Divan Santana <divan@santanas.co.za> skribis:
> Then do the install with this guile code:
>
> #+BEGIN_SRC scheme
> ;; two devices in raid0 striped with LUKS full disk encryption.
> (bootloader (grub-configuration (device "/dev/vdb")))
> (mapped-devices (list
> (mapped-device
> (source (list "/dev/vdb1" "/dev/vdc1"))
> (target "/dev/md0")
> (type raid-device-mapping))
> (mapped-device
> (source (uuid "fb29c6f6-b2c0-4c87-8651-4962b7125dc0"))
> (target "crypt")
> (type luks-device-mapping))))
> #+END_SRC
>
>
> And this too:
>
> #+BEGIN_SRC scheme
> (file-systems (cons (file-system
> (device "root")
> (title 'label)
> (mount-point "/")
> (type "ext4"))
> %base-file-systems))
> #+END_SRC
>
>
> The above fails. So tried another install with device like so
Do you know how it fails?
My guess is that you’d need to explicitly mark one of the mapped device
as depending on the other; this cannot be guessed.
If you run “guix system shepherd-graph” on your config you’ll probably
see that there’s no such dependency.
Currently dependencies among mapped devices cannot be expressed, but
that’s easy to fix (by providing a ‘dependencies’ field as in
‘file-system’.)
> That failed, I then tried the UUID method, via =blkid
> /dev/mapper/crypt=, get the UUID and did another install with this
> snippet instead:
>
> #+BEGIN_SRC scheme
> (file-systems (cons (file-system
> (device (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb"))
> (title 'uuid)
> (mount-point "/")
> (type "ext4"))
> %base-file-systems))
> #+END_SRC
>
> This fails with waiting for root device.
Probably same problem as above.
For now, using just RAID or just LUKS will work; it’s the combination
that’s not supported yet.
> * How to recover a failed install. How to chroot a broken system and
> fix?
>
> You can see why I'm asking this. When my failed crypt install fails, I
> sometimes just want to reconfigure the system to try another method.
>
> Now when I run =guix system init /mnt/etc/config.scm /mnt= to recover
> the install to the same preveiously install disk it re-downloads,
> re-compiles and redoes the whole install, instead of just perhaps
> changing grub to (attempt to) fix my crypt issue.
>
> Ideally I want to chroot into the installed (and broken) environment and
> do a =guix system reconfigure /etc/config.scm=.
>
> How can one do this?
I guess you could boot the install image, mount the target file system,
chroot in it, run guix-daemon in there, and run ‘guix system
reconfigure’ there.
That should work though that’s inconvenient at best.
> * How to use a proxy to do the install
>
> This is from the boot install media.
>
> I've read the docs on using proxy though it's not working like I expect.
> Prob doing something wrong.
>
> I've done the following
>
> On tt1 I did =herd stop guix-daemon=
> Then exported proxy like so:
> export http_proxy=http://server.domain.co.za:8080/ ; export ftp_proxy=$http_proxy ; export https_proxy=$http_proxy
>
> =herd start guix-daemon=
The ‘http_proxy’ variable needs to be set in the environment of the
‘guix-daemon’ process itself, which is why this doesn’t work. We should
make it easier to choose a proxy, for instance by having the daemon
honor client-provided proxy settings.
In addition, note that ‘https_proxy’ and ‘ftp_proxy’ are not supported
yet.
Thanks a lot for your detailed feedback!
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-28 23:20 ` Ludovic Courtès
@ 2017-02-05 7:25 ` Divan Santana
2017-02-07 14:48 ` Ludovic Courtès
2017-06-30 20:49 ` Divan Santana
1 sibling, 1 reply; 11+ messages in thread
From: Divan Santana @ 2017-02-05 7:25 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: help-guix
Ludovic Courtès <ludo@gnu.org> writes:
> Hello!
>
> Divan Santana <divan@santanas.co.za> skribis:
>
>> Then do the install with this guile code:
>>
>> #+BEGIN_SRC scheme
>> ;; two devices in raid0 striped with LUKS full disk encryption.
>> (bootloader (grub-configuration (device "/dev/vdb")))
>> (mapped-devices (list
>> (mapped-device
>> (source (list "/dev/vdb1" "/dev/vdc1"))
>> (target "/dev/md0")
>> (type raid-device-mapping))
>> (mapped-device
>> (source (uuid "fb29c6f6-b2c0-4c87-8651-4962b7125dc0"))
>> (target "crypt")
>> (type luks-device-mapping))))
>> #+END_SRC
>>
>>
>> And this too:
>>
>> #+BEGIN_SRC scheme
>> (file-systems (cons (file-system
>> (device "root")
>> (title 'label)
>> (mount-point "/")
>> (type "ext4"))
>> %base-file-systems))
>> #+END_SRC
>>
>>
>> The above fails. So tried another install with device like so
>
> Do you know how it fails?
No unfortunately I didn't document it at the time. Though I'll do a
better job of it next time I give it a go and give feedback.
> My guess is that you’d need to explicitly mark one of the mapped device
> as depending on the other; this cannot be guessed.
>
> If you run “guix system shepherd-graph” on your config you’ll probably
> see that there’s no such dependency.
>
> Currently dependencies among mapped devices cannot be expressed, but
> that’s easy to fix (by providing a ‘dependencies’ field as in
> ‘file-system’.)
I'll give this a try thanks.
>> That failed, I then tried the UUID method, via =blkid
>> /dev/mapper/crypt=, get the UUID and did another install with this
>> snippet instead:
>>
>> #+BEGIN_SRC scheme
>> (file-systems (cons (file-system
>> (device (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb"))
>> (title 'uuid)
>> (mount-point "/")
>> (type "ext4"))
>> %base-file-systems))
>> #+END_SRC
>>
>> This fails with waiting for root device.
>
> Probably same problem as above.
>
> For now, using just RAID or just LUKS will work; it’s the combination
> that’s not supported yet.
>> * How to recover a failed install. How to chroot a broken system and
>> fix?
>>
>> You can see why I'm asking this. When my failed crypt install fails, I
>> sometimes just want to reconfigure the system to try another method.
>>
>> Now when I run =guix system init /mnt/etc/config.scm /mnt= to recover
>> the install to the same preveiously install disk it re-downloads,
>> re-compiles and redoes the whole install, instead of just perhaps
>> changing grub to (attempt to) fix my crypt issue.
>>
>> Ideally I want to chroot into the installed (and broken) environment and
>> do a =guix system reconfigure /etc/config.scm=.
>>
>> How can one do this?
>
> I guess you could boot the install image, mount the target file system,
> chroot in it, run guix-daemon in there, and run ‘guix system
> reconfigure’ there.
>
> That should work though that’s inconvenient at best.
I'll give it a try and let you know.
>> * How to use a proxy to do the install
>>
>> This is from the boot install media.
>>
>> I've read the docs on using proxy though it's not working like I expect.
>> Prob doing something wrong.
>>
>> I've done the following
>>
>> On tt1 I did =herd stop guix-daemon=
>> Then exported proxy like so:
>> export http_proxy=http://server.domain.co.za:8080/ ; export ftp_proxy=$http_proxy ; export https_proxy=$http_proxy
>>
>> =herd start guix-daemon=
>
> The ‘http_proxy’ variable needs to be set in the environment of the
> ‘guix-daemon’ process itself, which is why this doesn’t work. We should
> make it easier to choose a proxy, for instance by having the daemon
> honor client-provided proxy settings.
Hmm, so what exactly do I need to do to get the http_proxy variable set
in the guix-daemon environment? I've tried exporting on command line,
then starting the daemon but that didn't work.
> Thanks a lot for your detailed feedback!
Thanks a lot for the awesome work on GuixSD!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-02-05 7:25 ` Divan Santana
@ 2017-02-07 14:48 ` Ludovic Courtès
0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2017-02-07 14:48 UTC (permalink / raw)
To: Divan Santana; +Cc: help-guix
Divan Santana <divan@santanas.co.za> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
[...]
>>> On tt1 I did =herd stop guix-daemon=
>>> Then exported proxy like so:
>>> export http_proxy=http://server.domain.co.za:8080/ ; export ftp_proxy=$http_proxy ; export https_proxy=$http_proxy
>>>
>>> =herd start guix-daemon=
>>
>> The ‘http_proxy’ variable needs to be set in the environment of the
>> ‘guix-daemon’ process itself, which is why this doesn’t work. We should
>> make it easier to choose a proxy, for instance by having the daemon
>> honor client-provided proxy settings.
>
> Hmm, so what exactly do I need to do to get the http_proxy variable set
> in the guix-daemon environment? I've tried exporting on command line,
> then starting the daemon but that didn't work.
You'd have to start guix-daemon “by hand” (rather than via shepherd),
which is not great. We should add a knob to configure this through
‘guix-configuration’ in GuixSD.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-01-28 23:20 ` Ludovic Courtès
2017-02-05 7:25 ` Divan Santana
@ 2017-06-30 20:49 ` Divan Santana
2017-07-01 14:05 ` Ludovic Courtès
1 sibling, 1 reply; 11+ messages in thread
From: Divan Santana @ 2017-06-30 20:49 UTC (permalink / raw)
To: Ludovic Courtès, help-guix
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> Hello!
>
> Divan Santana <divan@santanas.co.za> skribis:
>
>> Then do the install with this guile code:
>>
>> #+BEGIN_SRC scheme
>> ;; two devices in raid0 striped with LUKS full disk encryption.
>> (bootloader (grub-configuration (device "/dev/vdb")))
>> (mapped-devices (list
>> (mapped-device
>> (source (list "/dev/vdb1" "/dev/vdc1"))
>> (target "/dev/md0")
>> (type raid-device-mapping))
>> (mapped-device
>> (source (uuid "fb29c6f6-b2c0-4c87-8651-4962b7125dc0"))
>> (target "crypt")
>> (type luks-device-mapping))))
>> #+END_SRC
>>
>>
>> And this too:
>>
>> #+BEGIN_SRC scheme
>> (file-systems (cons (file-system
>> (device "root")
>> (title 'label)
>> (mount-point "/")
>> (type "ext4"))
>> %base-file-systems))
>> #+END_SRC
>>
>>
>> The above fails. So tried another install with device like so
>
> Do you know how it fails?
I don't have exact details of how it fails.
> My guess is that you’d need to explicitly mark one of the mapped device
> as depending on the other; this cannot be guessed.
>
> If you run “guix system shepherd-graph” on your config you’ll probably
> see that there’s no such dependency.
>
> Currently dependencies among mapped devices cannot be expressed, but
> that’s easy to fix (by providing a ‘dependencies’ field as in
> ‘file-system’.)
So I've tried altering the code and asked on IRC a while back too. I
tried some of the suggestions that were given but none of them worked.
Would you be able to "spell out" for someone clueless what the code
should look like to express the dependencies.
Currently the code looks like this
(bootloader (grub-configuration (device "/dev/vdb")))
(mapped-devices (list
(mapped-device
(source (list "/dev/vdb1" "/dev/vdc1"))
(target "/dev/md0")
(type raid-device-mapping))
(mapped-device
(source (uuid "1c0f1601-97f4-4a3d-9528-cd76130ff919"))
(target "crypt")
(type luks-device-mapping))))
(file-systems (cons (file-system
(device "/dev/mapper/crypt")
(title 'device)
(mount-point "/")
(type "ext4"))
%base-file-systems))
Pre-install I configured the disks like so:
#+BEGIN_EXAMPLE
fdisk, one partition of each only marked as fd
mdadm --create --level=0 --raid-devices=2 /dev/md0 /dev/vd[bc]1
cryptsetup luksFormat /dev/md0
cryptsetup luksOpen /dev/md0 crypt
mkfs.ext4 -L root -m2 /dev/mapper/crypt
mount /dev/mapper/crypt /mnt
#+END_EXAMPLE
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-06-30 20:49 ` Divan Santana
@ 2017-07-01 14:05 ` Ludovic Courtès
2017-07-02 4:53 ` Divan Santana
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2017-07-01 14:05 UTC (permalink / raw)
To: Divan Santana; +Cc: help-guix
Divan Santana <divan@santanas.co.za> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
[...]
>> My guess is that you’d need to explicitly mark one of the mapped device
>> as depending on the other; this cannot be guessed.
>>
>> If you run “guix system shepherd-graph” on your config you’ll probably
>> see that there’s no such dependency.
>>
>> Currently dependencies among mapped devices cannot be expressed, but
>> that’s easy to fix (by providing a ‘dependencies’ field as in
>> ‘file-system’.)
>
> So I've tried altering the code and asked on IRC a while back too. I
> tried some of the suggestions that were given but none of them worked.
>
> Would you be able to "spell out" for someone clueless what the code
> should look like to express the dependencies.
>
> Currently the code looks like this
>
> (bootloader (grub-configuration (device "/dev/vdb")))
> (mapped-devices (list
> (mapped-device
> (source (list "/dev/vdb1" "/dev/vdc1"))
> (target "/dev/md0")
> (type raid-device-mapping))
> (mapped-device
> (source (uuid "1c0f1601-97f4-4a3d-9528-cd76130ff919"))
> (target "crypt")
> (type luks-device-mapping))))
> (file-systems (cons (file-system
> (device "/dev/mapper/crypt")
> (title 'device)
> (mount-point "/")
> (type "ext4"))
> %base-file-systems))
You can have your file system depend on the two mapped devices like
this:
(file-systems (cons (file-system
(device "/dev/mapper/crypt")
(title 'device)
(mount-point "/")
(type "ext4")
(dependencies mapped-devices))
%base-file-systems))
What *cannot* be expressed yet is dependencies among mapped devices.
For that we need to extend the <mapped-device> record with a
‘dependencies’ field like <file-system> does.
You’re welcome to start working on it if you feel like it (and I’d be
happy to help!) and/or submit it to bug-guix@gnu.org.
I hope this is a bit clearer now!
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-07-01 14:05 ` Ludovic Courtès
@ 2017-07-02 4:53 ` Divan Santana
2017-07-02 14:25 ` Ludovic Courtès
0 siblings, 1 reply; 11+ messages in thread
From: Divan Santana @ 2017-07-02 4:53 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: help-guix
Ludovic Courtès <ludo@gnu.org> writes:
> Divan Santana <divan@santanas.co.za> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> My guess is that you’d need to explicitly mark one of the mapped device
>>> as depending on the other; this cannot be guessed.
>>>
>>> If you run “guix system shepherd-graph” on your config you’ll probably
>>> see that there’s no such dependency.
>>>
>>> Currently dependencies among mapped devices cannot be expressed, but
>>> that’s easy to fix (by providing a ‘dependencies’ field as in
>>> ‘file-system’.)
>>
>> So I've tried altering the code and asked on IRC a while back too. I
>> tried some of the suggestions that were given but none of them worked.
>>
>> Would you be able to "spell out" for someone clueless what the code
>> should look like to express the dependencies.
>>
>> Currently the code looks like this
>>
>> (bootloader (grub-configuration (device "/dev/vdb")))
>> (mapped-devices (list
>> (mapped-device
>> (source (list "/dev/vdb1" "/dev/vdc1"))
>> (target "/dev/md0")
>> (type raid-device-mapping))
>> (mapped-device
>> (source (uuid "1c0f1601-97f4-4a3d-9528-cd76130ff919"))
>> (target "crypt")
>> (type luks-device-mapping))))
>> (file-systems (cons (file-system
>> (device "/dev/mapper/crypt")
>> (title 'device)
>> (mount-point "/")
>> (type "ext4"))
>> %base-file-systems))
>
> You can have your file system depend on the two mapped devices like
> this:
>
> (file-systems (cons (file-system
> (device "/dev/mapper/crypt")
> (title 'device)
> (mount-point "/")
> (type "ext4")
> (dependencies mapped-devices))
> %base-file-systems))
>
> What *cannot* be expressed yet is dependencies among mapped devices.
> For that we need to extend the <mapped-device> record with a
> ‘dependencies’ field like <file-system> does.
Ah, I thought there was a workaround to get the combination of
mdadm+luks working.
Currently with your above suggestion it fails to boot post install at
grub with:
error: file `/gnu/store...-raw-initrd' not found.
> You’re welcome to start working on it if you feel like it (and I’d be
> happy to help!) and/or submit it to bug-guix@gnu.org.
I wish. Maybe one day. My coding skills are MIA and time is very
limited. But I do hope to start contributing in some way in time
(besides my FSF financial support).
> I hope this is a bit clearer now!
Thanks. :-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guixsd install questions
2017-07-02 4:53 ` Divan Santana
@ 2017-07-02 14:25 ` Ludovic Courtès
0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2017-07-02 14:25 UTC (permalink / raw)
To: Divan Santana; +Cc: help-guix
Hi,
Divan Santana <divan@santanas.co.za> skribis:
> I wish. Maybe one day. My coding skills are MIA and time is very
> limited. But I do hope to start contributing in some way in time
> (besides my FSF financial support).
Trying out GuixSD and reporting successes and failures like you do is a
good way to get started; thank you.
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-07-02 14:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 8:29 guixsd install questions Divan Santana
2017-01-27 19:24 ` Marius Bakke
2017-01-27 19:29 ` Marius Bakke
2017-02-05 7:14 ` Divan Santana
2017-01-28 23:20 ` Ludovic Courtès
2017-02-05 7:25 ` Divan Santana
2017-02-07 14:48 ` Ludovic Courtès
2017-06-30 20:49 ` Divan Santana
2017-07-01 14:05 ` Ludovic Courtès
2017-07-02 4:53 ` Divan Santana
2017-07-02 14:25 ` Ludovic Courtès
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).