all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
@ 2021-02-16 10:11 Shyam Saran
  2021-02-22  9:19 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-02-16 10:11 UTC (permalink / raw)
  To: 46555

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

Hi,

LVM/Device Mapper swap continuously fails for os configuration


with

  guix system: error: service 'swap-/dev/mapper/guix-swap' requires
'device-mapping-guix-swap', which is not provided by any service



which originates from code



(define swap-service-type
  (shepherd-service-type
   'swap
   (lambda (device)
     (define requirement
       (if (and (string? device)
                (string-prefix? "/dev/mapper/" device))
           (list (symbol-append 'device-mapping-
                                (string->symbol (basename device))))
           '()))


at
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/base.scm#n2171


Thanks
/shyam

[-- Attachment #2: Type: text/html, Size: 1290 bytes --]

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-02-16 10:11 bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service Shyam Saran
@ 2021-02-22  9:19 ` Ludovic Courtès
  2021-02-23 15:23   ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2021-02-22  9:19 UTC (permalink / raw)
  To: Shyam Saran; +Cc: 46555

Hi Shyam,

Shyam Saran <syamsaran12345@gmail.com> skribis:

> LVM/Device Mapper swap continuously fails for os configuration
>
>
> with
>
>   guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> 'device-mapping-guix-swap', which is not provided by any service
>
>
>
> which originates from code
>
>
>
> (define swap-service-type
>   (shepherd-service-type
>    'swap
>    (lambda (device)
>      (define requirement
>        (if (and (string? device)
>                 (string-prefix? "/dev/mapper/" device))
>            (list (symbol-append 'device-mapping-
>                                 (string->symbol (basename device))))
>            '()))

You could need to define an LVM “device mapping” that provides
/dev/mapper/guix-swap:

  https://guix.gnu.org/manual/devel/en/html_node/Mapped-Devices.html#index-lvm_002ddevice_002dmapping

If you did already, could you send your complete config so we can have a
look?

Thanks,
Ludo’.




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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-02-22  9:19 ` Ludovic Courtès
@ 2021-02-23 15:23   ` Shyam Saran
  2021-02-25 13:19     ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-02-23 15:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555


[-- Attachment #1.1: Type: text/plain, Size: 1266 bytes --]

Thanks for response, I am attaching config.scm

If required then will try to make this file cleaner.



On Mon, 22 Feb 2021 at 14:50, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi Shyam,
>
> Shyam Saran <syamsaran12345@gmail.com> skribis:
>
> > LVM/Device Mapper swap continuously fails for os configuration
> >
> >
> > with
> >
> >   guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> > 'device-mapping-guix-swap', which is not provided by any service
> >
> >
> >
> > which originates from code
> >
> >
> >
> > (define swap-service-type
> >   (shepherd-service-type
> >    'swap
> >    (lambda (device)
> >      (define requirement
> >        (if (and (string? device)
> >                 (string-prefix? "/dev/mapper/" device))
> >            (list (symbol-append 'device-mapping-
> >                                 (string->symbol (basename device))))
> >            '()))
>
> You could need to define an LVM “device mapping” that provides
> /dev/mapper/guix-swap:
>
>
> https://guix.gnu.org/manual/devel/en/html_node/Mapped-Devices.html#index-lvm_002ddevice_002dmapping
>
> If you did already, could you send your complete config so we can have a
> look?
>
> Thanks,
> Ludo’.
>


/shyam

[-- Attachment #1.2: Type: text/html, Size: 2133 bytes --]

[-- Attachment #2: config.scm --]
[-- Type: text/x-scheme, Size: 34315 bytes --]

;; This is an operating system configuration generated

(use-modules (guix utils))
(use-modules (guix packages))
(use-modules (gnu services networking))
(use-modules (gnu services audio))
(use-modules (gnu) (gnu system nss))
(use-service-modules networking ssh)
(use-package-modules bootloaders certs suckless wm)

(use-service-modules desktop networking cups ssh xorg avahi mail)
(use-package-modules certs gnome cups)

(use-modules (gnu packages shells))
(use-modules (gnu packages vim))

(use-modules (gnu))
(use-package-modules screen)
\f
;; other guix

(use-modules (gnu system locale))
(use-modules (guix store))
(use-modules (rnrs lists))
(use-modules (srfi srfi-1))
(use-package-modules base idutils)
(use-service-modules dns mcron messaging)
\f


(define (open-udev-lvm-device source target)
  "Return a gexp that maps SOURCES to TARGETS as a LVM device, using
'lvm'."
  (with-imported-modules (source-module-closure '((gnu build file-systems)))
                         #~(let ((source  #$source)
                                 (lvm-bin #$(file-append lvm2-static "/sbin/lvm")))
                             ;; Use 'lvm2-static', not 'lvm2', to avoid pulling the
                             ;; whole world inside the initrd (for when we're in an initrd).
                             (begin
                               (format #t "Enabling ~a~%" #$target)
                               (system* lvm-bin "vgchange" "-ay" (car (string-split #$target #\-)))
                               (sleep 1)
                               (zero? (system* lvm-bin "lvchange" "-aay" "-y" "--sysinit" "--ignoreskippedcluster"
                                               (string-join (string-split #$target #\-) "/")))))))

(define (close-udev-lvm-device sources target)
  "Return a gexp that closes TARGET, a LVM device."
  #~(zero? (system* #$(file-append lvm2-static "/sbin/lvm")
                    "lvchange" "-an" "-y" (string-join (string-split #$target #\-) "/"))))
;; The type of LVM mapped devices.
(define udev-lvm-device-mapping (mapped-device-kind (open open-udev-lvm-device)
                                                    ;; (check check-udev-lvm-device)
                                                    (close close-udev-lvm-device)))
\f

(define %local-fs-boot-efi-partition "/dev/sda1")

(define %local-grub-ubuntu-menuentries (list (menu-entry (label "Ubuntu GNU/Linux")
                                                         (linux "(lvm/tf1e5mXubuntu-boot)/vmlinuz")
                                                         (linux-arguments '("root=/dev/mapper/tf1e5mXubuntu-root ro --verbose nosplash debug"))
                                                         (initrd "(lvm/tf1e5mXubuntu-boot)/initrd.img"))))
\f

(define %localmachine-host-name                     "komputilo")
(define %localmachine-account-uid                   1000)
(define %localmachine-account-user-name             "s")
(define %localmachine-account-comment               "shyam")
(define %localmachine-account-group-name            "users")
(define %localmachine-account-group-gid              1000)
(define %localmachine-account-supplementry-groups   '("wheel" "netdev" "audio" "video"))
(define %localmachine-account-home-parent-directory "/home")
(define %localmachine-account-shell                 #~(string-append #$zsh "/bin/zsh"))
(define %localmachine-gdm-auto-login                #f)
(define %localmachine-gdm-allow-empty-password      #t)

(define %localmachine-account-create-home-directory #f)
(define %localmachine-guix-substitute-urls          '("https://ci.guix.gnu.org"
                                                      "https://bayfront.guixsd.org"
                                                      "http://guix.genenetwork.org"
                                                      "https://guix.tobias.gr"
                                                      "https://ci.guix.info/"
                                                      ;; "https://berlin.guixsd.org"
                                                      "https://berlin.guix.gnu.org"))
(define %localmachine-guix-extra-options            '(
                                                      ;; "--max-jobs=2"
                                                      ;; "--cores=1"
                                                      "--gc-keep-derivations=yes"
                                                      "--gc-keep-outputs=yes"))
(define %localmachine-guix-use-substitutes          #t) ;always true

(define %localmachine-network-manager-dns           "dnsmasq")
(define %localmachine-default-realm                 #f)
\f

(use-modules (gnu packages linux))
(use-modules (guix modules))

(define (open-non-udev-lvm-device source targets)
  "Return a gexp that maps SOURCES to TARGETSS as a LVM device, using
'lvm'."
  (with-imported-modules (source-module-closure '((gnu build file-systems)))
                         #~(let ((source   #$source)
                                 (targets  '#$targets)
                                 (lvm-bin  #$(file-append lvm2-static "/sbin/lvm")))
                             ;; Use 'lvm2-static', not 'lvm2', to avoid pulling the
                             ;; whole world inside the initrd (for when we're in an initrd).
                             (begin
                               (format #t "Enabling ~a~%" '#$targets)
                               (sleep 1)
                               (system* lvm-bin "vgscan" "--mknodes")
                               (sleep 1)
                               (map (lambda (file) (system* lvm-bin "vgchange" "-ay" (car (string-split file #\-))))
                                    '#$targets)
                               (sleep 1)
                               (map (lambda (file) (zero? (system* lvm-bin "lvchange" "-aay" "-y" "--sysinit" "--ignoreskippedcluster"
                                                                   (string-join (string-split file #\-) "/"))))
                                    '#$targets)
                               #t))))

(define (close-non-udev-lvm-device sources targets)
  "Return a gexp that closes TARGETS, a LVM device."
  #~(begin
      (map (lambda (file) (zero? (system* #$(file-append lvm2-static "/sbin/lvm")
                                          "lvchange" "-an" "-y" (string-join (string-split file #\-) "/"))))
           '#$targets)
      #t))

;; The type of LVM mapped devices.
(define non-udev-lvm-device-mapping (mapped-device-kind (open open-non-udev-lvm-device)
                                                        ;; (check check-non-udev-lvm-device)
                                                        (close close-non-udev-lvm-device)))
\f

(define %localmachine-mapped-device-guix-root       (mapped-device (source "/dev/sda31")
                                                                   (target "guix-root")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-boot       (mapped-device (source "/dev/sda31")
                                                                   (target "guix-boot")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-gnu        (mapped-device (source "/dev/sda31")
                                                                   (target "guix-gnu")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-swap       (mapped-device (source "/dev/sda31")
                                                                   (target "guix-swap")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-tmp        (mapped-device (source "/dev/sda31")
                                                                   (target "guix-tmp")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-var        (mapped-device (source "/dev/sda31")
                                                                   (target "guix-var")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-house-home      (mapped-device (source "/dev/test")
                                                                   (target "house-home")
                                                                   (type   non-udev-lvm-device-mapping)))
\f

(define %localmachine-mapped-devices (list %localmachine-mapped-device-guix-root
                                           %localmachine-mapped-device-guix-boot
                                           %localmachine-mapped-device-guix-gnu
                                           %localmachine-mapped-device-guix-var
                                           %localmachine-mapped-device-guix-swap
                                           %localmachine-mapped-device-guix-tmp
                                           %localmachine-mapped-device-house-home))
\f

;;; guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
(define %localmachine-swap-devices      (list "/dev/mapper/guix-swap"))
\f

(define %localmachine-file-system-guix-root       (file-system (mount-point         "/")
                                                               (device              "/dev/mapper/guix-root")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        %localmachine-mapped-devices)))

;; (define %localmachine-file-system-guix-swap       (file-system (mount-point         "/xyz")
;;                                                         (device              (string-append "/dev/mapper/guix-swap"))
;;                                                         (type                "ext4")
;;                                                         (check?              #f)
;;                                                         (mount?              #f)
;;                                                         (create-mount-point? #f)
;;                                                         (needed-for-boot?    #t)
;;                                                         (dependencies        %localmachine-mapped-devices)))

(define %localmachine-file-system-guix-boot       (file-system (mount-point         "/boot")
                                                               (device              "/dev/mapper/guix-boot")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-gnu        (file-system (mount-point         "/gnu")
                                                               (device              "/dev/mapper/guix-gnu")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-tmp        (file-system (mount-point         "/tmp")
                                                               (device              "/dev/mapper/guix-tmp")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-var        (file-system (mount-point         "/var")
                                                               (device              "/dev/mapper/guix-var")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-house-home      (file-system (mount-point         "/home")
                                                               (device              "/dev/mapper/house-home")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #f)
                                                               (dependencies        (append (list ;; %localmachine-file-system-guix-root
                                                                                             )
                                                                                            %localmachine-mapped-devices))))
\f

(define %localmachine-file-system-boot-efi        (file-system (mount-point         "/boot/efi")
                                                               (device              "/dev/sda1")
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (type                "vfat")
                                                               (dependencies        (append (list %localmachine-file-system-guix-boot
                                                                                                  %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))
\f

(define %localmachine-lvm-mount-home-file-systems         %localmachine-file-system-house-home)
\f

(define %localmachine-mount-lvm-system-file-systems       (list %localmachine-file-system-guix-root
                                                                ;; %localmachine-file-system-guix-swap
                                                                %localmachine-file-system-guix-boot
                                                                %localmachine-file-system-guix-gnu
                                                                %localmachine-file-system-guix-tmp
                                                                %localmachine-file-system-guix-var))
\f
(define %localmachine-lvm-system-file-systems             (append %localmachine-mount-lvm-system-file-systems
                                                                  %localmachine-lvm-mount-home-file-systems))
\f

(define %localmachine-lvm-file-systems                    (append %localmachine-lvm-system-file-systems))
\f

(define %localmachine-other-file-systems                  (list %localmachine-file-system-boot-efi))
\f

(define %localmachine-file-systems                        (append %localmachine-lvm-file-systems
                                                                  %localmachine-other-file-systems
                                                                  %base-file-systems))
\f

;; packages
(use-modules (gnu packages glib))

(define %localmachine-other-packages (list "polkit"
                                           "polkit-gnome"
                                           "autorandr"
                                           "xmodmap"
                                           "hplip"
                                           "simple-scan"
                                           "xsane"
                                           "sane-backends"
                                           "sane-backends-minimal"
                                           "glib-networking"
                                           "xf86-input-evdev"))

(define %localmachine-system-selected-package-names (list "glibc-utf8-locales"
                                                          "gdm"
                                                          "gpm"
                                                          "slock" ; need suid
                                                          "zsh"
                                                          "stumpwm"
                                                          "sbcl-stumpwm-cpu" "sbcl-stumpwm-mem" "sbcl-stumpwm-numpad-layouts" "sbcl-stumpwm-screenshot" "sbcl-stumpwm-winner-mode"
                                                          "guile-wm"
                                                          "windowmaker"
                                                          ;; "findutils"
                                                          "idutils"
						                                              "dovecot"
                                                          "xinput"
                                                          "ibus"
                                                          "m17n-lib"
                                                          "m17n-db"
                                                          ;; "twm"
                                                          ;; "herbstluftwm"
                                                          "ecryptfs-utils"))
\f

(define %localmachine-package-names-for-installation
  (append %localmachine-other-packages
          %localmachine-system-selected-package-names))

(define %localmachine-system-desktop-packages
  (list lvm2
        ;; for HTTPS access
        nss-certs
        ;; for user mounts
        gvfs))

(define %localmachine-system-selected-packages
  (map specification->package
       %localmachine-package-names-for-installation))

(define %localmachine-system-packages (append %localmachine-system-desktop-packages
                                              %localmachine-system-selected-packages))

(define %localmachine-reinit-packages (append %localmachine-system-packages
                                              %base-packages))
\f

(define %localmachine-packages %localmachine-reinit-packages)
\f

(define %localmachine-keyboard-layout (keyboard-layout "us" "altgr-intl"))
\f

(define %localmachine-grub-ubuntu-menuentries %local-grub-ubuntu-menuentries)

(define %localmachine-efi-bootloader
  (bootloader-configuration (bootloader      grub-efi-bootloader)
                            (target          "/boot/efi")
                            (keyboard-layout %localmachine-keyboard-layout)
                            (menu-entries    %localmachine-grub-ubuntu-menuentries)))
\f

(define %localmachine-metal-initrd base-initrd)
\f

(define %localmachine-simple-groups (list (user-group (name %localmachine-account-group-name)
                                                      (id   %localmachine-account-group-gid))))

(define %localmachine-groups        (append %localmachine-simple-groups
                                            %base-groups))
\f

(define %localmachine-simple-users  (list (user-account (uid                    %localmachine-account-uid)
                                                        (name                   %localmachine-account-user-name)
                                                        (comment                %localmachine-account-comment)
                                                        (group                  %localmachine-account-group-name)
                                                        (supplementary-groups   %localmachine-account-supplementry-groups)
                                                        (create-home-directory? %localmachine-account-create-home-directory))))

(define %localmachine-users        (append %localmachine-simple-users
                                           %base-user-accounts))
\f

;; Vixie cron schedular
(define updatedb-job
  ;; Run 'updatedb' at 3AM every day.  Here we write the
  ;; job's action as a Scheme procedure.
  #~(job '(next-hour '(3))
         (lambda ()
           (execl (string-append #$findutils "/bin/updatedb")
                  ;; "updatedb"
                  "--prunepaths=`/tmp /var/tmp /gnu/store /run'"))))

(define garbage-collector-job
  ;; Collect garbage 5 minutes after midnight every day.
  ;; The job's action is a shell command.
  #~(job "5 0 * * *"            ;Vixie cron syntax
         "guix gc -F 1G"))

(define idutils-job
  ;; Update the index database as user "charlie" at 12:15PM
  ;; and 19:15PM.  This runs from the user's home directory.
  #~(job '(next-minute-from (next-hour '(12 19)) '(15))
         (string-append #$idutils "/bin/mkid src")
         #:user "s"))
\f

(define %localmachine-publish-services (list (service guix-publish-service-type
                                                      (guix-publish-configuration (advertise?             #t)
                                                                                  (compression            '(("lzip" 7) ("gzip" 9)))
                                                                                  (cache                  "/var/cache/guix/publish")
                                                                                  (cache-bypass-threshold (* 100 1024 1024))
                                                                                  (ttl                    (* 3 24 60 60))))))
\f

;; https ://guix.gnu.org/manual/en/html_node/Scheduled-Job-Execution.html
(define %localmachine-mcron-services (list (service mcron-service-type
                                                    (mcron-configuration (jobs (list garbage-collector-job
                                                                                     ;; idutils-job
                                                                                     updatedb-job))))))
\f

(define %localmachine-bitlbee-services (list (service bitlbee-service-type)))
\f

(define %localmachine-mail-aliases-services (list (service mail-aliases-service-type
                                                           '(("postmaster" "bob")
                                                             ("bob"        "bob@example.com" "bob@example2.com")))))
\f

(define %localmachine-dovecot-services (list (dovecot-service #:config
                                                              (dovecot-configuration
                                                               (mail-location "maildir:~/.maildir")
                                                               (listen        '("127.0.0.1"))))))

(define %localmachine-exim-services (list (service exim-service-type
                                                   (exim-configuration
                                                    (config-file #f)))))
\f

(define %localmachine-dnsmasq-services (list (service dnsmasq-service-type
                                                      (dnsmasq-configuration (no-resolv? #t)
                                                                             ;; (resolv-file)
                                                                             ;; (no-resolv? #f)
                                                                             ;; (servers '("82.196.9.45"
                                                                             ;;            "51.255.48.78"
                                                                             ;;            "51.15.98.97"))
                                                                             (local-service? #t)))))
\f
(define %localmachine-network-manager-services (list (service network-manager-service-type
                                                              (network-manager-configuration (dns %localmachine-network-manager-dns)))))

(define %localmachine-avahi-services (list (service avahi-service-type)))

(define %localmachine-gpm-services  (list (service gpm-service-type)))
\f

(define %localmachine-audio-services (list (service mpd-service-type
                                                    (mpd-configuration
                                                     (user %localmachine-account-user-name)
                                                     (music-dir "~/Music")))))
\f

;; https://github.com/alezost/guix-config/blob/master/system-config/os-main.scm
(define %localmachine-mingetty-services (list (service mingetty-service-type
                                                (mingetty-configuration (tty "tty1")))
                                              (service mingetty-service-type
                                                       (mingetty-configuration (tty "tty2")))
                                              (service mingetty-service-type
                                                       (mingetty-configuration (tty "tty3")))
                                              (service mingetty-service-type
                                                       (mingetty-configuration (tty "tty4")))
                                              (service mingetty-service-type
                                                       (mingetty-configuration (tty "tty5")))
                                              (service mingetty-service-type
                                                       (mingetty-configuration (tty "tty6")))))
\f

(define %localmachine-cups-services (list (service cups-service-type
                                                   (cups-configuration (web-interface? #t)
                                                                       (default-paper-size "A4")
                                                                       (extensions (list cups-filters
                                                                                         hplip-minimal))))))
\f
(define %localmachine-polkit-services (list))
\f


;; services modifications
\f
(define %localmachine-desktop-nm-services (modify-services %localmachine-desktop-nm-services
                                                           (gdm-service-type config =>
                                                                             (gdm-configuration (inherit config)
                                                                                                (xorg-configuration
                                                                                                 (xorg-configuration
                                                                                                  (keyboard-layout %localmachine-keyboard-layout)))
                                                                                                (allow-empty-passwords? %localmachine-gdm-allow-empty-password)
                                                                                                (auto-login?            %localmachine-gdm-auto-login)
                                                                                                (default-user           %localmachine-account-user-name)))))
\f
;; services add
\f

(define %localmachine-desktop-services %localmachine-desktop-nm-services)
\f

(define %localmachine-network-services  (list (service openssh-service-type)
                                              (service tor-service-type)))

(define %localmachine-heavy-wm-services (list (service gnome-desktop-service-type)
                                              (service xfce-desktop-service-type)
                                              (service mate-desktop-service-type)
                                              (service enlightenment-desktop-service-type)))

(define %localmachine-many-services (append %localmachine-network-services
                                            %localmachine-heavy-wm-services))

(define %localmachine-few-services  (append (list (service gnome-desktop-service-type)) 
				                                    %localmachine-network-services))
\f

(define %localmachine-simple-services %localmachine-few-services)

(define %localmachine-simple-and-desktop-services (append %localmachine-simple-services
                                                          %localmachine-mail-aliases-services
                                                          %localmachine-dovecot-services
                                                          %localmachine-gpm-services
                                                          %localmachine-audio-services
                                                          %localmachine-publish-services
                                                          %localmachine-mcron-services
                                                          %localmachine-cups-services
                                                          %localmachine-polkit-services
                                                          %localmachine-bitlbee-services
                                                          %localmachine-desktop-services))
\f

(define %localmachine-base-services %base-services)
\f

(define %localmachine-final-services %localmachine-simple-and-desktop-services)

(define %localmachine-services       %localmachine-final-services)
\f

(define %localmachine-firmware %base-firmware)
\f

(define %localmachine-locale "en_US.utf8")

(define %localmachine-locate-names (list "en_US"
                                         "hi_IN"
                                         "ur_PK"
                                         "fa_IR"
                                         "ar_SA"))

(define %localmachine-all-locale-definitions  (map (lambda (locale)
                                              (locale-definition (source locale)
                                                                 (name   (string-append locale "." "utf8"))))
                                            %localmachine-locate-names))

(define %localmachine-locale-definitions      (append %localmachine-all-locale-definitions
                                               %default-locale-definitions))
\f

(define %localmachine-timezone  "Asia/Kolkata")
\f

(define %localmachine-bootloader %localmachine-efi-bootloader)
(define %localmachine-initrd     %localmachine-metal-initrd)
\f

;; (define %localmachine-setuid-programs %setuid-programs)

(define %localmachine-setuid-programs (cons* #~(string-append #$ecryptfs-utils "/sbin/mount.ecryptfs_private")
                                      %setuid-programs))
\f

(define %localmachine-kernel linux-libre)
\f

(operating-system
 (kernel              %localmachine-kernel)
 (kernel-arguments    '(" modprobe.blacklist=usbmouse,usbkbd --verbose nosplash debug"))
 (firmware            %localmachine-firmware)
 (initrd              %localmachine-initrd)
 (locale              %localmachine-locale)
 (locale-definitions  %localmachine-locale-definitions)
 (timezone            %localmachine-timezone)
 (keyboard-layout     %localmachine-keyboard-layout)
 (host-name           %localmachine-host-name)
 (setuid-programs     %localmachine-setuid-programs)
 (mapped-devices      %localmachine-mapped-devices)
 (users               %localmachine-users)
 (groups              %localmachine-groups)
 (file-systems        %localmachine-file-systems)
 (swap-devices        %localmachine-swap-devices)
 (bootloader          %localmachine-bootloader)
 (packages            %localmachine-packages)
 (services            %localmachine-services)
 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss))
\f

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-02-23 15:23   ` Shyam Saran
@ 2021-02-25 13:19     ` Ludovic Courtès
  2021-02-26  8:08       ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2021-02-25 13:19 UTC (permalink / raw)
  To: Shyam Saran; +Cc: 46555

Hi,

Shyam Saran <syamsaran12345@gmail.com> skribis:

> Thanks for response, I am attaching config.scm

I get:

--8<---------------cut here---------------start------------->8---
$ guix system build /tmp/config.scm
guix system: error: fiasko dum ŝargo de '/tmp/config.scm':
/tmp/config.scm:277:58: In procedure append: Wrong type argument in position 1 (expecting empty list): #<<file-system> device: "/dev/mapper/house-home" mount-point: "/home" type: "ext4" flags: () options: #f mount?: #t mount-may-fail?: #f needed-for-boot?: #f check?: #f create-mount-point?: #t dependencies: (#<<mapped-device> source: "/dev/sda31" targets: ("guix-root") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 133) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/sda31" targets: ("guix-boot") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 137) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/sda31" targets: ("guix-gnu") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 141) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/sda31" targets: ("guix-var") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 153) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/sda31" targets: ("guix-swap") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 145) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/sda31" targets: ("guix-tmp") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 149) (column . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source: "/dev/test" targets: ("house-home") type: #<<mapped-device-type> open: #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure close-non-udev-lvm-device (sources targets)> check: #<procedure 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 157) (column . 52) (filename . "/tmp/config.scm"))>) location: ((line . 233) (column . 50) (filename . "/tmp/config.scm"))>
--8<---------------cut here---------------end--------------->8---

Could you make sure the file passes ‘guix system build’?

TIA,
Ludo’.




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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-02-25 13:19     ` Ludovic Courtès
@ 2021-02-26  8:08       ` Shyam Saran
  2021-03-01  9:26         ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-02-26  8:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555


[-- Attachment #1.1: Type: text/plain, Size: 4061 bytes --]

Result of application of system build command

$ guix  system   build ~/tmp/config.scm

               2s
guix system: warning: the following groups appear more than once: users
guix system: error: service 'swap-/dev/mapper/guix-swap' requires
'device-mapping-guix-swap', which is not provided by any service


To be sure everything are correct

I had created lvm volume group guix and house
and their subvolume root, boot, var, gnu, swap, tmp (in guix) and home (in
house)


Result is the same, whether these volume groups were present or not.


Thanks


On Thu, 25 Feb 2021 at 18:49, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi,
>
> Shyam Saran <syamsaran12345@gmail.com> skribis:
>
> > Thanks for response, I am attaching config.scm
>
> I get:
>
> --8<---------------cut here---------------start------------->8---
> $ guix system build /tmp/config.scm
> guix system: error: fiasko dum ŝargo de '/tmp/config.scm':
> /tmp/config.scm:277:58: In procedure append: Wrong type argument in
> position 1 (expecting empty list): #<<file-system> device:
> "/dev/mapper/house-home" mount-point: "/home" type: "ext4" flags: ()
> options: #f mount?: #t mount-may-fail?: #f needed-for-boot?: #f check?: #f
> create-mount-point?: #t dependencies: (#<<mapped-device> source:
> "/dev/sda31" targets: ("guix-root") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 133) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/sda31" targets: ("guix-boot") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 137) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/sda31" targets: ("guix-gnu") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 141) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/sda31" targets: ("guix-var") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 153) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/sda31" targets: ("guix-swap") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 145) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/sda31" targets: ("guix-tmp") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 149) (column
> . 52) (filename . "/tmp/config.scm"))> #<<mapped-device> source:
> "/dev/test" targets: ("house-home") type: #<<mapped-device-type> open:
> #<procedure open-non-udev-lvm-device (source targets)> close: #<procedure
> close-non-udev-lvm-device (sources targets)> check: #<procedure
> 7f839682c5e0 at ice-9/boot-9.scm:803:2 _>> location: ((line . 157) (column
> . 52) (filename . "/tmp/config.scm"))>) location: ((line . 233) (column .
> 50) (filename . "/tmp/config.scm"))>
> --8<---------------cut here---------------end--------------->8---
>
> Could you make sure the file passes ‘guix system build’?
>
> TIA,
> Ludo’.
>

[-- Attachment #1.2: Type: text/html, Size: 5337 bytes --]

[-- Attachment #2: config.scm --]
[-- Type: text/x-scheme, Size: 23560 bytes --]

;; This is an operating system configuration generated

(use-modules (guix utils))
(use-modules (guix packages))
(use-modules (gnu services networking))
(use-modules (gnu services audio))
(use-modules (gnu) (gnu system nss))
(use-service-modules networking ssh)
(use-package-modules bootloaders certs suckless wm)

(use-service-modules desktop networking cups ssh xorg avahi mail)
(use-package-modules certs gnome cups)

(use-modules (gnu packages shells))
(use-modules (gnu packages vim))

(use-modules (gnu))
(use-package-modules screen)
\f
;; other guix

(use-modules (gnu system locale))
(use-modules (guix store))
(use-modules (rnrs lists))
(use-modules (srfi srfi-1))
(use-package-modules base idutils)
(use-service-modules dns mcron messaging)
\f

(define %local-fs-boot-efi-partition "/dev/sda1")

(define %local-grub-ubuntu-menuentries (list (menu-entry (label "Ubuntu GNU/Linux")
                                                         (linux "(lvm/tf1e5mXubuntu-boot)/vmlinuz")
                                                         (linux-arguments '("root=/dev/mapper/tf1e5mXubuntu-root ro --verbose nosplash debug"))
                                                         (initrd "(lvm/tf1e5mXubuntu-boot)/initrd.img"))))
\f

(define %localmachine-host-name                     "komputilo")
(define %localmachine-account-uid                   1000)
(define %localmachine-account-user-name             "s")
(define %localmachine-account-comment               "shyam")
(define %localmachine-account-group-name            "users")
(define %localmachine-account-group-gid              1000)
(define %localmachine-account-supplementry-groups   '("wheel" "netdev" "audio" "video"))
(define %localmachine-account-home-parent-directory "/home")
(define %localmachine-account-shell                 #~(string-append #$zsh "/bin/zsh"))
(define %localmachine-gdm-auto-login                #f)
(define %localmachine-gdm-allow-empty-password      #t)

(define %localmachine-account-create-home-directory #f)
(define %localmachine-guix-substitute-urls          '("https://ci.guix.gnu.org"
                                                      "https://bayfront.guixsd.org"
                                                      "http://guix.genenetwork.org"
                                                      "https://guix.tobias.gr"
                                                      "https://ci.guix.info/"
                                                      ;; "https://berlin.guixsd.org"
                                                      "https://berlin.guix.gnu.org"))
(define %localmachine-guix-extra-options            '(
                                                      ;; "--max-jobs=2"
                                                      ;; "--cores=1"
                                                      "--gc-keep-derivations=yes"
                                                      "--gc-keep-outputs=yes"))
(define %localmachine-guix-use-substitutes          #t) ;always true

(define %localmachine-network-manager-dns           "dnsmasq")
(define %localmachine-default-realm                 #f)
\f

(use-modules (gnu packages linux))
(use-modules (guix modules))

(define (open-non-udev-lvm-device source targets)
  "Return a gexp that maps SOURCES to TARGETSS as a LVM device, using
'lvm'."
  (with-imported-modules (source-module-closure '((gnu build file-systems)))
                         #~(let ((source   #$source)
                                 (targets  '#$targets)
                                 (lvm-bin  #$(file-append lvm2-static "/sbin/lvm")))
                             ;; Use 'lvm2-static', not 'lvm2', to avoid pulling the
                             ;; whole world inside the initrd (for when we're in an initrd).
                             (begin
                               (format #t "Enabling ~a~%" '#$targets)
                               (sleep 1)
                               (system* lvm-bin "vgscan" "--mknodes")
                               (sleep 1)
                               (map (lambda (file) (system* lvm-bin "vgchange" "-ay" (car (string-split file #\-))))
                                    '#$targets)
                               (sleep 1)
                               (map (lambda (file) (zero? (system* lvm-bin "lvchange" "-aay" "-y" "--sysinit" "--ignoreskippedcluster"
                                                                   (string-join (string-split file #\-) "/"))))
                                    '#$targets)
                               #t))))

(define (close-non-udev-lvm-device sources targets)
  "Return a gexp that closes TARGETS, a LVM device."
  #~(begin
      (map (lambda (file) (zero? (system* #$(file-append lvm2-static "/sbin/lvm")
                                          "lvchange" "-an" "-y" (string-join (string-split file #\-) "/"))))
           '#$targets)
      #t))

;; The type of LVM mapped devices.
(define non-udev-lvm-device-mapping (mapped-device-kind (open open-non-udev-lvm-device)
                                                        ;; (check check-non-udev-lvm-device)
                                                        (close close-non-udev-lvm-device)))
\f

(define %localmachine-mapped-device-guix-root       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-root")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-boot       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-boot")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-gnu        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-gnu")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-swap       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-swap")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-tmp        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-tmp")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-var        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-var")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-house-home      (mapped-device (source "/dev/test")
                                                                   (target "house-home")
                                                                   (type   non-udev-lvm-device-mapping)))
\f

(define %localmachine-mapped-devices (list %localmachine-mapped-device-guix-root
                                           %localmachine-mapped-device-guix-boot
                                           %localmachine-mapped-device-guix-gnu
                                           %localmachine-mapped-device-guix-var
                                           %localmachine-mapped-device-guix-swap
                                           %localmachine-mapped-device-guix-tmp
                                           %localmachine-mapped-device-house-home))
\f

;;; guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
(define %localmachine-swap-devices      (list "/dev/mapper/guix-swap"))
\f

(define %localmachine-file-system-guix-root       (file-system (mount-point         "/")
                                                               (device              "/dev/mapper/guix-root")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        %localmachine-mapped-devices)))

;; (define %localmachine-file-system-guix-swap       (file-system (mount-point         "/xyz")
;;                                                         (device              (string-append "/dev/mapper/guix-swap"))
;;                                                         (type                "ext4")
;;                                                         (check?              #f)
;;                                                         (mount?              #f)
;;                                                         (create-mount-point? #f)
;;                                                         (needed-for-boot?    #t)
;;                                                         (dependencies        %localmachine-mapped-devices)))

(define %localmachine-file-system-guix-boot       (file-system (mount-point         "/boot")
                                                               (device              "/dev/mapper/guix-boot")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-gnu        (file-system (mount-point         "/gnu")
                                                               (device              "/dev/mapper/guix-gnu")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-tmp        (file-system (mount-point         "/tmp")
                                                               (device              "/dev/mapper/guix-tmp")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-guix-var        (file-system (mount-point         "/var")
                                                               (device              "/dev/mapper/guix-var")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))

(define %localmachine-file-system-house-home      (file-system (mount-point         "/home")
                                                               (device              "/dev/mapper/house-home")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #f)
                                                               (dependencies        (append (list ;; %localmachine-file-system-guix-root
                                                                                             )
                                                                                            %localmachine-mapped-devices))))
\f

(define %localmachine-file-system-boot-efi        (file-system (mount-point         "/boot/efi")
                                                               (device              "/dev/sda1")
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (type                "vfat")
                                                               (dependencies        (append (list %localmachine-file-system-guix-boot
                                                                                                  %localmachine-file-system-guix-root)
                                                                                            %localmachine-mapped-devices))))
\f

(define %localmachine-lvm-mount-home-file-systems         (list %localmachine-file-system-house-home))
\f

(define %localmachine-mount-lvm-system-file-systems       (list %localmachine-file-system-guix-root
                                                                ;; %localmachine-file-system-guix-swap
                                                                %localmachine-file-system-guix-boot
                                                                %localmachine-file-system-guix-gnu
                                                                %localmachine-file-system-guix-tmp
                                                                %localmachine-file-system-guix-var))
\f
(define %localmachine-lvm-system-file-systems             (append %localmachine-mount-lvm-system-file-systems
                                                                  %localmachine-lvm-mount-home-file-systems))
\f

(define %localmachine-lvm-file-systems                    (append %localmachine-lvm-system-file-systems))
\f

(define %localmachine-other-file-systems                  (list %localmachine-file-system-boot-efi))
\f



(define %localmachine-file-systems                        (append %localmachine-lvm-file-systems
                                                                  %localmachine-other-file-systems
                                                                  %base-file-systems))
\f

;; packages
(use-modules (gnu packages glib))

(define %localmachine-other-packages (list "polkit"
                                           "polkit-gnome"
                                           "autorandr"
                                           "xmodmap"
                                           "hplip"
                                           "simple-scan"
                                           "xsane"
                                           "sane-backends"
                                           "sane-backends-minimal"
                                           "glib-networking"
                                           "xf86-input-evdev"))

(define %localmachine-system-selected-package-names (list "glibc-utf8-locales"
                                                          "gdm"
                                                          "gpm"
                                                          "slock" ; need suid
                                                          "zsh"
                                                          "stumpwm"
                                                          "sbcl-stumpwm-cpu" "sbcl-stumpwm-mem" "sbcl-stumpwm-numpad-layouts" "sbcl-stumpwm-screenshot" "sbcl-stumpwm-winner-mode"
                                                          "guile-wm"
                                                          "windowmaker"
                                                          ;; "findutils"
                                                          "idutils"
						                                              "dovecot"
                                                          "xinput"
                                                          "ibus"
                                                          "m17n-lib"
                                                          "m17n-db"
                                                          ;; "twm"
                                                          ;; "herbstluftwm"
                                                          "ecryptfs-utils"))
\f

(define %localmachine-package-names-for-installation
  (append %localmachine-other-packages
          %localmachine-system-selected-package-names))

(define %localmachine-system-desktop-packages
  ;; (list lvm2
  ;;       ;; for HTTPS access
  ;;       nss-certs
  ;;       ;; for user mounts
  ;;       gvfs)
  '())

(define %localmachine-system-selected-packages
  (map specification->package
       %localmachine-package-names-for-installation))

(define %localmachine-system-packages (append %localmachine-system-desktop-packages
                                              %localmachine-system-selected-packages))

(define %localmachine-reinit-packages (append %localmachine-system-packages
                                              %base-packages))
\f

(define %localmachine-packages %localmachine-reinit-packages)
\f

(define %localmachine-keyboard-layout (keyboard-layout "us" "altgr-intl"))
\f

(define %localmachine-grub-ubuntu-menuentries %local-grub-ubuntu-menuentries)

(define %localmachine-efi-bootloader
  (bootloader-configuration (bootloader      grub-efi-bootloader)
                            (target          "/boot/efi")
                            (keyboard-layout %localmachine-keyboard-layout)
                            (menu-entries    %localmachine-grub-ubuntu-menuentries)))
\f

(define %localmachine-metal-initrd base-initrd)
\f

(define %localmachine-simple-groups (list (user-group (name %localmachine-account-group-name)
                                                      (id   %localmachine-account-group-gid))))

(define %localmachine-groups        (append %localmachine-simple-groups
                                            %base-groups))
\f

(define %localmachine-simple-users  (list (user-account (uid                    %localmachine-account-uid)
                                                        (name                   %localmachine-account-user-name)
                                                        (comment                %localmachine-account-comment)
                                                        (group                  %localmachine-account-group-name)
                                                        (supplementary-groups   %localmachine-account-supplementry-groups)
                                                        (create-home-directory? %localmachine-account-create-home-directory))))

(define %localmachine-users        (append %localmachine-simple-users
                                           %base-user-accounts))
\f

(define %localmachine-services       %base-services)
\f

(define %localmachine-firmware %base-firmware)
\f

(define %localmachine-locale "en_US.utf8")

(define %localmachine-locate-names (list "en_US"
                                         "hi_IN"
                                         "ur_PK"
                                         "fa_IR"
                                         "ar_SA"))

(define %localmachine-all-locale-definitions  (map (lambda (locale)
                                                     (locale-definition (source locale)
                                                                        (name   (string-append locale "." "utf8"))))
                                                   %localmachine-locate-names))

(define %localmachine-locale-definitions      (append %localmachine-all-locale-definitions
                                                      %default-locale-definitions))
\f

(define %localmachine-timezone  "Asia/Kolkata")
\f

(define %localmachine-bootloader %localmachine-efi-bootloader)
(define %localmachine-initrd     %localmachine-metal-initrd)
\f

;; (define %localmachine-setuid-programs %setuid-programs)

(define %localmachine-setuid-programs (cons* #~(string-append #$ecryptfs-utils "/sbin/mount.ecryptfs_private")
                                             %setuid-programs))
\f

(define %localmachine-kernel linux-libre)
\f

(operating-system
 (kernel              %localmachine-kernel)
 (kernel-arguments    '(" modprobe.blacklist=usbmouse,usbkbd --verbose nosplash debug"))
 (firmware            %localmachine-firmware)
 (initrd              %localmachine-initrd)
 (locale              %localmachine-locale)
 (locale-definitions  %localmachine-locale-definitions)
 (timezone            %localmachine-timezone)
 (keyboard-layout     %localmachine-keyboard-layout)
 (host-name           %localmachine-host-name)
 (setuid-programs     %localmachine-setuid-programs)
 (mapped-devices      %localmachine-mapped-devices)
 (users               %localmachine-users)
 (groups              %localmachine-groups)
 (file-systems        %localmachine-file-systems)
 (swap-devices        %localmachine-swap-devices)
 (bootloader          %localmachine-bootloader)
 (packages            %localmachine-packages)
 (services            %localmachine-services)
 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss))
\f

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-02-26  8:08       ` Shyam Saran
@ 2021-03-01  9:26         ` Ludovic Courtès
  2021-03-02 10:34           ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2021-03-01  9:26 UTC (permalink / raw)
  To: Shyam Saran; +Cc: 46555

Hi Shyam,

Shyam Saran <syamsaran12345@gmail.com> skribis:

> Result of application of system build command
>
> $ guix  system   build ~/tmp/config.scm
>
>                2s
> guix system: warning: the following groups appear more than once: users
> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> 'device-mapping-guix-swap', which is not provided by any service

The problem here is that you had:

  (file-system
    (mount-point "/")
    ;; …
    (needed-for-boot? #t)
    (dependencies %localmachine-mapped-devices))

All the needed-for-boot file systems had all the mapped devices in
‘dependencies’.  Thus, no ‘device-mapping-guix-swap’ Shepherd service
was created, because that device mapping was needed at boot.

The solution is to remove the ‘dependencies’ field for all your file
systems.  Since they have /dev/mapper/… as their ’device’, you don’t
need ‘dependencies’: it’s automatically inferred.  If, after this
change, you run:

  guix system shepherd-graph /tmp/config.scm| xdot -

you can see that the ‘swap-/dev/mapper/guix-swap’ service depends on
‘device-mapping-guix-swap’.

HTH!

Ludo’.




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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-03-01  9:26         ` Ludovic Courtès
@ 2021-03-02 10:34           ` Shyam Saran
  2021-03-02 10:42             ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-03-02 10:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555

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

As mentioned I had removed all dependency for root "/" fs

but result is same

$ guix  system   build ~/tmp/config.scm
guix system: warning: the following groups appear more than once: users
guix system: error: service 'swap-/dev/mapper/guix-swap' requires
'device-mapping-guix-swap', which is not provided by any service

Then again removed all dependencies from all fs /var /gnu /tmp etc
But the result is the same.

$ guix  system   build ~/tmp/config.scm
guix system: warning: the following groups appear more than once: users
guix system: error: service 'swap-/dev/mapper/guix-swap' requires
'device-mapping-guix-swap', which is not provided by any service


Thanks


On Mon, 1 Mar 2021 at 14:56, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi Shyam,
>
> Shyam Saran <syamsaran12345@gmail.com> skribis:
>
> > Result of application of system build command
> >
> > $ guix  system   build ~/tmp/config.scm
> >
> >                2s
> > guix system: warning: the following groups appear more than once: users
> > guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> > 'device-mapping-guix-swap', which is not provided by any service
>
> The problem here is that you had:
>
>   (file-system
>     (mount-point "/")
>     ;; …
>     (needed-for-boot? #t)
>     (dependencies %localmachine-mapped-devices))
>
> All the needed-for-boot file systems had all the mapped devices in
> ‘dependencies’.  Thus, no ‘device-mapping-guix-swap’ Shepherd service
> was created, because that device mapping was needed at boot.
>
> The solution is to remove the ‘dependencies’ field for all your file
> systems.  Since they have /dev/mapper/… as their ’device’, you don’t
> need ‘dependencies’: it’s automatically inferred.  If, after this
> change, you run:
>
>   guix system shepherd-graph /tmp/config.scm| xdot -
>
> you can see that the ‘swap-/dev/mapper/guix-swap’ service depends on
> ‘device-mapping-guix-swap’.
>
> HTH!
>
> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-03-02 10:34           ` Shyam Saran
@ 2021-03-02 10:42             ` Shyam Saran
  2021-03-02 16:12               ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-03-02 10:42 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555


[-- Attachment #1.1: Type: text/plain, Size: 2416 bytes --]

Sorry

I had forgot to remove

dependency from /boot/efi


So it was causing this error

attached the file, reconfiguring the whole system
hoping it must work



Thanks very much for all the help :)




On Tue, 2 Mar 2021 at 16:04, Shyam Saran <syamsaran12345@gmail.com> wrote:

> As mentioned I had removed all dependency for root "/" fs
>
> but result is same
>
> $ guix  system   build ~/tmp/config.scm
> guix system: warning: the following groups appear more than once: users
> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> 'device-mapping-guix-swap', which is not provided by any service
>
> Then again removed all dependencies from all fs /var /gnu /tmp etc
> But the result is the same.
>
> $ guix  system   build ~/tmp/config.scm
> guix system: warning: the following groups appear more than once: users
> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
> 'device-mapping-guix-swap', which is not provided by any service
>
>
> Thanks
>
>
> On Mon, 1 Mar 2021 at 14:56, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Hi Shyam,
>>
>> Shyam Saran <syamsaran12345@gmail.com> skribis:
>>
>> > Result of application of system build command
>> >
>> > $ guix  system   build ~/tmp/config.scm
>> >
>> >                2s
>> > guix system: warning: the following groups appear more than once: users
>> > guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>> > 'device-mapping-guix-swap', which is not provided by any service
>>
>> The problem here is that you had:
>>
>>   (file-system
>>     (mount-point "/")
>>     ;; …
>>     (needed-for-boot? #t)
>>     (dependencies %localmachine-mapped-devices))
>>
>> All the needed-for-boot file systems had all the mapped devices in
>> ‘dependencies’.  Thus, no ‘device-mapping-guix-swap’ Shepherd service
>> was created, because that device mapping was needed at boot.
>>
>> The solution is to remove the ‘dependencies’ field for all your file
>> systems.  Since they have /dev/mapper/… as their ’device’, you don’t
>> need ‘dependencies’: it’s automatically inferred.  If, after this
>> change, you run:
>>
>>   guix system shepherd-graph /tmp/config.scm| xdot -
>>
>> you can see that the ‘swap-/dev/mapper/guix-swap’ service depends on
>> ‘device-mapping-guix-swap’.
>>
>> HTH!
>>
>> Ludo’.
>>
>

[-- Attachment #1.2: Type: text/html, Size: 3544 bytes --]

[-- Attachment #2: config.scm --]
[-- Type: text/x-scheme, Size: 24180 bytes --]

;; This is an operating system configuration generated

(use-modules (guix utils))
(use-modules (guix packages))
(use-modules (gnu services networking))
(use-modules (gnu services audio))
(use-modules (gnu) (gnu system nss))
(use-service-modules networking ssh)
(use-package-modules bootloaders certs suckless wm)

(use-service-modules desktop networking cups ssh xorg avahi mail)
(use-package-modules certs gnome cups)

(use-modules (gnu packages shells))
(use-modules (gnu packages vim))

(use-modules (gnu))
(use-package-modules screen)
\f
;; other guix

(use-modules (gnu system locale))
(use-modules (guix store))
(use-modules (rnrs lists))
(use-modules (srfi srfi-1))
(use-package-modules base idutils)
(use-service-modules dns mcron messaging)
\f

(define %local-fs-boot-efi-partition "/dev/sda1")

(define %local-grub-ubuntu-menuentries (list (menu-entry (label "Ubuntu GNU/Linux")
                                                         (linux "(lvm/tf1e5mXubuntu-boot)/vmlinuz")
                                                         (linux-arguments '("root=/dev/mapper/tf1e5mXubuntu-root ro --verbose nosplash debug"))
                                                         (initrd "(lvm/tf1e5mXubuntu-boot)/initrd.img"))))
\f

(define %localmachine-host-name                     "komputilo")
(define %localmachine-account-uid                   1000)
(define %localmachine-account-user-name             "s")
(define %localmachine-account-comment               "shyam")
(define %localmachine-account-group-name            "users")
(define %localmachine-account-group-gid              1000)
(define %localmachine-account-supplementry-groups   '("wheel" "netdev" "audio" "video"))
(define %localmachine-account-home-parent-directory "/home")
(define %localmachine-account-shell                 #~(string-append #$zsh "/bin/zsh"))
(define %localmachine-gdm-auto-login                #f)
(define %localmachine-gdm-allow-empty-password      #t)

(define %localmachine-account-create-home-directory #f)
(define %localmachine-guix-substitute-urls          '("https://ci.guix.gnu.org"
                                                      "https://bayfront.guixsd.org"
                                                      "http://guix.genenetwork.org"
                                                      "https://guix.tobias.gr"
                                                      "https://ci.guix.info/"
                                                      ;; "https://berlin.guixsd.org"
                                                      "https://berlin.guix.gnu.org"))
(define %localmachine-guix-extra-options            '(
                                                      ;; "--max-jobs=2"
                                                      ;; "--cores=1"
                                                      "--gc-keep-derivations=yes"
                                                      "--gc-keep-outputs=yes"))
(define %localmachine-guix-use-substitutes          #t) ;always true

(define %localmachine-network-manager-dns           "dnsmasq")
(define %localmachine-default-realm                 #f)
\f

(use-modules (gnu packages linux))
(use-modules (guix modules))

(define (open-non-udev-lvm-device source targets)
  "Return a gexp that maps SOURCES to TARGETSS as a LVM device, using
'lvm'."
  (with-imported-modules (source-module-closure '((gnu build file-systems)))
                         #~(let ((source   #$source)
                                 (targets  '#$targets)
                                 (lvm-bin  #$(file-append lvm2-static "/sbin/lvm")))
                             ;; Use 'lvm2-static', not 'lvm2', to avoid pulling the
                             ;; whole world inside the initrd (for when we're in an initrd).
                             (begin
                               (format #t "Enabling ~a~%" '#$targets)
                               (sleep 1)
                               (system* lvm-bin "vgscan" "--mknodes")
                               (sleep 1)
                               (map (lambda (file) (system* lvm-bin "vgchange" "-ay" (car (string-split file #\-))))
                                    '#$targets)
                               (sleep 1)
                               (map (lambda (file) (zero? (system* lvm-bin "lvchange" "-aay" "-y" "--sysinit" "--ignoreskippedcluster"
                                                                   (string-join (string-split file #\-) "/"))))
                                    '#$targets)
                               #t))))

(define (close-non-udev-lvm-device sources targets)
  "Return a gexp that closes TARGETS, a LVM device."
  #~(begin
      (map (lambda (file) (zero? (system* #$(file-append lvm2-static "/sbin/lvm")
                                          "lvchange" "-an" "-y" (string-join (string-split file #\-) "/"))))
           '#$targets)
      #t))

;; The type of LVM mapped devices.
(define non-udev-lvm-device-mapping (mapped-device-kind (open open-non-udev-lvm-device)
                                                        ;; (check check-non-udev-lvm-device)
                                                        (close close-non-udev-lvm-device)))
\f

(define %localmachine-mapped-device-guix-root       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-root")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-boot       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-boot")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-gnu        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-gnu")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-swap       (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-swap")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-tmp        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-tmp")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-guix-var        (mapped-device (source "/dev/DUMMY")
                                                                   (target "guix-var")
                                                                   (type   non-udev-lvm-device-mapping)))

(define %localmachine-mapped-device-house-home      (mapped-device (source "/dev/test")
                                                                   (target "house-home")
                                                                   (type   non-udev-lvm-device-mapping)))
\f

(define %localmachine-mapped-devices (list %localmachine-mapped-device-guix-root
                                           %localmachine-mapped-device-guix-boot
                                           %localmachine-mapped-device-guix-gnu
                                           %localmachine-mapped-device-guix-var
                                           %localmachine-mapped-device-guix-swap
                                           %localmachine-mapped-device-guix-tmp
                                           %localmachine-mapped-device-house-home))
\f

;;; guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
(define %localmachine-swap-devices      (list "/dev/mapper/guix-swap"))
\f

(define %localmachine-file-system-guix-root       (file-system (mount-point         "/")
                                                               (device              "/dev/mapper/guix-root")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               ;; (dependencies        %localmachine-mapped-devices)
                                                               ))

;; (define %localmachine-file-system-guix-swap       (file-system (mount-point         "/xyz")
;;                                                         (device              (string-append "/dev/mapper/guix-swap"))
;;                                                         (type                "ext4")
;;                                                         (check?              #f)
;;                                                         (mount?              #f)
;;                                                         (create-mount-point? #f)
;;                                                         (needed-for-boot?    #t)
;;                                                         (dependencies        %localmachine-mapped-devices)))

(define %localmachine-file-system-guix-boot       (file-system (mount-point         "/boot")
                                                               (device              "/dev/mapper/guix-boot")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            ;; %localmachine-mapped-devices
                                                                                            ))))

(define %localmachine-file-system-guix-gnu        (file-system (mount-point         "/gnu")
                                                               (device              "/dev/mapper/guix-gnu")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            ;; %localmachine-mapped-devices
                                                                                            ))))

(define %localmachine-file-system-guix-tmp        (file-system (mount-point         "/tmp")
                                                               (device              "/dev/mapper/guix-tmp")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            ;; %localmachine-mapped-devices
                                                                                            ))))

(define %localmachine-file-system-guix-var        (file-system (mount-point         "/var")
                                                               (device              "/dev/mapper/guix-var")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (dependencies        (append (list %localmachine-file-system-guix-root)
                                                                                            ;; %localmachine-mapped-devices
                                                                                            ))))

(define %localmachine-file-system-house-home      (file-system (mount-point         "/home")
                                                               (device              "/dev/mapper/house-home")
                                                               (type                "ext4")
                                                               (check?              #f)
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #f)
                                                               (dependencies        (append (list ;; %localmachine-file-system-guix-root
                                                                                             )
                                                                                            ;; %localmachine-mapped-devices
                                                                                            ))))
\f

(define %localmachine-file-system-boot-efi        (file-system (mount-point         "/boot/efi")
                                                               (device              "/dev/sda1")
                                                               (mount?              #t)
                                                               (create-mount-point? #t)
                                                               (needed-for-boot?    #t)
                                                               (type                "vfat")
                                                               ;; (dependencies        (append (list %localmachine-file-system-guix-boot
                                                               ;;                                    %localmachine-file-system-guix-root)
                                                               ;;                              %localmachine-mapped-devices))
                                                               ))
\f

(define %localmachine-lvm-mount-home-file-systems         (list %localmachine-file-system-house-home))
\f

(define %localmachine-mount-lvm-system-file-systems       (list %localmachine-file-system-guix-root
                                                                ;; %localmachine-file-system-guix-swap
                                                                %localmachine-file-system-guix-boot
                                                                %localmachine-file-system-guix-gnu
                                                                %localmachine-file-system-guix-tmp
                                                                %localmachine-file-system-guix-var))
\f
(define %localmachine-lvm-system-file-systems             (append %localmachine-mount-lvm-system-file-systems
                                                                  %localmachine-lvm-mount-home-file-systems))
\f

(define %localmachine-lvm-file-systems                    (append %localmachine-lvm-system-file-systems))
\f

(define %localmachine-other-file-systems                  (list %localmachine-file-system-boot-efi))
\f



(define %localmachine-file-systems                        (append %localmachine-lvm-file-systems
                                                                  %localmachine-other-file-systems
                                                                  %base-file-systems))
\f

;; packages
(use-modules (gnu packages glib))

(define %localmachine-other-packages (list "polkit"
                                           "polkit-gnome"
                                           "autorandr"
                                           "xmodmap"
                                           "hplip"
                                           "simple-scan"
                                           "xsane"
                                           "sane-backends"
                                           "sane-backends-minimal"
                                           "glib-networking"
                                           "xf86-input-evdev"))

(define %localmachine-system-selected-package-names (list "glibc-utf8-locales"
                                                          "gdm"
                                                          "gpm"
                                                          "slock" ; need suid
                                                          "zsh"
                                                          "stumpwm"
                                                          "sbcl-stumpwm-cpu" "sbcl-stumpwm-mem" "sbcl-stumpwm-numpad-layouts" "sbcl-stumpwm-screenshot" "sbcl-stumpwm-winner-mode"
                                                          "guile-wm"
                                                          "windowmaker"
                                                          ;; "findutils"
                                                          "idutils"
						                                              "dovecot"
                                                          "xinput"
                                                          "ibus"
                                                          "m17n-lib"
                                                          "m17n-db"
                                                          ;; "twm"
                                                          ;; "herbstluftwm"
                                                          "ecryptfs-utils"))
\f

(define %localmachine-package-names-for-installation
  (append %localmachine-other-packages
          %localmachine-system-selected-package-names))

(define %localmachine-system-desktop-packages
  ;; (list lvm2
  ;;       ;; for HTTPS access
  ;;       nss-certs
  ;;       ;; for user mounts
  ;;       gvfs)
  '())

(define %localmachine-system-selected-packages
  (map specification->package
       %localmachine-package-names-for-installation))

(define %localmachine-system-packages (append %localmachine-system-desktop-packages
                                              %localmachine-system-selected-packages))

(define %localmachine-reinit-packages (append %localmachine-system-packages
                                              %base-packages))
\f

(define %localmachine-packages %localmachine-reinit-packages)
\f

(define %localmachine-keyboard-layout (keyboard-layout "us" "altgr-intl"))
\f

(define %localmachine-grub-ubuntu-menuentries %local-grub-ubuntu-menuentries)

(define %localmachine-efi-bootloader
  (bootloader-configuration (bootloader      grub-efi-bootloader)
                            (target          "/boot/efi")
                            (keyboard-layout %localmachine-keyboard-layout)
                            (menu-entries    %localmachine-grub-ubuntu-menuentries)))
\f

(define %localmachine-metal-initrd base-initrd)
\f

(define %localmachine-simple-groups (list (user-group (name %localmachine-account-group-name)
                                                      (id   %localmachine-account-group-gid))))

(define %localmachine-groups        (append %localmachine-simple-groups
                                            %base-groups))
\f

(define %localmachine-simple-users  (list (user-account (uid                    %localmachine-account-uid)
                                                        (name                   %localmachine-account-user-name)
                                                        (comment                %localmachine-account-comment)
                                                        (group                  %localmachine-account-group-name)
                                                        (supplementary-groups   %localmachine-account-supplementry-groups)
                                                        (create-home-directory? %localmachine-account-create-home-directory))))

(define %localmachine-users        (append %localmachine-simple-users
                                           %base-user-accounts))
\f

(define %localmachine-services       %base-services)
\f

(define %localmachine-firmware %base-firmware)
\f

(define %localmachine-locale "en_US.utf8")

(define %localmachine-locate-names (list "en_US"
                                         "hi_IN"
                                         "ur_PK"
                                         "fa_IR"
                                         "ar_SA"))

(define %localmachine-all-locale-definitions  (map (lambda (locale)
                                                     (locale-definition (source locale)
                                                                        (name   (string-append locale "." "utf8"))))
                                                   %localmachine-locate-names))

(define %localmachine-locale-definitions      (append %localmachine-all-locale-definitions
                                                      %default-locale-definitions))
\f

(define %localmachine-timezone  "Asia/Kolkata")
\f

(define %localmachine-bootloader %localmachine-efi-bootloader)
(define %localmachine-initrd     %localmachine-metal-initrd)
\f

;; (define %localmachine-setuid-programs %setuid-programs)

(define %localmachine-setuid-programs (cons* #~(string-append #$ecryptfs-utils "/sbin/mount.ecryptfs_private")
                                             %setuid-programs))
\f

(define %localmachine-kernel linux-libre)
\f

(operating-system
 (kernel              %localmachine-kernel)
 (kernel-arguments    '(" modprobe.blacklist=usbmouse,usbkbd --verbose nosplash debug"))
 (firmware            %localmachine-firmware)
 (initrd              %localmachine-initrd)
 (locale              %localmachine-locale)
 (locale-definitions  %localmachine-locale-definitions)
 (timezone            %localmachine-timezone)
 (keyboard-layout     %localmachine-keyboard-layout)
 (host-name           %localmachine-host-name)
 (setuid-programs     %localmachine-setuid-programs)
 (mapped-devices      %localmachine-mapped-devices)
 (users               %localmachine-users)
 (groups              %localmachine-groups)
 (file-systems        %localmachine-file-systems)
 (swap-devices        %localmachine-swap-devices)
 (bootloader          %localmachine-bootloader)
 (packages            %localmachine-packages)
 (services            %localmachine-services)
 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss))
\f

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-03-02 10:42             ` Shyam Saran
@ 2021-03-02 16:12               ` Shyam Saran
  2021-03-04  7:22                 ` Shyam Saran
  0 siblings, 1 reply; 10+ messages in thread
From: Shyam Saran @ 2021-03-02 16:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555

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

Hi

after reconfigure

building
/gnu/store/qnskr1r67lp92bgy136hqvm7r96s3qrd-upgrade-shepherd-services.scm.drv...
guix system: warning: exception caught while executing 'start' on service
'swap-/dev/mapper/guix-swap':
In procedure swapon: "/dev/mapper/guix-swap": Invalid argument
guix system: warning: some services could not be upgraded
hint: To allow changes to all the system services to take effect, you will
need to reboot.

after 2 reboots also

$ cat /proc/swaps

   27s
Filename Type Size Used Priority
$ swapon -s
$ sudo swapon -s
$ swapon --all --verbose
$ sudo swapon --all --verbose
$




I do not see swap is getting enabled.


Thanks



On Tue, 2 Mar 2021 at 16:12, Shyam Saran <syamsaran12345@gmail.com> wrote:

> Sorry
>
> I had forgot to remove
>
> dependency from /boot/efi
>
>
> So it was causing this error
>
> attached the file, reconfiguring the whole system
> hoping it must work
>
>
>
> Thanks very much for all the help :)
>
>
>
>
> On Tue, 2 Mar 2021 at 16:04, Shyam Saran <syamsaran12345@gmail.com> wrote:
>
>> As mentioned I had removed all dependency for root "/" fs
>>
>> but result is same
>>
>> $ guix  system   build ~/tmp/config.scm
>> guix system: warning: the following groups appear more than once: users
>> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>> 'device-mapping-guix-swap', which is not provided by any service
>>
>> Then again removed all dependencies from all fs /var /gnu /tmp etc
>> But the result is the same.
>>
>> $ guix  system   build ~/tmp/config.scm
>> guix system: warning: the following groups appear more than once: users
>> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>> 'device-mapping-guix-swap', which is not provided by any service
>>
>>
>> Thanks
>>
>>
>> On Mon, 1 Mar 2021 at 14:56, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>>> Hi Shyam,
>>>
>>> Shyam Saran <syamsaran12345@gmail.com> skribis:
>>>
>>> > Result of application of system build command
>>> >
>>> > $ guix  system   build ~/tmp/config.scm
>>> >
>>> >                2s
>>> > guix system: warning: the following groups appear more than once: users
>>> > guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>>> > 'device-mapping-guix-swap', which is not provided by any service
>>>
>>> The problem here is that you had:
>>>
>>>   (file-system
>>>     (mount-point "/")
>>>     ;; …
>>>     (needed-for-boot? #t)
>>>     (dependencies %localmachine-mapped-devices))
>>>
>>> All the needed-for-boot file systems had all the mapped devices in
>>> ‘dependencies’.  Thus, no ‘device-mapping-guix-swap’ Shepherd service
>>> was created, because that device mapping was needed at boot.
>>>
>>> The solution is to remove the ‘dependencies’ field for all your file
>>> systems.  Since they have /dev/mapper/… as their ’device’, you don’t
>>> need ‘dependencies’: it’s automatically inferred.  If, after this
>>> change, you run:
>>>
>>>   guix system shepherd-graph /tmp/config.scm| xdot -
>>>
>>> you can see that the ‘swap-/dev/mapper/guix-swap’ service depends on
>>> ‘device-mapping-guix-swap’.
>>>
>>> HTH!
>>>
>>> Ludo’.
>>>
>>

[-- Attachment #2: Type: text/html, Size: 5111 bytes --]

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

* bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service
  2021-03-02 16:12               ` Shyam Saran
@ 2021-03-04  7:22                 ` Shyam Saran
  0 siblings, 0 replies; 10+ messages in thread
From: Shyam Saran @ 2021-03-04  7:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46555

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

Sorry again, it is excellently working

In boot I had noticed

enabling swap DEVICE
swap signature is missing on DEVICE

than understood I had not marked it as swap

$ cat /proc/swaps; sudo swapon --all --verbose ; sudo swapon -s ; free -h
Filename Type Size Used Priority
/dev/mapper/guix-swap            partition 1048572 0 -2
Filename Type Size Used Priority
/dev/mapper/guix-swap           partition 1048572 0 -2
             total        used        free      shared  buff/cache
available
Mem:           31Gi       1.6Gi        28Gi       1.0Mi       1.6Gi
 29Gi
Swap:         1.0Gi          0B       1.0Gi



Thanks very much for great help and GNU, Guix, and all the stuff.

Thanks again


Shyam



On Tue, 2 Mar 2021 at 21:42, Shyam Saran <syamsaran12345@gmail.com> wrote:

> Hi
>
> after reconfigure
>
> building
> /gnu/store/qnskr1r67lp92bgy136hqvm7r96s3qrd-upgrade-shepherd-services.scm.drv...
> guix system: warning: exception caught while executing 'start' on service
> 'swap-/dev/mapper/guix-swap':
> In procedure swapon: "/dev/mapper/guix-swap": Invalid argument
> guix system: warning: some services could not be upgraded
> hint: To allow changes to all the system services to take effect, you will
> need to reboot.
>
> after 2 reboots also
>
> $ cat /proc/swaps
>
>      27s
> Filename Type Size Used Priority
> $ swapon -s
> $ sudo swapon -s
> $ swapon --all --verbose
> $ sudo swapon --all --verbose
> $
>
>
>
>
> I do not see swap is getting enabled.
>
>
> Thanks
>
>
>
> On Tue, 2 Mar 2021 at 16:12, Shyam Saran <syamsaran12345@gmail.com> wrote:
>
>> Sorry
>>
>> I had forgot to remove
>>
>> dependency from /boot/efi
>>
>>
>> So it was causing this error
>>
>> attached the file, reconfiguring the whole system
>> hoping it must work
>>
>>
>>
>> Thanks very much for all the help :)
>>
>>
>>
>>
>> On Tue, 2 Mar 2021 at 16:04, Shyam Saran <syamsaran12345@gmail.com>
>> wrote:
>>
>>> As mentioned I had removed all dependency for root "/" fs
>>>
>>> but result is same
>>>
>>> $ guix  system   build ~/tmp/config.scm
>>> guix system: warning: the following groups appear more than once: users
>>> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>>> 'device-mapping-guix-swap', which is not provided by any service
>>>
>>> Then again removed all dependencies from all fs /var /gnu /tmp etc
>>> But the result is the same.
>>>
>>> $ guix  system   build ~/tmp/config.scm
>>> guix system: warning: the following groups appear more than once: users
>>> guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>>> 'device-mapping-guix-swap', which is not provided by any service
>>>
>>>
>>> Thanks
>>>
>>>
>>> On Mon, 1 Mar 2021 at 14:56, Ludovic Courtès <ludo@gnu.org> wrote:
>>>
>>>> Hi Shyam,
>>>>
>>>> Shyam Saran <syamsaran12345@gmail.com> skribis:
>>>>
>>>> > Result of application of system build command
>>>> >
>>>> > $ guix  system   build ~/tmp/config.scm
>>>> >
>>>> >                2s
>>>> > guix system: warning: the following groups appear more than once:
>>>> users
>>>> > guix system: error: service 'swap-/dev/mapper/guix-swap' requires
>>>> > 'device-mapping-guix-swap', which is not provided by any service
>>>>
>>>> The problem here is that you had:
>>>>
>>>>   (file-system
>>>>     (mount-point "/")
>>>>     ;; …
>>>>     (needed-for-boot? #t)
>>>>     (dependencies %localmachine-mapped-devices))
>>>>
>>>> All the needed-for-boot file systems had all the mapped devices in
>>>> ‘dependencies’.  Thus, no ‘device-mapping-guix-swap’ Shepherd service
>>>> was created, because that device mapping was needed at boot.
>>>>
>>>> The solution is to remove the ‘dependencies’ field for all your file
>>>> systems.  Since they have /dev/mapper/… as their ’device’, you don’t
>>>> need ‘dependencies’: it’s automatically inferred.  If, after this
>>>> change, you run:
>>>>
>>>>   guix system shepherd-graph /tmp/config.scm| xdot -
>>>>
>>>> you can see that the ‘swap-/dev/mapper/guix-swap’ service depends on
>>>> ‘device-mapping-guix-swap’.
>>>>
>>>> HTH!
>>>>
>>>> Ludo’.
>>>>
>>>

[-- Attachment #2: Type: text/html, Size: 6569 bytes --]

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

end of thread, other threads:[~2021-03-04  7:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 10:11 bug#46555: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service Shyam Saran
2021-02-22  9:19 ` Ludovic Courtès
2021-02-23 15:23   ` Shyam Saran
2021-02-25 13:19     ` Ludovic Courtès
2021-02-26  8:08       ` Shyam Saran
2021-03-01  9:26         ` Ludovic Courtès
2021-03-02 10:34           ` Shyam Saran
2021-03-02 10:42             ` Shyam Saran
2021-03-02 16:12               ` Shyam Saran
2021-03-04  7:22                 ` Shyam Saran

all messages for Guix-related lists mirrored at yhetil.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix

Example config snippet for mirrors.


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git