unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Installing the system from another distro
@ 2014-11-24 13:43 Alex Kost
  2014-11-24 17:21 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2014-11-24 13:43 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

Hello, I've tried to install the Guix system from my current system
("Arch Linux") where I use the Guix package manager:

  ./pre-inst-env guix system init /path/to/my-os-config.scm /mnt/guix

Unfortunately it failed (os-config and the backtrace are attached).
So I wonder: is installing from another distro supported? or the only
right way is to use an usb image?

Thanks in advance.


[-- Attachment #2: os-config.scm --]
[-- Type: text/plain, Size: 485 bytes --]

(use-modules (gnu))

(operating-system
  (host-name "hn")
  (timezone "Europe/Paris")

  (bootloader
   (grub-configuration (device "/dev/sda")))

  (file-systems
   (cons (file-system
           (device "/dev/sda7")
           (mount-point "/")
           (type "ext4"))
         %base-file-systems))

  (users
   (list (user-account
          (name "al")
          (home-directory "/home/al")
          (group "users")
          (supplementary-groups '("wheel" "audio" "video"))))))

[-- Attachment #3: fail-log --]
[-- Type: text/plain, Size: 1335 bytes --]

Backtrace:
In ice-9/boot-9.scm:
 157: 17 [catch #t #<catch-closure 85f7c10> ...]
In unknown file:
   ?: 16 [apply-smob/1 #<catch-closure 85f7c10>]
In ice-9/boot-9.scm:
  63: 15 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 14 [eval # #]
In ice-9/boot-9.scm:
2401: 13 [save-module-excursion #<procedure 8606ca0 at ice-9/boot-9.scm:4045:3 ()>]
4050: 12 [#<procedure 8606ca0 at ice-9/boot-9.scm:4045:3 ()>]
1724: 11 [%start-stack load-stack ...]
1729: 10 [#<procedure 860c708 ()>]
In unknown file:
   ?: 9 [primitive-load "/media/storage/src/guix/scripts/guix"]
In guix/ui.scm:
 776: 8 [run-guix-command system "init" ...]
In ice-9/boot-9.scm:
 157: 7 [catch srfi-34 #<procedure 8f7ceb0 at guix/ui.scm:217:2 ()> ...]
 157: 6 [catch system-error ...]
In guix/monads.scm:
 469: 5 [run-with-store # ...]
In guix/scripts/system.scm:
 309: 4 [#<procedure 92a7e10 at guix/scripts/system.scm:309:2 (store)> #]
In gnu/system.scm:
 702: 3 [#<procedure 9781150 at gnu/system.scm:702:2 (store)> #]
 449: 2 [#<procedure 9781168 at gnu/system.scm:449:2 (store)> #]
 455: 1 [#<procedure 8fd76e0 at gnu/system.scm:449:2 (services)> (# # # # ...)]
In unknown file:
   ?: 0 [concatenate (() () () () () () () () () ...)]

ERROR: In procedure concatenate:
ERROR: In procedure append: Wrong type argument in position 19 (expecting empty list): #f

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-24 13:43 Installing the system from another distro Alex Kost
@ 2014-11-24 17:21 ` Ludovic Courtès
  2014-11-25 12:57   ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2014-11-24 17:21 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Hello, I've tried to install the Guix system from my current system
> ("Arch Linux") where I use the Guix package manager:
>
>   ./pre-inst-env guix system init /path/to/my-os-config.scm /mnt/guix

That should definitely work: it’s the same command that one runs from
the installation image, nothing special.

> Unfortunately it failed (os-config and the backtrace are attached).

[...]

> In gnu/system.scm:
>  702: 3 [#<procedure 9781150 at gnu/system.scm:702:2 (store)> #]
>  449: 2 [#<procedure 9781168 at gnu/system.scm:449:2 (store)> #]
>  455: 1 [#<procedure 8fd76e0 at gnu/system.scm:449:2 (services)> (# # # # ...)]
> In unknown file:
>    ?: 0 [concatenate (() () () () () () () () () ...)]
>
> ERROR: In procedure concatenate:
> ERROR: In procedure append: Wrong type argument in position 19 (expecting empty list): #f

Believe it or not ;-), I cannot reproduce this bug.

I tried with the very same configuration on current ‘master’:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix system init alex.scm $PWD/t/
La jena derivo estos esti konstruata:
   /gnu/store/h141fwh5mcjn6zq5192ff12hrxb9x9nn-system.drv
   /gnu/store/w18dn1ilngzip9yb9bk8dc34igidihsn-grub.cfg.drv
   /gnu/store/8p0m7kj666r0hv56r4b3a38556h1b8wf-dmd.conf.drv
   /gnu/store/0hdpjmmvgby0i194wf3hjs56nfn511sd-activate.drv
   /gnu/store/x2m84jd8w2x17ikq6qslb5argkg71bas-boot.drv
   /gnu/store/53320875lhrp11bvdjg47r2sqs3x32sz-linux-modules.drv
   /gnu/store/8j8z5nm2xkzjrr4mh7hf17dcvsxrxrjn-init.drv

[...]

/gnu/store/2bjpb39finn5rw006rrh4xxcqbzdij94-system
/gnu/store/a3k9dx6i1w44qff2n9s99xlx2rlsmwq8-grub-2.00
/gnu/store/sjcj2k78qalfzm799b06hf6hixh8mfwv-grub.cfg

ni ekigas la operaci-sistemon sub '/home/ludo/src/guix/t/'...
copying '/gnu/store/64sqqj8pbhff0w80x0gbliqirkcimy1k-glibc-2.20-locales'...
copying '/gnu/store/4k20pkxgvfc22wpcvh6xr26ma4b619ad-glibc-2.20'...

[...]
--8<---------------cut here---------------end--------------->8---

Then I ran out of space on that partition, and the command wasn’t
running as root, so it would have failed to install GRUB anyway.

The backtrace you should suggests things failed before even files were
copied to the store under /mnt/guix, right?

Could it be an ABI issue that vanishes after “make clean-go && make”?

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-24 17:21 ` Ludovic Courtès
@ 2014-11-25 12:57   ` Alex Kost
  2014-11-25 14:48     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2014-11-25 12:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2014-11-24 20:21 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Hello, I've tried to install the Guix system from my current system
>> ("Arch Linux") where I use the Guix package manager:
>>
>>   ./pre-inst-env guix system init /path/to/my-os-config.scm /mnt/guix
>
> That should definitely work: it’s the same command that one runs from
> the installation image, nothing special.
>
>> Unfortunately it failed (os-config and the backtrace are attached).
>
> [...]
>
>> In gnu/system.scm:
>>  702: 3 [#<procedure 9781150 at gnu/system.scm:702:2 (store)> #]
>>  449: 2 [#<procedure 9781168 at gnu/system.scm:449:2 (store)> #]
>>  455: 1 [#<procedure 8fd76e0 at gnu/system.scm:449:2 (services)> (# # # # ...)]
>> In unknown file:
>>    ?: 0 [concatenate (() () () () () () () () () ...)]
>>
>> ERROR: In procedure concatenate:
>> ERROR: In procedure append: Wrong type argument in position 19 (expecting empty list): #f
>
> Believe it or not ;-), I cannot reproduce this bug.
>
> I tried with the very same configuration on current ‘master’:
>
> $ ./pre-inst-env guix system init alex.scm $PWD/t/
> La jena derivo estos esti konstruata:
>    /gnu/store/h141fwh5mcjn6zq5192ff12hrxb9x9nn-system.drv
>    /gnu/store/w18dn1ilngzip9yb9bk8dc34igidihsn-grub.cfg.drv
>    /gnu/store/8p0m7kj666r0hv56r4b3a38556h1b8wf-dmd.conf.drv
>    /gnu/store/0hdpjmmvgby0i194wf3hjs56nfn511sd-activate.drv
>    /gnu/store/x2m84jd8w2x17ikq6qslb5argkg71bas-boot.drv
>    /gnu/store/53320875lhrp11bvdjg47r2sqs3x32sz-linux-modules.drv
>    /gnu/store/8j8z5nm2xkzjrr4mh7hf17dcvsxrxrjn-init.drv
>
> [...]
>
> /gnu/store/2bjpb39finn5rw006rrh4xxcqbzdij94-system
> /gnu/store/a3k9dx6i1w44qff2n9s99xlx2rlsmwq8-grub-2.00
> /gnu/store/sjcj2k78qalfzm799b06hf6hixh8mfwv-grub.cfg
>
> ni ekigas la operaci-sistemon sub '/home/ludo/src/guix/t/'...
> copying '/gnu/store/64sqqj8pbhff0w80x0gbliqirkcimy1k-glibc-2.20-locales'...
> copying '/gnu/store/4k20pkxgvfc22wpcvh6xr26ma4b619ad-glibc-2.20'...
>
> [...]
>
> Then I ran out of space on that partition, and the command wasn’t
> running as root, so it would have failed to install GRUB anyway.
>
> The backtrace you should suggests things failed before even files were
> copied to the store under /mnt/guix, right?

Yes, it failed before “La jena derivo estos esti konstruata:” message :-)

> Could it be an ABI issue that vanishes after “make clean-go && make”?

That's it!  It was very unexpected for me as I did "make clean-go" not so
long ago, but anyway it works now.  Thank you very much for such a
verbose answer and even testing (!)

I have another question.  I used "--no-grub" option, so I don't have a
proper grub.cfg.  I expected to see “/boot” directory with symlinks to
the linux and initram images but there is no such dir.  Do I understand
it right that “/gnu/store/…-linux-libre-3.17.4/bzImage” and
“/gnu/store/…-base-initrd/initrd” are hardcoded in the "grub.cfg"?

-- 
Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-25 12:57   ` Alex Kost
@ 2014-11-25 14:48     ` Ludovic Courtès
  2014-11-26 20:25       ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2014-11-25 14:48 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2014-11-24 20:21 +0300) wrote:
>> Could it be an ABI issue that vanishes after “make clean-go && make”?
>
> That's it!  It was very unexpected for me as I did "make clean-go" not so
> long ago, but anyway it works now.  Thank you very much for such a
> verbose answer and even testing (!)

Good news.  :-)

> I have another question.  I used "--no-grub" option, so I don't have a
> proper grub.cfg.  I expected to see “/boot” directory with symlinks to
> the linux and initram images but there is no such dir.  Do I understand
> it right that “/gnu/store/…-linux-libre-3.17.4/bzImage” and
> “/gnu/store/…-base-initrd/initrd” are hardcoded in the "grub.cfg"?

Yes, that’s correct.

Actually, when passing --no-grub, ‘guix system’ doesn’t even bother
generating grub.cfg (see ‘perform-action’ in (guix scripts system).)

So if you really want to use --no-grub, you should retrieve the kernel
and initrd file names, and manually add them to your bootloader’s
config.

One way to do that is to run:

  guix system build my-system-config.scm

The returned directory name contains the initrd and kernel, among other
things.

Note that you’ll also need to pass --root= and --system= on the kernel
command line (see the ‘operating-system-grub.cfg’ procedure.)

As you see, passing --no-grub is not an optimized use case.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-25 14:48     ` Ludovic Courtès
@ 2014-11-26 20:25       ` Alex Kost
  2014-11-26 22:06         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2014-11-26 20:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2014-11-25 17:48 +0300) wrote:

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

[...]

>> I have another question.  I used "--no-grub" option, so I don't have a
>> proper grub.cfg.  I expected to see “/boot” directory with symlinks to
>> the linux and initram images but there is no such dir.  Do I understand
>> it right that “/gnu/store/…-linux-libre-3.17.4/bzImage” and
>> “/gnu/store/…-base-initrd/initrd” are hardcoded in the "grub.cfg"?
>
> Yes, that’s correct.
>
> Actually, when passing --no-grub, ‘guix system’ doesn’t even bother
> generating grub.cfg (see ‘perform-action’ in (guix scripts system).)
>
> So if you really want to use --no-grub, you should retrieve the kernel
> and initrd file names, and manually add them to your bootloader’s
> config.
>
> One way to do that is to run:
>
>   guix system build my-system-config.scm
>
> The returned directory name contains the initrd and kernel, among other
> things.
>
> Note that you’ll also need to pass --root= and --system= on the kernel
> command line (see the ‘operating-system-grub.cfg’ procedure.)

And --load= too :-)

> As you see, passing --no-grub is not an optimized use case.  :-)

Thanks for the pointers!  You helped to figure it out.  And the system
is awesome!!  The only big issue I've noticed so far is: the screen
resolution was 800x600 for me and xrandr didn't give any other option.
"/var/log/Xorg.0.log" told me that the module for my videocard ("sis")
wasn't loaded.  I looked at (gnu services xorg) and found that not all
available "xf86-video-…" modules are placed at "xserver.conf".  Is there
a reason for that?

Hm, perhaps I just need to install "xf86-video-sis" package (I should
have tried it before asking).

Also I have a question.  I usually add some custom lines to "xorg.conf".
I suppose currently there is no other way to do it but to make my own
xorg (slim) service.  Right?

-- 
Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-26 20:25       ` Alex Kost
@ 2014-11-26 22:06         ` Ludovic Courtès
  2014-11-29 21:00           ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2014-11-26 22:06 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2014-11-25 17:48 +0300) wrote:

[...]

>> Note that you’ll also need to pass --root= and --system= on the kernel
>> command line (see the ‘operating-system-grub.cfg’ procedure.)
>
> And --load= too :-)

Oops.  I wanted to make sure you would find by yourself.  ;-)

>> As you see, passing --no-grub is not an optimized use case.  :-)
>
> Thanks for the pointers!  You helped to figure it out.  And the system
> is awesome!!  The only big issue I've noticed so far is: the screen
> resolution was 800x600 for me and xrandr didn't give any other option.
> "/var/log/Xorg.0.log" told me that the module for my videocard ("sis")
> wasn't loaded.  I looked at (gnu services xorg) and found that not all
> available "xf86-video-…" modules are placed at "xserver.conf".  Is there
> a reason for that?

No reason!  Please do add it.

> Hm, perhaps I just need to install "xf86-video-sis" package (I should
> have tried it before asking).

X would not find it; it really needed to be listed in the search path in
xorg.conf.

> Also I have a question.  I usually add some custom lines to "xorg.conf".
> I suppose currently there is no other way to do it but to make my own
> xorg (slim) service.  Right?

Actually it’s ‘xorg-start-command’ that creates xorg.conf.

The best thing would be to add a parameter to that function to allow
arbitrary text to be appended.  (Well, not just text, but a list of
strings and possibly packages; the ‘xserver.conf’ procedure would do
(apply text-file* "xserver.conf" ... user-text).)

WDYT?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-26 22:06         ` Ludovic Courtès
@ 2014-11-29 21:00           ` Alex Kost
  2014-11-29 21:18             ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2014-11-29 21:00 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]

Ludovic Courtès (2014-11-27 01:06 +0300) wrote:

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

[...]

>> Thanks for the pointers!  You helped to figure it out.  And the system
>> is awesome!!  The only big issue I've noticed so far is: the screen
>> resolution was 800x600 for me and xrandr didn't give any other option.
>> "/var/log/Xorg.0.log" told me that the module for my videocard ("sis")
>> wasn't loaded.  I looked at (gnu services xorg) and found that not all
>> available "xf86-video-…" modules are placed at "xserver.conf".  Is there
>> a reason for that?
>
> No reason!  Please do add it.

I checked that adding xf86-video-sis fixes the resolution problem.  But
did you mean to add just xf86-video-sis (a trivial patch for this is
attached) or all modules?  I see that you added a commented line for
xf86-video-modesetting, so I assume that adding all available modules
may introduce unexpected issues.

>> Hm, perhaps I just need to install "xf86-video-sis" package (I should
>> have tried it before asking).
>
> X would not find it; it really needed to be listed in the search path in
> xorg.conf.
>
>> Also I have a question.  I usually add some custom lines to "xorg.conf".
>> I suppose currently there is no other way to do it but to make my own
>> xorg (slim) service.  Right?
>
> Actually it’s ‘xorg-start-command’ that creates xorg.conf.
>
> The best thing would be to add a parameter to that function to allow
> arbitrary text to be appended.  (Well, not just text, but a list of
> strings and possibly packages; the ‘xserver.conf’ procedure would do
> (apply text-file* "xserver.conf" ... user-text).)
>
> WDYT?

Yes, it would be good.  Currently I don't need it, but I'll look at it
if I will have such need :-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-xorg-Add-xf86-video-sis.patch --]
[-- Type: text/x-diff, Size: 1003 bytes --]

From 35119792b81cc7f0fbb68f096df2bd6f6727eaeb Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Fri, 28 Nov 2014 23:49:58 +0300
Subject: [PATCH] services: xorg: Add 'xf86-video-sis'.

* gnu/services/xorg.scm (xorg-start-command)[xserver.conf]: Add
  ModulePath for 'xf86-video-sis'.
---
 gnu/services/xorg.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 5236573..c813f0f 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -96,6 +96,7 @@ Section \"Files\"
   ModulePath \"" xf86-video-intel "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-video-mach64 "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-video-nv "/lib/xorg/modules/drivers\"
+  ModulePath \"" xf86-video-sis "/lib/xorg/modules/drivers\"
   ModulePath \"" xf86-input-keyboard "/lib/xorg/modules/input\"
   ModulePath \"" xf86-input-mouse "/lib/xorg/modules/input\"
   ModulePath \"" xf86-input-synaptics "/lib/xorg/modules/input\"
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Installing the system from another distro
  2014-11-29 21:00           ` Alex Kost
@ 2014-11-29 21:18             ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2014-11-29 21:18 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2014-11-27 01:06 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>
> [...]
>
>>> Thanks for the pointers!  You helped to figure it out.  And the system
>>> is awesome!!  The only big issue I've noticed so far is: the screen
>>> resolution was 800x600 for me and xrandr didn't give any other option.
>>> "/var/log/Xorg.0.log" told me that the module for my videocard ("sis")
>>> wasn't loaded.  I looked at (gnu services xorg) and found that not all
>>> available "xf86-video-…" modules are placed at "xserver.conf".  Is there
>>> a reason for that?
>>
>> No reason!  Please do add it.
>
> I checked that adding xf86-video-sis fixes the resolution problem.  But
> did you mean to add just xf86-video-sis (a trivial patch for this is
> attached) or all modules?

In theory we could add all of them by default, but ISTR that some of
them didn’t build, or are only useful for VM guests.

> I see that you added a commented line for xf86-video-modesetting, so I
> assume that adding all available modules may introduce unexpected
> issues.

xf86-video-modesetting is not currently usable due to a libdrm version
mismatch, as I just wrote to Federico.

> From 35119792b81cc7f0fbb68f096df2bd6f6727eaeb Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Fri, 28 Nov 2014 23:49:58 +0300
> Subject: [PATCH] services: xorg: Add 'xf86-video-sis'.
>
> * gnu/services/xorg.scm (xorg-start-command)[xserver.conf]: Add
>   ModulePath for 'xf86-video-sis'.

Please push.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-29 21:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 13:43 Installing the system from another distro Alex Kost
2014-11-24 17:21 ` Ludovic Courtès
2014-11-25 12:57   ` Alex Kost
2014-11-25 14:48     ` Ludovic Courtès
2014-11-26 20:25       ` Alex Kost
2014-11-26 22:06         ` Ludovic Courtès
2014-11-29 21:00           ` Alex Kost
2014-11-29 21:18             ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).