unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Divan Santana <divan@santanas.co.za>
To: "Ludovic Courtès" <ludo@gnu.org>, help-guix <help-guix@gnu.org>
Subject: Re: guixsd install questions
Date: Fri, 30 Jun 2017 22:49:55 +0200	[thread overview]
Message-ID: <87d19l9p58.fsf@santanas.co.za> (raw)
In-Reply-To: <878tpu22mu.fsf@gnu.org>

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

  parent reply	other threads:[~2017-06-30 21:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-07-01 14:05     ` Ludovic Courtès
2017-07-02  4:53       ` Divan Santana
2017-07-02 14:25         ` Ludovic Courtès

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=87d19l9p58.fsf@santanas.co.za \
    --to=divan@santanas.co.za \
    --cc=help-guix@gnu.org \
    --cc=ludo@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).