From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Initializing a 64bit system using guix on a 32bit OS Date: Fri, 22 May 2015 13:31:54 -0400 Message-ID: <87a8wwo6wl.fsf@netris.org> References: <87siappuix.fsf@gmail.com> <87bnhclp1j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvqno-0001m1-8a for guix-devel@gnu.org; Fri, 22 May 2015 13:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvqnk-0002wS-4R for guix-devel@gnu.org; Fri, 22 May 2015 13:32:08 -0400 In-Reply-To: <87bnhclp1j.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 22 May 2015 15:28:24 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Alex Kost --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Alex Kost skribis: > >> Hello, I have Guix installed on a 32-bit "ArchLinux", and I use the >> following command to =E2=80=9Cdeploy=E2=80=9D a 64-bit GuixSD: >> >> $ guix system init --no-grub --system=3Dx86_64-linux my-os-config.scm /m= nt/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 =E2=80=98guix system init=E2=80= =99, 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))))) I think this is not sufficient, because it would still use the kernel config for i686. Here's what I used for the kernel: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-LOCAL_ONLY-gnu-Add-linux-libre-64.patch >From 1f6f6c9cfecfc5bf72bdfc97caf7247090c0e1f3 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 20 Apr 2015 23:51:45 -0400 Subject: [PATCH] LOCAL_ONLY: gnu: Add linux-libre-64. --- gnu/packages/linux.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 26e9aa9..c42919d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -64,6 +64,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system python) #:use-module (guix build-system trivial) + #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (srfi srfi-26) #:use-module (ice-9 match)) @@ -308,6 +309,15 @@ It has been modified to remove all non-free binary blobs.") (license gpl2) (home-page "http://www.gnu.org/software/linux-libre/")))) +(define linux-libre-64 + (package (inherit linux-libre) + (arguments + `(#:system "x86_64-linux" + ,@(package-arguments linux-libre))) + (native-inputs + (alist-replace "kconfig" (list (kernel-config "x86_64-linux")) + (package-native-inputs linux-libre))))) + ;;; ;;; Pluggable authentication modules (PAM). -- 2.2.1 --=-=-= Content-Type: text/plain Mark --=-=-=--