Hello guys,

so I started looking into this a bit (not promising any results though),
and I can pretty confidently say that there is indeed an issue in the
unmount.

I have created a VM system, tried rebooting a few times and it was fine,
however then I tried reconfiguring, and for that run I got an error upon
reboot. Not only that, I can't boot it anymore :) the filesystem got
corrupted in a way that prevents boots. Welp.

I can't really say at current moment what is causing this, but the
problem is that the root device is busy so it can't be unmounted.
I have a hypothesis given the log I see: that the root filesystem
is being unmounted first rather than last like it should be.
Could the reconfigure throw shepherd off? I am also CCing Ludovic,
I hope he won't mind.

I would like to also point out an e-mail in the
guix-devel sent recently that someone got a timer service running after
reconfigure, but not after reboot, where after reboot the timer module
is not imported by default unless put to service's modules, but after
reconfigure it works, so this leaves me with yet another point for the
impression that shepherd behaves differently on reboot as opposed to
reconfigure reload.

I will try digging more, but I am not that knowledgeable about
shepherd yet, so it will take longer time.

I am attaching both log (starting after reboot command)
and the configuration used for the vm.

[ 2532.130331] shepherd[1]: Terminating system log service.
[ 2532.138540] shepherd[1]: Service system-log stopped.
[ 2532.145581] shepherd[1]: Service system-log is now stopped.
[ 2532.149364] shepherd[1]: Closing 4 system log ports.
[ 2532.151578] shepherd[1]: Service term-console is not running.
[ 2532.154795] shepherd[1]: Service term-tty1 is not running.
[ 2532.159702] shepherd[1]: Service term-tty2 is not running.
[ 2532.165720] shepherd[1]: Service term-tty3 is not running.
[ 2532.174412] shepherd[1]: Service term-tty4 is not running.
[ 2532.176655] shepherd[1]: Service term-tty5 is not running.
[ 2532.179148] shepherd[1]: Service term-tty6 is not running.
[ 2532.182485] shepherd[1]: Stopping service loopback...
[ 2532.194841] shepherd[1]: Registering new logger for loopback.
[ 2532.245307] shepherd[1]: Service loopback might have failed to stop.
[ 2532.247610] shepherd[1]: Service loopback is now stopped.
[ 2532.257829] shepherd[1]: Stopping service guix-daemon...
[ 2532.262768] shepherd[1]: Service guix-daemon stopped.
[ 2532.269632] shepherd[1]: Service guix-daemon is now stopped.
[ 2532.274953] shepherd[1]: Stopping service timer...
[ 2532.277806] shepherd[1]: Service timer stopped.
[ 2532.279442] shepherd[1]: Service timer is now stopped.
[ 2532.283475] shepherd[1]: Stopping service transient...
[ 2532.287844] shepherd[1]: Service transient stopped.
[ 2532.289999] shepherd[1]: Service transient is now stopped.
[ 2532.293995] shepherd[1]: Stopping service log-cleanup...
[ 2532.297223] shepherd[1]: Terminating timer 'log-cleanup' with 0 processes 
running.
[ 2532.300247] shepherd[1]: Service log-cleanup stopped.
[ 2532.301978] shepherd[1]: Service log-cleanup is now stopped.
[ 2532.306241] shepherd[1]: Stopping service user-processes...
[ 2532.311358] shepherd[1]: sending all processes the TERM signal
[ 2532.315239] shepherd[1]: Service udev has been disabled.
[ 2536.356551] shepherd[1]: all processes have been terminated
[ 2536.365466] shepherd[1]: Service user-processes stopped.
[ 2536.374333] shepherd[1]: Service user-processes is now stopped.
[ 2536.378815] shepherd[1]: Stopping service urandom-seed...
[ 2536.386166] shepherd[1]: Service urandom-seed might have failed to stop.
[ 2536.389012] shepherd[1]: Service urandom-seed is now stopped.
[ 2536.391950] shepherd[1]: Service guix-daemon is not running.
[ 2536.399246] shepherd[1]: Service nscd is not running.
[ 2536.402536] shepherd[1]: Stopping service log-rotation...
[ 2536.408077] shepherd[1]: Terminating timer 'log-rotation' with 0 processes 
running.
[ 2536.412356] shepherd[1]: Service log-rotation stopped.
[ 2536.415228] shepherd[1]: Service log-rotation is now stopped.
[ 2536.418957] shepherd[1]: Service timer is not running.
[ 2536.426109] shepherd[1]: Service transient is not running.
[ 2536.429836] shepherd[1]: Service log-cleanup is not running.
[ 2536.436242] shepherd[1]: Service udev is not running.
[ 2536.439446] shepherd[1]: Service pam is not running.
[ 2536.444939] shepherd[1]: Service user-processes is not running.
[ 2536.449993] shepherd[1]: Stopping service file-systems...
[ 2536.454141] shepherd[1]: Service file-systems stopped.
[ 2536.457264] shepherd[1]: Service file-systems is now stopped.
[ 2536.462044] shepherd[1]: Stopping service file-system-/var/lib/gdm...
[ 2536.469161] shepherd[1]: Service file-system-/var/lib/gdm stopped.
[ 2536.477353] shepherd[1]: Service file-system-/var/lib/gdm is now stopped.
[ 2536.482038] shepherd[1]: Stopping service 
file-system-/var/cache/fontconfig...
[ 2536.489787] shepherd[1]: Service file-system-/var/cache/fontconfig stopped.
[ 2536.493564] shepherd[1]: Service file-system-/var/cache/fontconfig is now 
stopped.
[ 2536.502552] shepherd[1]: Stopping service 
file-system-/sys/fs/cgroup/elogind...
[ 2536.506804] shepherd[1]: Service file-system-/sys/fs/cgroup/elogind stopped.
[ 2536.512288] shepherd[1]: Service file-system-/sys/fs/cgroup/elogind is now 
stopped.
[ 2536.525624] shepherd[1]: Stopping service file-system-/sys/fs/cgroup...
[ 2536.529952] shepherd[1]: Service file-system-/sys/fs/cgroup stopped.
[ 2536.533503] shepherd[1]: Service file-system-/sys/fs/cgroup is now stopped.
[ 2536.538327] shepherd[1]: Stopping service file-system-/run/user...
[ 2536.546013] shepherd[1]: Ignoring error while stopping root-file-system: 
(system-error "umount" "~S: ~A" ("/run/user" "Device or resource busy") (16))
[ 2536.553455] shepherd[1]: Service file-system-/run/user might have failed to 
stop.
[ 2536.557119] shepherd[1]: Service file-system-/run/user is now stopped.
[ 2536.559216] shepherd[1]: Service file-system-/var/lib/gdm is not running.
[ 2536.565337] shepherd[1]: Service file-system-/var/cache/fontconfig is not 
running.
[ 2536.569070] shepherd[1]: Service file-system-/sys/fs/cgroup is not running.
[ 2536.572297] shepherd[1]: Service file-system-/sys/fs/cgroup/elogind is not 
running.
[ 2536.577438] shepherd[1]: Service file-system-/run/user is not running.
[ 2536.582456] shepherd[1]: Stopping service file-system-/run/systemd...
[ 2536.587808] shepherd[1]: Service file-system-/run/systemd stopped.
[ 2536.590608] shepherd[1]: Service file-system-/run/systemd is now stopped.
[ 2536.595648] shepherd[1]: Stopping service file-system-/gnu/store...
[ 2536.598653] shepherd[1]: Service file-system-/gnu/store stopped.
[ 2536.600495] shepherd[1]: Service file-system-/gnu/store is now stopped.
[ 2536.606699] shepherd[1]: Stopping service 
file-system-/sys/firmware/efi/efivars...
[ 2536.610370] shepherd[1]: Service file-system-/sys/firmware/efi/efivars 
stopped.
[ 2536.613303] shepherd[1]: Service file-system-/sys/firmware/efi/efivars is 
now stopped.
[ 2536.618469] shepherd[1]: Stopping service file-system-/dev/shm...
[ 2536.622009] shepherd[1]: Service file-system-/dev/shm stopped.
[ 2536.629474] shepherd[1]: Service file-system-/dev/shm is now stopped.
[ 2536.639038] shepherd[1]: Stopping service file-system-/sys/kernel/debug...
[ 2536.643328] shepherd[1]: Service file-system-/sys/kernel/debug stopped.
[ 2536.648765] shepherd[1]: Service file-system-/sys/kernel/debug is now 
stopped.
[ 2536.656363] shepherd[1]: Stopping service file-system-/dev/pts...
[ 2536.661035] shepherd[1]: Service file-system-/dev/pts stopped.
[ 2536.665900] shepherd[1]: Service file-system-/dev/pts is now stopped.
[ 2536.671988] shepherd[1]: Stopping service user-file-systems...
[ 2536.679312] shepherd[1]: unmounting '/run/user/0'...
[ 2536.682633] shepherd[1]: Service user-file-systems stopped.
[ 2536.689969] shepherd[1]: Service user-file-systems is now stopped.
[ 2536.695255] shepherd[1]: Service file-systems is not running.
[ 2536.702030] shepherd[1]: Service host-name is not running.
[ 2536.708718] ACPI: PM: Preparing to enter system sleep state S5
[ 2536.711132] reboot: Restarting system
[ 2536.712438] reboot: machine restart
;; -*- mode: scheme; -*-
;; This is an operating system configuration for a VM image.
;; Modify it as you see fit and instantiate the changes by running:
;;
;;   guix system reconfigure /etc/config.scm
;;

(use-modules (gnu) (guix) (srfi srfi-1))
(use-service-modules desktop mcron networking spice ssh xorg sddm)
(use-package-modules bootloaders fonts
                     package-management xdisorg xorg)

(define vm-image-motd (plain-file "motd" "
\x1b[1;37mThis is the GNU system.  Welcome!\x1b[0m

This instance of Guix is a template for virtualized environments.
You can reconfigure the whole system by adjusting /etc/config.scm
and running:

  guix system reconfigure /etc/config.scm

Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation.

\x1b[1;33mConsider setting a password for the 'root' and 'guest' \
accounts.\x1b[0m
"))

(operating-system
  (host-name "gnu")
  (timezone "Etc/UTC")
  (locale "en_US.utf8")
  (keyboard-layout (keyboard-layout "us" "altgr-intl"))

  ;; Label for the GRUB boot menu.
  (label (string-append "GNU Guix "
                        (or (getenv "GUIX_DISPLAYED_VERSION")
                            (package-version guix))))

  (firmware '())

  (kernel-arguments (list
                     "console=ttyS0"
                     "console=tty0"))

  ;; Below we assume /dev/vda is the VM's hard disk.
  ;; Adjust as needed.
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (targets '("/dev/vda"))
               (terminal-outputs '(console))))
  (file-systems (cons (file-system
                        (mount-point "/")
                        (device "/dev/vda1")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons (user-account
                (name "guest")
                (comment "GNU Guix Live")
                (password "")           ;no password
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video")))
               %base-user-accounts))

  ;; Our /etc/sudoers file.  Since 'guest' initially has an empty password,
  ;; allow for password-less sudo.
  (sudoers-file (plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=NOPASSWD: ALL\n"))

  (packages
   (append (list font-bitstream-vera
                 ;; Auto-started script providing SPICE dynamic resizing for
                 ;; Xfce (see:
                 ;; https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/142).
                 x-resize)
           %base-packages))

  (services
   (append (list

                 ;; Uncomment the line below to add an SSH server.
                 (service openssh-service-type)

                 ;; Add support for the SPICE protocol, which enables dynamic
                 ;; resizing of the guest screen resolution, clipboard
                 ;; integration with the host, etc.
                 (service spice-vdagent-service-type)

                 ;; Use the DHCP client service rather than NetworkManager.
                 (service dhcp-client-service-type))

           ;; Remove some services that don't make sense in a VM.
           (remove (lambda (service)
                     (let ((type (service-kind service)))
                       (or (memq type
                                 (list gdm-service-type
                                       sddm-service-type
                                       wpa-supplicant-service-type
                                       cups-pk-helper-service-type
                                       network-manager-service-type
                                       modem-manager-service-type))
                           (eq? 'network-manager-applet
                                (service-type-name type)))))
                   (modify-services %desktop-services
                     (login-service-type config =>
                                         (login-configuration
                                          (inherit config)
                                          (motd vm-image-motd)))

                     ;; Install and run the current Guix rather than an older
                     ;; snapshot.
                     (guix-service-type config =>
                                        (guix-configuration
                                         (inherit config)
                                         (guix (current-guix))))))))

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

Regards,
Rutherther

Reply via email to