all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Error building with guix system image
@ 2023-04-19 10:51 Saku Laesvuori
  2023-04-20 12:49 ` Maxim Cournoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Saku Laesvuori @ 2023-04-19 10:51 UTC (permalink / raw)
  To: help-guix

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

Running `guix system image image-minimal.scm` fails with the following
build log:

```build log for partition.img.drv
copying 340 store items | [progress bar animation]
registering 337 items | [progress bar animation, fails before end]
Backtrace:
In ice-9/eval.scm:
    619:8 19 (_ #(#<directory (guile-user) 7fffeffcfc80> #<proced…> …))
In ./gnu/build/image.scm:
    236:4 18 (initialize-root-partition "tmp-root" #:bootcfg _ # _ # …)
In ice-9/boot-9.scm:
   260:13 17 (for-each #<procedure 7fffed357b80 at ./gnu/build/imag…> …)
In ./gnu/build/image.scm:
    167:6 16 (register-closure "tmp-root" "system" #:schema _ # _)
In ./guix/store/database.scm:
   111:20 15 (call-with-database "tmp-root/var/guix/db/db.sqlite" # # …)
In ./guix/progress.scm:
    71:36 14 (call-with-progress-reporter #<<progress-reporter> sta…> …)
In srfi/srfi-1.scm:
    634:9 13 (for-each #<procedure 7fffec850d40 at ./guix/store/dat…> …)
In ./guix/store/database.scm:
   420:36 12 (_ #<<store-info> item: "/gnu/store/8z1q7vjxylm6l4ibsyw…>)
In ./guix/store/deduplication.scm:
     42:4 11 (nar-sha256 "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6…")
In ./guix/serialization.scm:
    381:9 10 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
In srfi/srfi-1.scm:
    634:9  9 (for-each #<procedure 7fffed493990 at ./guix/serializa…> …)
In ./guix/serialization.scm:
   386:23  8 (_ "share")
    381:9  7 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
In srfi/srfi-1.scm:
    634:9  6 (for-each #<procedure 7fffed4936f0 at ./guix/serializa…> …)
In ./guix/serialization.scm:
   386:23  5 (_ "locale")
    381:9  4 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
In srfi/srfi-1.scm:
    634:9  3 (for-each #<procedure 7fffed4933f0 at ./guix/serializa…> …)
In ./guix/serialization.scm:
   386:23  2 (_ "ja")
   380:43  1 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
In srfi/srfi-1.scm:
   691:29  0 (filter-map #<procedure 7fffeea6d9e0 at ./guix/seriali…> …)

srfi/srfi-1.scm:691:29: In procedure filter-map:
In procedure car: Wrong type argument in position 1 (expecting pair): #f
environment variable `PATH' set to `/gnu/store/zfiwdkwfs039q346nkynvhllxbra2rg8-e2fsprogs-1.46.4/bin:/gnu/store/zfiwdkwfs039q346nkynvhllxbra2rg8-e2fsprogs-1.46.4/sbin:/gnu/store/nj43wfbldxrwfmrk9vgvliz28iyl89dp-fakeroot-1.30.1/bin:/gnu/store/lpkpldxni8vab82kwq9qs032hni580ak-dosfstools-4.2/sbin:/gnu/store/131xfb6iz9vh7c8s7kv6nhvycrqcfad8-mtools-4.0.42/bin'
```

Does anyone have any pointers on how to debug or fix this? The operating
system builds nicely with `guix system vm`. Building
`gnu/system/examples/bare-bones.tmpl` with `guix system image` also
fails with a similar error and works correctly with `guix system vm`.


```image-minimal.scm
(use-modules
  (gnu)
  (gnu system image))

(define %operating-system
  (operating-system
   (host-name "image-test")
   (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (targets '("/dev/sdX"))))
   (file-systems (cons*
                  (file-system
                   (mount-point "/")
                   (device "/dev/sdX1")
                   (type "ext4"))
                  %base-file-systems))))

(image-with-os (raw-with-offset-disk-image)
               %operating-system)
```

Output of `guix describe` just in case, though the error also occured
with the latest guix version when I tested.

```channels.scm
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (branch "master")
        (commit
          "5c893787be78a79433fe1343f5b70cd647e8f667")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
```

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Error building with guix system image
  2023-04-19 10:51 Error building with guix system image Saku Laesvuori
@ 2023-04-20 12:49 ` Maxim Cournoyer
  2023-04-25 17:16   ` Saku Laesvuori
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Cournoyer @ 2023-04-20 12:49 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: help-guix

Hello,

Saku Laesvuori <saku@laesvuori.fi> writes:

> Running `guix system image image-minimal.scm` fails with the following
> build log:
>
> ```build log for partition.img.drv
> copying 340 store items | [progress bar animation]
> registering 337 items | [progress bar animation, fails before end]
> Backtrace:
> In ice-9/eval.scm:
>     619:8 19 (_ #(#<directory (guile-user) 7fffeffcfc80> #<proced…> …))
> In ./gnu/build/image.scm:
>     236:4 18 (initialize-root-partition "tmp-root" #:bootcfg _ # _ # …)
> In ice-9/boot-9.scm:
>    260:13 17 (for-each #<procedure 7fffed357b80 at ./gnu/build/imag…> …)
> In ./gnu/build/image.scm:
>     167:6 16 (register-closure "tmp-root" "system" #:schema _ # _)
> In ./guix/store/database.scm:
>    111:20 15 (call-with-database "tmp-root/var/guix/db/db.sqlite" # # …)
> In ./guix/progress.scm:
>     71:36 14 (call-with-progress-reporter #<<progress-reporter> sta…> …)
> In srfi/srfi-1.scm:
>     634:9 13 (for-each #<procedure 7fffec850d40 at ./guix/store/dat…> …)
> In ./guix/store/database.scm:
>    420:36 12 (_ #<<store-info> item: "/gnu/store/8z1q7vjxylm6l4ibsyw…>)
> In ./guix/store/deduplication.scm:
>      42:4 11 (nar-sha256 "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6…")
> In ./guix/serialization.scm:
>     381:9 10 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
> In srfi/srfi-1.scm:
>     634:9  9 (for-each #<procedure 7fffed493990 at ./guix/serializa…> …)
> In ./guix/serialization.scm:
>    386:23  8 (_ "share")
>     381:9  7 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
> In srfi/srfi-1.scm:
>     634:9  6 (for-each #<procedure 7fffed4936f0 at ./guix/serializa…> …)
> In ./guix/serialization.scm:
>    386:23  5 (_ "locale")
>     381:9  4 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
> In srfi/srfi-1.scm:
>     634:9  3 (for-each #<procedure 7fffed4933f0 at ./guix/serializa…> …)
> In ./guix/serialization.scm:
>    386:23  2 (_ "ja")
>    380:43  1 (dump "tmp-root/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6z…")
> In srfi/srfi-1.scm:
>    691:29  0 (filter-map #<procedure 7fffeea6d9e0 at ./guix/seriali…> …)
>
> srfi/srfi-1.scm:691:29: In procedure filter-map:
> In procedure car: Wrong type argument in position 1 (expecting pair): #f
> environment variable `PATH' set to `/gnu/store/zfiwdkwfs039q346nkynvhllxbra2rg8-e2fsprogs-1.46.4/bin:/gnu/store/zfiwdkwfs039q346nkynvhllxbra2rg8-e2fsprogs-1.46.4/sbin:/gnu/store/nj43wfbldxrwfmrk9vgvliz28iyl89dp-fakeroot-1.30.1/bin:/gnu/store/lpkpldxni8vab82kwq9qs032hni580ak-dosfstools-4.2/sbin:/gnu/store/131xfb6iz9vh7c8s7kv6nhvycrqcfad8-mtools-4.0.42/bin'
> ```
>
> Does anyone have any pointers on how to debug or fix this? The operating
> system builds nicely with `guix system vm`. Building
> `gnu/system/examples/bare-bones.tmpl` with `guix system image` also
> fails with a similar error and works correctly with `guix system vm`.
>
>
> ```image-minimal.scm
> (use-modules
>   (gnu)
>   (gnu system image))
>
> (define %operating-system
>   (operating-system
>    (host-name "image-test")
>    (bootloader (bootloader-configuration
>                 (bootloader grub-bootloader)
>                 (targets '("/dev/sdX"))))
>    (file-systems (cons*
>                   (file-system
>                    (mount-point "/")
>                    (device "/dev/sdX1")
>                    (type "ext4"))
>                   %base-file-systems))))

Do you correctly substitute /dev/sdX for your real device name (e.g.,
/dev/sda) ?

It should print a nice error when it doesn't exist, I think, but perhaps
it regressed.

'guix system vm' overrides the root file system, so wouldn't complain
about a problem in your root file system definition.

-- 
Thanks,
Maxim


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

* Re: Error building with guix system image
  2023-04-20 12:49 ` Maxim Cournoyer
@ 2023-04-25 17:16   ` Saku Laesvuori
  2023-05-01  1:45     ` Maxim Cournoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Saku Laesvuori @ 2023-04-25 17:16 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: help-guix

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

> > (define %operating-system
> >   (operating-system
> >    (host-name "image-test")
> >    (bootloader (bootloader-configuration
> >                 (bootloader grub-bootloader)
> >                 (targets '("/dev/sdX"))))
> >    (file-systems (cons*
> >                   (file-system
> >                    (mount-point "/")
> >                    (device "/dev/sdX1")
> >                    (type "ext4"))
> >                   %base-file-systems))))
> 
> Do you correctly substitute /dev/sdX for your real device name (e.g.,
> /dev/sda) ?

I did try with that too, but it failed with the same error. Today I
almost accidentally found out that this error was caused by a corrupt
store item and was fixed by running `guix gc --verify=contents,repair`.

The error message could certainly be improved (or rather, a error
message about a corrupt store could be added), but I didn't find the
actual failing check so that I can't send a patch.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Error building with guix system image
  2023-04-25 17:16   ` Saku Laesvuori
@ 2023-05-01  1:45     ` Maxim Cournoyer
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2023-05-01  1:45 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: help-guix

Hi,

Saku Laesvuori <saku@laesvuori.fi> writes:

>> > (define %operating-system
>> >   (operating-system
>> >    (host-name "image-test")
>> >    (bootloader (bootloader-configuration
>> >                 (bootloader grub-bootloader)
>> >                 (targets '("/dev/sdX"))))
>> >    (file-systems (cons*
>> >                   (file-system
>> >                    (mount-point "/")
>> >                    (device "/dev/sdX1")
>> >                    (type "ext4"))
>> >                   %base-file-systems))))
>> 
>> Do you correctly substitute /dev/sdX for your real device name (e.g.,
>> /dev/sda) ?
>
> I did try with that too, but it failed with the same error. Today I
> almost accidentally found out that this error was caused by a corrupt
> store item and was fixed by running `guix gc --verify=contents,repair`.
>
> The error message could certainly be improved (or rather, a error
> message about a corrupt store could be added), but I didn't find the
> actual failing check so that I can't send a patch.

OK!  I'm glad you at least got past that road bump.

-- 
Thanks,
Maxim


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

end of thread, other threads:[~2023-05-01  2:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19 10:51 Error building with guix system image Saku Laesvuori
2023-04-20 12:49 ` Maxim Cournoyer
2023-04-25 17:16   ` Saku Laesvuori
2023-05-01  1:45     ` Maxim Cournoyer

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.