* Initializing a 64bit system using guix on a 32bit OS
@ 2015-05-21 20:04 Alex Kost
2015-05-22 13:28 ` Ludovic Courtès
0 siblings, 1 reply; 7+ messages in thread
From: Alex Kost @ 2015-05-21 20:04 UTC (permalink / raw
To: guix-devel
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:
--8<---------------cut here---------------start------------->8---
...
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'
--8<---------------cut here---------------end--------------->8---
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?
--
Thanks in advance,
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-21 20:04 Initializing a 64bit system using guix on a 32bit OS Alex Kost
@ 2015-05-22 13:28 ` Ludovic Courtès
2015-05-22 17:31 ` Mark H Weaver
2015-05-24 18:46 ` Alex Kost
0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2015-05-22 13:28 UTC (permalink / raw
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@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’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-22 13:28 ` Ludovic Courtès
@ 2015-05-22 17:31 ` Mark H Weaver
2015-05-23 9:24 ` Alex Kost
2015-05-24 18:46 ` Alex Kost
1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2015-05-22 17:31 UTC (permalink / raw
To: Ludovic Courtès; +Cc: guix-devel, Alex Kost
[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]
ludo@gnu.org (Ludovic Courtès) writes:
> Alex Kost <alezost@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)))))
I think this is not sufficient, because it would still use the kernel
config for i686. Here's what I used for the kernel:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-LOCAL_ONLY-gnu-Add-linux-libre-64.patch --]
[-- Type: text/x-patch, Size: 1234 bytes --]
From 1f6f6c9cfecfc5bf72bdfc97caf7247090c0e1f3 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
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)))))
+
\f
;;;
;;; Pluggable authentication modules (PAM).
--
2.2.1
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
Mark
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-22 17:31 ` Mark H Weaver
@ 2015-05-23 9:24 ` Alex Kost
2015-05-23 14:54 ` Mark H Weaver
0 siblings, 1 reply; 7+ messages in thread
From: Alex Kost @ 2015-05-23 9:24 UTC (permalink / raw
To: Mark H Weaver; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]
Mark H Weaver (2015-05-22 20:31 +0300) wrote:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Alex Kost <alezost@gmail.com> skribis:
[...]
>>> 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)))))
>
> I think this is not sufficient, because it would still use the kernel
> config for i686. Here's what I used for the kernel:
[...]
> 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)))))
> +
Thanks Ludovic and Mark! I tried to follow your advices but eventually
I got the same error:
guix system: error: build failed: a `x86_64-linux' is required to build `/gnu/store/zh42mbm0wvbsz05zr798nchyd3bc7fh6-guix-0.8.2.c2ee19e.drv', but I am a `i686-linux'
I used the following command:
guix system init --no-grub config-64-simple.scm /mnt/guix
I'm attaching the OS config I used. Did I miss anything?
[-- Attachment #2: config-64-simple.scm --]
[-- Type: text/plain, Size: 1837 bytes --]
(use-modules
(gnu)
(guix monads)
(guix store)
((guix build utils) #:select (alist-replace))
(guix packages)
(gnu packages linux)
(gnu packages package-management)
(gnu services base))
(define linux-libre-x86_64
(package
(inherit linux-libre)
(arguments `(#:system "x86_64-linux"
#:tests? #f
,@(package-arguments linux-libre)))
(native-inputs
(alist-replace "kconfig" (list "/mnt/storage/src/guix/gnu/packages/linux-libre-x86_64.conf")
(package-native-inputs linux-libre)))))
(define guix-x86_64
(package
(inherit guix)
(arguments `(#:system "x86_64-linux"
#:tests? #f
,@(package-arguments guix)))))
(define %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-service #:guix guix-x86_64)
(return service))))
%base-services))
(operating-system
(host-name "host")
(timezone "Europe/Moscow")
(kernel linux-libre-x86_64)
(bootloader
(grub-configuration (device "/dev/sda")))
(file-systems
(cons* (file-system
(device "guix")
(title 'label)
(mount-point "/")
(type "ext4"))
%base-file-systems))
(users
(list (user-account
(name "al")
(uid 1000)
(home-directory "/home/al")
(group "users")
(supplementary-groups
'("wheel" "audio" "video")))))
(packages
(cons* iproute
%base-packages))
(services
(cons* (console-keymap-service "dvorak")
%services)))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-23 9:24 ` Alex Kost
@ 2015-05-23 14:54 ` Mark H Weaver
2015-05-23 17:53 ` Alex Kost
0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2015-05-23 14:54 UTC (permalink / raw
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> writes:
> Thanks Ludovic and Mark! I tried to follow your advices but eventually
> I got the same error:
>
> guix system: error: build failed: a `x86_64-linux' is required to
> build
> `/gnu/store/zh42mbm0wvbsz05zr798nchyd3bc7fh6-guix-0.8.2.c2ee19e.drv',
> but I am a `i686-linux'
>
> I used the following command:
>
> guix system init --no-grub config-64-simple.scm /mnt/guix
>
> I'm attaching the OS config I used. Did I miss anything?
I think the problem is that you disabled tests in your 'guix-x86_64'
package, which makes it a different derivation than the one built by
Hydra. In order for this approach to work, you must ensure that you
only use substitutes until you can run a guix-daemon (and guix?) for
x86_64. guix-daemon for i686 can download substitutes for x86_64, but
cannot build anything for x86_64.
Mark
> (define guix-x86_64
> (package
> (inherit guix)
> (arguments `(#:system "x86_64-linux"
> #:tests? #f
> ,@(package-arguments guix)))))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-23 14:54 ` Mark H Weaver
@ 2015-05-23 17:53 ` Alex Kost
0 siblings, 0 replies; 7+ messages in thread
From: Alex Kost @ 2015-05-23 17:53 UTC (permalink / raw
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver (2015-05-23 17:54 +0300) wrote:
> Alex Kost <alezost@gmail.com> writes:
>
>> Thanks Ludovic and Mark! I tried to follow your advices but eventually
>> I got the same error:
>>
>> guix system: error: build failed: a `x86_64-linux' is required to
>> build
>> `/gnu/store/zh42mbm0wvbsz05zr798nchyd3bc7fh6-guix-0.8.2.c2ee19e.drv',
>> but I am a `i686-linux'
>>
>> I used the following command:
>>
>> guix system init --no-grub config-64-simple.scm /mnt/guix
>>
>> I'm attaching the OS config I used. Did I miss anything?
>
> I think the problem is that you disabled tests in your 'guix-x86_64'
> package, which makes it a different derivation than the one built by
> Hydra. In order for this approach to work, you must ensure that you
> only use substitutes until you can run a guix-daemon (and guix?) for
> x86_64. guix-daemon for i686 can download substitutes for x86_64, but
> cannot build anything for x86_64.
Yes, thanks; after sending that message I realized that disabling tests
might affect, so I tried again without “#:tests? #f” and it failed
again.
Originally I disabled tests when I realized that it would try to build
guix and linux (as both sources were downloaded). However I have just
tried again and "zrlp8p8fv75i59ljwih6c15r5229ph0h-guix-0.8.2.c2ee19e" is
being downloaded right now! So apparently the problem was that
"c2ee19e" snapshot wasn't built on hydra the first time I performed
"guix system init".
So it looks like this time the process is going to be finished
succesfully (I'll report about the result).
--
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Initializing a 64bit system using guix on a 32bit OS
2015-05-22 13:28 ` Ludovic Courtès
2015-05-22 17:31 ` Mark H Weaver
@ 2015-05-24 18:46 ` Alex Kost
1 sibling, 0 replies; 7+ messages in thread
From: Alex Kost @ 2015-05-24 18:46 UTC (permalink / raw
To: guix-devel
Ludovic Courtès (2015-05-22 16:28 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
[...]
>> 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!
Mark and Ludovic, thank you very much! Eventually I installed a 64-bit
system from a 32-bit Guix, based on your notes.
Guix is great! Ave Guix!!
--
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-24 18:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 20:04 Initializing a 64bit system using guix on a 32bit OS Alex Kost
2015-05-22 13:28 ` Ludovic Courtès
2015-05-22 17:31 ` Mark H Weaver
2015-05-23 9:24 ` Alex Kost
2015-05-23 14:54 ` Mark H Weaver
2015-05-23 17:53 ` Alex Kost
2015-05-24 18:46 ` Alex Kost
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.