Subject: [bug#59619] [PATCH] grub-configfile - guix shell ... ./pre-inst-env

From: Stefan Karrmann <[email-masked]>
Date: Sun, 29 Jan 2023 19:33:23 +0100

Dear all,

I managed to run guix directly in my guix git-clone. A peek shows that the
new menu-entry works initially. Later, it runs into an
record-abi-mismatch-error. I suspect, that this happens on the side of the
guix-daemon. Is this really the problem? How can we handle it?

$ ./pre-inst-env ~/guix-clone/scripts/guix system vm /home/sk/guix/system-initial.scm --share=/ --full-boot --root=/home/sk/guix/vm
;;; (#<<menu-entry> label: "Grub config" device: #<<uuid> type: dce bv: #vu8(92 187 154 112 163 200 67 132 160 133 158 104 150 5 131 67)> device-mount-point: #f linux: #f linux-arguments: () initrd: #f multiboot-kernel: #f multiboot-arguments: () multiboot-modules: () config-file: "/boot/grub/grub.cfg" chain-loader: #f>)
Backtrace:
In guix/store.scm:
   1300:8 19 (call-with-build-handler #<procedure 7fc711da4960 at g?> ?)
  2170:25 18 (run-with-store #<store-connection 256.99 7fc711aac4b0> ?)
In guix/scripts/system.scm:
    850:2 17 (_ _)
In guix/gexp.scm:
   1180:2 16 (_ _)
   1046:2 15 (_ _)
    892:4 14 (_ _)
In guix/store.scm:
  2055:12 13 (_ #<store-connection 256.99 7fc711aac4b0>)
  1382:11 12 (map/accumulate-builds #<store-connection 256.99 7fc71?> ?)
   1300:8 11 (call-with-build-handler #<procedure 7fc71026d9f0 at g?> ?)
  2170:25 10 (run-with-store #<store-connection 256.99 7fc711aac4b0> ?)
In guix/gexp.scm:
   897:13  9 (_ _)
In guix/store.scm:
  1998:13  8 (_ #<store-connection 256.99 7fc711aac4b0>)
In guix/gexp.scm:
   299:51  7 (_)
In unknown file:
           6 (with-fluids* (#<fluid 7fc726ac1220>) (#f) #<procedure ?>)
In guix/gexp.scm:
   733:29  5 (_)
In gnu/system/image.scm:
   938:21  4 (_)
In gnu/system.scm:
  1448:26  3 (operating-system-bootcfg #<<operating-system> kernel:?> ?)
    521:4  2 (boot-parameters->menu-entry _)
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:
Throw to key `record-abi-mismatch-error' with args `(abi-check "~a: record ABI mismatch; recompilation needed" (#<record-type <menu-entry>>) ())'.

---- system-config.scm
;; this is based on znavko's Dual Boot config
;; with the second OS in GRUB on the separate hdd /dev/sda9 ( grub: (hd1,gpt8) )

(use-modules (gnu)
             (gnu system nss)
             (gnu system locale)       ;;for locale-definition
             (gnu services desktop)
             (gnu services networking) ;;for remove ntp
             (gnu services avahi)      ;;for remove avahi - an dns?
             (gnu services xorg)
             (gnu services admin)      ;;for unattended-upgrades
             (gnu packages admin)      ;;for wpa_supplicant
             (gnu packages suckless)
             (gnu packages networking)  ;; iwd
             (srfi srfi-1)             ;;for remove function
             )

(use-modules (system vm inspect)
             (ice-9 pretty-print))      ;; debugging$

(use-modules (gnu packages linux))     ;; free/libre linux

(use-service-modules desktop networking base xorg)
(use-package-modules certs wm suckless)

(define (peek . stuff)
  (newline)
  (display ";;; ")
  (write stuff)
  (newline)
  (car (last-pair stuff)))

(define pk peek)

(define guix-ext-root
  (file-system (device (file-system-label "guix-ext"))
               (mount-point "/")
               (type "btrfs")
               ; (options "subvol=guix-root/work,noatime")
               (needed-for-boot? #t)))
(define guix-ext-boot
  (file-system (device (file-system-label "guix-ext-boot"))
               (mount-point "/boot")
               (options "subvol=boot/work")
               (type "btrfs")
               (needed-for-boot? #f))) ; only by grub upto initrd
(define guix-ext-efi
  (file-system (device (file-system-label "GUIX-EXT-EF"))
               (mount-point "/boot/efi")
               #;(mount-point "/sys/firmware/efi/efivars")
               (type "vfat")))

(operating-system
 (host-name "johann") (timezone "Europe/Berlin") (locale "de_DE.utf8")
 (keyboard-layout (keyboard-layout "de"))
 (initrd-modules (cons*
                  "btrfs"
                  %base-initrd-modules))

 (kernel linux-libre) ; gnu libre
 (firmware (cons* %base-firmware))
 (kernel-arguments (cons*
                    "rootdelay=3"
                    ; now default subvol: "rootflags=subvol=/guix-ext/work"
                    (remove (lambda (option) (string=? option "quiet")) %default-kernel-arguments)))
 (bootloader (bootloader-configuration
              (bootloader
               (bootloader
                (inherit grub-bootloader) (installer #~(const #t))))
              ; (bootloader grub-bootloader)
              (targets (list "/dev/sdb"))
              (keyboard-layout keyboard-layout)
              (menu-entries (list
                             (pk (menu-entry
                              (label "Grub config")
                              (device (uuid "5cbb9a70-a3c8-4384-a085-9e6896058343"))
                              (config-file "/boot/grub/grub.cfg")))
                             (menu-entry
                                   (label "Debian")
                                   (linux "(hd1,gpt8)/boot/vmlinuz") ; generates nonsens: search --file --set /guix-root/work(hd1,gpt8)/boot/vmlinuz
                                   (linux-arguments '("root=/dev/sda9")) ; dito dito
                                   (initrd "(hd1,gpt8)/boot/initrd.img"))))))

 (file-systems (cons*
                guix-ext-root
                guix-ext-boot
                guix-ext-efi
                %base-file-systems))
 (swap-devices
  (list (swap-space (target (uuid "d48bfe0f-9715-4267-81c9-b1503144fab6")))))

 (users (cons* (user-account
                (name "sk") (uid 1000) (group "sk")
                (supplementary-groups '("users" "wheel" "netdev" "audio" "video"))
                (home-directory "/home/sk"))
               %base-user-accounts))

 (groups (cons* (user-group (name "sk") (id 1000))
                %base-groups))

 ;; This is where we specify system-wide packages.
 (packages (cons* nss-certs ;for HTTPS access
                  i3-wm i3status dmenu
                  dwm
                  iwd ; needs dbus...
                  slock st
                  %base-packages))

 (locale-definitions (list (locale-definition (name "de_DE.utf8") (source "de_DE"))
                           (locale-definition (name "en_US.utf8") (source "en_US"))))

 (services (cons*
            (set-xorg-configuration
             (xorg-configuration             ;for Xorg
              (keyboard-layout keyboard-layout)))
            (screen-locker-service slock)
            (modify-services
             ;; removing unnecessary services
             (remove (lambda (service)
                       (member (service-kind service)
                               (list ntp-service-type avahi-service-type
                                     bluetooth-service
                                     gdm-service-type)))
                     %desktop-services) ;end of remove lambda services
             ) ;;end of modify-services
            )) ;;end of services

 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss)

 ;;blacklist ugly sound speaker, blacklist
 #;(kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp,bluetooth"))

 ) ;;end of operating-system
----

--
Stefan Karrmann
Sichere Kommunikation? GPG: 0x8C3260C01550B612E4C5730D22E42112094CE53F

An sich ist nichts weder gut noch böse. Erst das Denken mach es dazu.
		-- William Shakespeare (Hamlet)