Alex Kost <alez...@gmail.com> skribis:

> Hello, I have Guix installed on a 32-bit "ArchLinux", and I use the
> following command to “deploy” a 64-bit GuixSD:
>
> $ guix system init --no-grub --system=x86_64-linux my-os-config.scm /mnt/guix
>
> However, eventually it fails with the following output:
>
> ...
> downloading `/gnu/store/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' from 
> `http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe' (0.0 MiB 
> installed)...
> http://hydra.gnu.org/nar/qf803k3npvn8632vssc4g3zp0s5klghv-modprobe       0.5 
> KiB transferredkilling process 18626
> guix system: error: build failed: a `x86_64-linux' is required to build 
> `/gnu/store/zckxg5v0pdxb22kyl6jrzawj1wwrfjby-locale.drv', but I am a 
> `i686-linux'

It works as long as there are substitutes available, but some
derivations are not substitutable, as you noticed, and since an i686
host cannot run x86_64 code, you get this error.

> So I'm wondering is there a way to init a 64-bit system from a 32-bit
> one or perhaps it's just not possible?

It actually is possible, but a little bit trickier.  Mark did it a few
weeks ago, though in a slightly different context.  The following should
work:

  1. Install an i686 GuixSD, simply with ‘guix system init’, but use an
     x86_64 kernel.  To do that, you need to explicitly ask for an
     x86_64 kernel and Guix (so that the daemon accepts to build x86_64
     things) in the OS config:

       (define linux-libre-x86_64
         (package (inherit linux-libre)
           (arguments `(#:system "x86_64-linux"
                        ,@(package-arguments linux-libre)))))

       (define guix-x86_64
         (package (inherit guix)
           (arguments `(#:system "x86_64-linux"
                        ,@(package-arguments guix)))))

       (define %my-services
         ;; Make sure the ‘guix-daemon’ services uses ‘guix-x86_64’.
         (map (lambda (mservice)
                (mlet %store-monad ((service mservice))
                  (if (memq 'guix-daemon (service-provision service))
                      (guix-daemon #:guix guix-x86_64)
                      (return service))))
              %base-services))

       (operating-system
         ;; ...
         (kernel linux-libre-x86_64)
         (services %my-services))

     Normally you’ll get the x86_64 kernel and Guix from hydra.gnu.org,
     so no problem.  The rest of the user-land will still be 32-bit.

  2. Boot into the new system, and from there run ‘guix system
     reconfigure’ with a cleaned up OS config.

Let us know how it goes!

Ludo’.

Reply via email to