all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem with running system reconfigure on Guix in WSL2
@ 2024-02-27  9:37 Kristofer Hjelmtorp via
  2024-03-06 21:20 ` woshilapin
  0 siblings, 1 reply; 2+ messages in thread
From: Kristofer Hjelmtorp via @ 2024-02-27  9:37 UTC (permalink / raw)
  To: help-guix@gnu.org

Hello
 
I recently wanted to try running Guix on WSL2. I followed the path of https://othacehe.org/wsl-images-for-guix-system.html and created a guix image tarball from wsl.scm.
 
Everything went fine while importting the tarball into WSL2 and running it. The problem I have is when I want to update my system by running:
"sudo guix system reconfigure ~/.config/guix/system.scm"
 
I get an exceptions that complaines about the dummy-bootloader package.
 
Here is the backtrace:
building /gnu/store/zb4ca5xb865a3jlwbis857kzy1sx5kf7-system.drv...
/gnu/store/w7xbzicz3hfi8z6lkv4yymndwy77a82f-system
Backtrace:
19 (primitive-load "/home/guest/.config/guix/current/bin/g…")
In guix/ui.scm:
2324:7 18 (run-guix . _)
2287:10 17 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
859:3 15 (_)
839:4 14 (call-with-status-report _ _)
In guix/scripts/system.scm:
1305:4 13 (_)
In ice-9/boot-9.scm:
1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
661:37 11 (thunk)
1300:8 10 (call-with-build-handler _ _)
1300:8 9 (call-with-build-handler _ _)
1300:8 8 (call-with-build-handler _ _)
1300:8 7 (call-with-build-handler #<procedure 7fa0d09f9d20 at g…> …)
2180:25 6 (run-with-store #<store-connection 256.99 7fa0d09e8f00> …)
In guix/scripts/system.scm:
871:10 5 (_ _)
In srfi/srfi-1.scm:
634:9 4 (for-each #<procedure 7fa0d396e0a0 at ice-9/boot-9.scm…> …)
In unknown file:
3 (_ #<procedure 7fa0d39a1d60 at ice-9/boot-9.scm:798:28…> …)
In guix/derivations.scm:
697:28 2 (derivation->output-path "/gnu/store/dqasqlz2qivgbbl2b…" …)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/dqasqlz2qivgbbl2bgkdw73mayb1l478-dummy-bootloader"
 
And here is my "config.scm":
(use-modules (gnu)
      (gnu system images wsl2)
      (gnu packages))
(use-package-modules screen emacs certs version-control bash)

(define wsl2-os
  (operating-system
    (inherit wsl-os)
    (host-name "guix")
    (file-systems (list (file-system
                                  (device "/dev/sdc")
                                  (mount-point "/")
                                  (type "ext4")
                                  (mount? #t))))
    (users (cons* (user-account
                            (name "dev")
                            (group "users")
                            (supplementary-groups '("wheel" "audio" "video" "input" "tty")) ; allow use of sudo
                            (password "password")
                            (comment "Developer"))
                   (user-account
                         (inherit %root-account)
                         (shell (wsl-boot-program "dev")))
                     %base-user-accounts))
    (packages
       (append
            (map specification->package
                (list "git"
                      "screen"
                      "nss-certs"
                      "emacs"))
                      %base-packages))))
wsl2-os
 
Any ideas of what the issue could be?
 
Best Regards
Kristofer

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

* Re: Problem with running system reconfigure on Guix in WSL2
  2024-02-27  9:37 Problem with running system reconfigure on Guix in WSL2 Kristofer Hjelmtorp via
@ 2024-03-06 21:20 ` woshilapin
  0 siblings, 0 replies; 2+ messages in thread
From: woshilapin @ 2024-03-06 21:20 UTC (permalink / raw)
  To: Kristofer Hjelmtorp; +Cc: help-guix@gnu.org

Hi Kristofer,

I actually reached the same error. I have absolutely no idea what's going on, but I found a way to move on.

Basically, I defined a `dummy-bootloader`. Because I don't know what I'm doing, I took inspiration of some other well-known blog article talking about running guix on WSL, notably https://wiki.systemcrafters.net/guix/wsl/.

```
(define dummy-bootloader
  (bootloader (name 'dummy-bootloader)
              (package
                dummy-package)
              (configuration-file "/dev/null")
              (configuration-file-generator (lambda* rest
                                              (computed-file
                                               "dummy-bootloader"
                                               #~(mkdir #$output))))
              (installer #~(const #t))))
```

Then it can be used as follows.

```
(define wsl2-os
  (operating-system
    (...)
    (bootloader (bootloader-configuration
                  (bootloader dummy-bootloader)))
```

This seems to work for running `guix system reconfigure wsl2.scm` on my machine. If someone can explain what this new definition changes? And maybe make some hypothesis about why that would work (and the original wouldn't)?

Best regards.
--
woshilapin

> Hello
> 
> I recently wanted to try running Guix on WSL2. I followed the path of https://othacehe.org/wsl-images-for-guix-system.html and created a guix image tarball from wsl.scm.
> 
> Everything went fine while importting the tarball into WSL2 and running it. The problem I have is when I want to update my system by running:
> "sudo guix system reconfigure ~/.config/guix/system.scm"
> 
> I get an exceptions that complaines about the dummy-bootloader package.
> 
> Here is the backtrace:
> building /gnu/store/zb4ca5xb865a3jlwbis857kzy1sx5kf7-system.drv...
> /gnu/store/w7xbzicz3hfi8z6lkv4yymndwy77a82f-system
> Backtrace:
> 19 (primitive-load "/home/guest/.config/guix/current/bin/g…")
> In guix/ui.scm:
> 2324:7 18 (run-guix . _)
> 2287:10 17 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 1752:10 16 (with-exception-handler _ _ #:unwind? _ # )
> In guix/status.scm:
> 859:3 15 ()
> 839:4 14 (call-with-status-report _ )
> In guix/scripts/system.scm:
> 1305:4 13 ()
> In ice-9/boot-9.scm:
> 1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/store.scm:
> 661:37 11 (thunk)
> 1300:8 10 (call-with-build-handler _ _)
> 1300:8 9 (call-with-build-handler _ _)
> 1300:8 8 (call-with-build-handler _ _)
> 1300:8 7 (call-with-build-handler #<procedure 7fa0d09f9d20 at g…> …)
> 
> 2180:25 6 (run-with-store #<store-connection 256.99 7fa0d09e8f00> …)
> 
> In guix/scripts/system.scm:
> 871:10 5 (_ _)
> In srfi/srfi-1.scm:
> 634:9 4 (for-each #<procedure 7fa0d396e0a0 at ice-9/boot-9.scm…> …)
> 
> In unknown file:
> 3 (_ #<procedure 7fa0d39a1d60 at ice-9/boot-9.scm:798:28…> …)
> 
> In guix/derivations.scm:
> 697:28 2 (derivation->output-path "/gnu/store/dqasqlz2qivgbbl2b…" …)
> 
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/dqasqlz2qivgbbl2bgkdw73mayb1l478-dummy-bootloader"
> 
> And here is my "config.scm":
> (use-modules (gnu)
> (gnu system images wsl2)
> (gnu packages))
> (use-package-modules screen emacs certs version-control bash)
> 
> (define wsl2-os
> (operating-system
> (inherit wsl-os)
> (host-name "guix")
> (file-systems (list (file-system
> (device "/dev/sdc")
> (mount-point "/")
> (type "ext4")
> (mount? #t))))
> (users (cons* (user-account
> (name "dev")
> (group "users")
> (supplementary-groups '("wheel" "audio" "video" "input" "tty")) ; allow use of sudo
> (password "password")
> (comment "Developer"))
> (user-account
> (inherit %root-account)
> (shell (wsl-boot-program "dev")))
> %base-user-accounts))
> (packages
> (append
> (map specification->package
> 
> (list "git"
> "screen"
> "nss-certs"
> "emacs"))
> %base-packages))))
> wsl2-os
> 
> Any ideas of what the issue could be?
> 
> Best Regards
> Kristofer


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

end of thread, other threads:[~2024-03-06 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27  9:37 Problem with running system reconfigure on Guix in WSL2 Kristofer Hjelmtorp via
2024-03-06 21:20 ` woshilapin

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.