help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guixsd install questions


From: Divan Santana
Subject: Re: guixsd install questions
Date: Fri, 30 Jun 2017 22:49:55 +0200

Hi Ludo,

Ludovic Courtès <address@hidden> writes:

> Hello!
>
> Divan Santana <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]