all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
@ 2018-07-30 15:25 Brendan Tildesley
  2018-07-30 16:55 ` Danny Milosavljevic
  2018-07-31 20:38 ` Danny Milosavljevic
  0 siblings, 2 replies; 9+ messages in thread
From: Brendan Tildesley @ 2018-07-30 15:25 UTC (permalink / raw)
  To: 32313

I have a second btrfs drive that I normally manually mount as /mnt/1tb.
I decided to add it to my system config and it when I reconfigure it
mounts the drive correctly, but when I reboot I get the error:

WARNING: failed to open /dev/btrfs-control, skipping device
registration: no such file or directory

ERROR: there are 1 errors while registering devices

File system check on /dev/sda1 failed; spawning Bourne-like REPL

Here is my system config:

(use-modules (gnu)
             (gnu system nss)
             (guix packages))
(use-service-modules desktop
                     ssh
                     admin
                     mcron
                     xorg
                     virtualization
                     cups
                     sddm
                     networking
                     ;; avahi
                     ;; dbus
                     )
(use-package-modules certs
                     gnome
                     bootloaders
                     cups
                     ;; libusb
                     ;; networking
                     )

(operating-system
  (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))
  (host-name "ui")
  (timezone "Australia/Hobart")
  (locale "en_AU.utf8")

  ;; (locale-definitions '("zh_TW.utf8"
  ;;                       "zh_CN.utf8"
  ;;                       "ja_JP.utf8"
  ;;                       "en_DK.UTF-8"
  ;;                       ))

  ;; Assuming /dev/sdX is the target hard disk, and "my-root"
  ;; is the label of the target root file system.
  (bootloader
   (grub-configuration
    ;;(device "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_1TB_S2PWNX0J204086P")
    (target "/dev/sdc")))

 

  (users
   (cons*
    (user-account
     (name "b")
     (comment "ore")
     (group "users")
     (supplementary-groups
      '("wheel"   ; To use sudo
        "netdev"
        "audio"   ; To play sound
        "video" ; To access the webcam
        "kvm"
        "disk"
        ;; lp lpadmin, seen in other's configs
        ))
     (home-directory "/home/b"))

    (user-account
     (name "b2")
     (comment "ore too")
     (group "users")
     (supplementary-groups
      '("wheel"   ; To use sudo
        "netdev"
        "audio"   ; To play sound
        "video")) ; To access the webcam
     (home-directory "/home/b2"))
    %base-user-accounts))

  ;;System-wide packages.
  (packages
   (cons
    (specification->package+output "glib" "bin")
    (append
     (map specification->package
          '( "nss-certs"         ; For HTTPS access
             "gvfs"              ; For user mounts
             ;"dconf"             ; NOT SURE IF THIS IS ALSO NEEDED
             "glibc-locales"     ; Locales

             "ecryptfs-utils"
             "exfat-utils"
             "ntfs-3g"
             "btrfs-progs"

             "setxkbmap" ; keyboard mappings
             "xmodmap"

             "i3-wm" "i3status";; "dmenu" ; tiling wm
             "dbus" "pcmanfm"
             ;; We cannot rsync over ssh unless rsync is in the system
profile
             "rsync"))
     %base-packages)))

  (services
   (cons*
    (console-keymap-service "en-latin9")
   
    ;; OpenSSH
    (service openssh-service-type
             (openssh-configuration
              (port-number 22)))
    ;; Probably does something useful
    (service rottlog-service-type)

    (service tor-service-type)
    ;; from the manual, this apparently this lets us emulate building on arm
    (service qemu-binfmt-service-type
             (qemu-binfmt-configuration
              (platforms (lookup-qemu-platforms "arm"))
              (guix-support? #t)))

    ;; Printer stuff
    (service cups-service-type
             (cups-configuration
              (web-interface? #t)
              (extensions
               (list cups-filters hplip))))

    ;; Colemak settings for Xorg that are valid for the login manager
    (let ((colemak
           "Section \"InputClass\"
        Identifier \"evdev keyboard catchall\"
        Driver \"evdev\"
        MatchIsKeyboard \"on\"
        Option \"xkb_layout\" \"us\"
        Option \"xkb_variant\" \"colemak\"
EndSection"))
     
      (modify-services %desktop-services
        ;; (remove-services
        ;;  (list
        ;;   ;ntp-service-type
        ;;   screen-locker-service-type)
        ;;  %desktop-services)

        ;; Enable Colemak layout in Slim login
        (slim-service-type config =>
                           (slim-configuration
                            (inherit config)
                            (startx (xorg-start-command
                                     #:configuration-file
                                     (xorg-configuration-file
                                      #:extra-config
                                      (list colemak))))))))))

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

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-30 15:25 bug#32313: Failed to boot after reconfiguring with a btrfs drive Brendan Tildesley
@ 2018-07-30 16:55 ` Danny Milosavljevic
  2018-07-31  2:04   ` Brendan Tildesley
  2018-07-31 20:38 ` Danny Milosavljevic
  1 sibling, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-07-30 16:55 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 32313

Hi,

hmm, where's the "file-systems" form in your system config?

The first important part is whether your file-system entry is needed-for-boot? or not.

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-30 16:55 ` Danny Milosavljevic
@ 2018-07-31  2:04   ` Brendan Tildesley
  2018-07-31 20:40     ` Danny Milosavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Brendan Tildesley @ 2018-07-31  2:04 UTC (permalink / raw)
  To: 32313

On 07/31/18 02:55, Danny Milosavljevic wrote:
> Hi,
>
> hmm, where's the "file-systems" form in your system config?
>
> The first important part is whether your file-system entry is needed-for-boot? or not.
>
Sorry, I forgot to un-kill it before copying the whole definition. It's here

(file-systems
   (cons*
    (file-system
      (device (file-system-label "1tb"))
      (mount-point "/mnt/1tb/")
      (type "btrfs"))
    (file-system
      ;;(device
"/dev/disk/by-id/ata-Samsung_SSD_850_EVO_1TB_S2PWNX0J204086P-part1")
      (device (file-system-label "1ssd"))
      (mount-point "/")
      (type "ext4"))
    %base-file-systems))

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-30 15:25 bug#32313: Failed to boot after reconfiguring with a btrfs drive Brendan Tildesley
  2018-07-30 16:55 ` Danny Milosavljevic
@ 2018-07-31 20:38 ` Danny Milosavljevic
  2018-07-31 21:06   ` Danny Milosavljevic
  2018-08-01  1:58   ` Brendan Tildesley
  1 sibling, 2 replies; 9+ messages in thread
From: Danny Milosavljevic @ 2018-07-31 20:38 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 32313

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

On Tue, 31 Jul 2018 01:25:22 +1000
Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:

> I have a second btrfs drive that I normally manually mount as /mnt/1tb.
> I decided to add it to my system config and it when I reconfigure it
> mounts the drive correctly, but when I reboot I get the error:
> 
> WARNING: failed to open /dev/btrfs-control, skipping device
> registration: no such file or directory
> 
> ERROR: there are 1 errors while registering devices
> 
> File system check on /dev/sda1 failed; spawning Bourne-like REPL

Please write ,bt and paste the output here


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-31  2:04   ` Brendan Tildesley
@ 2018-07-31 20:40     ` Danny Milosavljevic
  2018-07-31 21:01       ` Danny Milosavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-07-31 20:40 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 32313

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

Hi,

On Tue, 31 Jul 2018 12:04:54 +1000
Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:

> On 07/31/18 02:55, Danny Milosavljevic wrote:
> > Hi,
> >
> > hmm, where's the "file-systems" form in your system config?
> >
> > The first important part is whether your file-system entry is needed-for-boot? or not.
> >  
> Sorry, I forgot to un-kill it before copying the whole definition. It's here
> 
> (file-systems
>    (cons*
>     (file-system
>       (device (file-system-label "1tb"))
>       (mount-point "/mnt/1tb/")
>       (type "btrfs"))
>     (file-system
>       ;;(device
> "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_1TB_S2PWNX0J204086P-part1")
>       (device (file-system-label "1ssd"))
>       (mount-point "/")
>       (type "ext4"))
>     %base-file-systems))

So it defaults to needed-for-boot? #f.

I think this is a real bug.

There is code in Guix to create an initrd.  It will also create a correct
modules.devname and also create a linux-boot module which will run on
system boot and set up some files in /dev (reading from modules.devname),
among those btrfs-control, IF THERE'S A btrfs FILESYSTEM WITH
needed-for-boot? #t .

Here there isn't.  So the initrd won't create /dev/btrfs-control .

But when needed-for-boot? is #f that means the file system will be mounted
somewhen later (not in the initrd) when the root fs and store is already there.

That means there should be a shepherd service or activation part that
parses linux-libre*/modules.devname and creates the still-missing /dev entries.

Where is that part?  It should be either a dependency of the part that mounts
the filesystem or just be right before it.  So we need a backtrace...

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-31 20:40     ` Danny Milosavljevic
@ 2018-07-31 21:01       ` Danny Milosavljevic
  0 siblings, 0 replies; 9+ messages in thread
From: Danny Milosavljevic @ 2018-07-31 21:01 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 32313

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

Probably gnu/services/base.scm, file-system-shepherd-service is the one to mount non-needed-for-boot file systems.

udev-shepherd-service does the /dev devname creation.

So file-system-shepherd-service should require the udev service.

It doesn't.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-31 20:38 ` Danny Milosavljevic
@ 2018-07-31 21:06   ` Danny Milosavljevic
  2018-08-01 15:14     ` Brendan Tildesley
  2018-08-01  1:58   ` Brendan Tildesley
  1 sibling, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-07-31 21:06 UTC (permalink / raw)
  To: Brendan Tildesley; +Cc: 32313

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

Probable fix:

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 9fad9af99..921914ccd 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -419,7 +419,7 @@ FILE-SYSTEM."
                                  '((gnu build file-systems)))
            (shepherd-service
             (provision (list (file-system->shepherd-service-name file-system)))
-            (requirement `(root-file-system
+            (requirement `(root-file-system udev
                            ,@(map dependency->shepherd-service-name dependencies)))
             (documentation "Check, mount, and unmount the given file system.")
             (start #~(lambda args

To test, invoke

  ./pre-inst-env guix system reconfigure /etc/config.scm


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-31 20:38 ` Danny Milosavljevic
  2018-07-31 21:06   ` Danny Milosavljevic
@ 2018-08-01  1:58   ` Brendan Tildesley
  1 sibling, 0 replies; 9+ messages in thread
From: Brendan Tildesley @ 2018-08-01  1:58 UTC (permalink / raw)
  To: 32313

On 08/01/18 06:38, Danny Milosavljevic wrote:
> On Tue, 31 Jul 2018 01:25:22 +1000
> Brendan Tildesley <brendan.tildesley@openmailbox.org> wrote:
>
>> I have a second btrfs drive that I normally manually mount as /mnt/1tb.
>> I decided to add it to my system config and it when I reconfigure it
>> mounts the drive correctly, but when I reboot I get the error:
>>
>> WARNING: failed to open /dev/btrfs-control, skipping device
>> registration: no such file or directory
>>
>> ERROR: there are 1 errors while registering devices
>>
>> File system check on /dev/sda1 failed; spawning Bourne-like REPL
> Please write ,bt and paste the output here
>
,bt shows that there is "nothing to debug"

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

* bug#32313: Failed to boot after reconfiguring with a btrfs drive.
  2018-07-31 21:06   ` Danny Milosavljevic
@ 2018-08-01 15:14     ` Brendan Tildesley
  0 siblings, 0 replies; 9+ messages in thread
From: Brendan Tildesley @ 2018-08-01 15:14 UTC (permalink / raw)
  Cc: 32313

On 08/01/18 07:06, Danny Milosavljevic wrote:
> Probable fix:
>
> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index 9fad9af99..921914ccd 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -419,7 +419,7 @@ FILE-SYSTEM."
>                                   '((gnu build file-systems)))
>             (shepherd-service
>              (provision (list (file-system->shepherd-service-name file-system)))
> -            (requirement `(root-file-system
> +            (requirement `(root-file-system udev
>                             ,@(map dependency->shepherd-service-name dependencies)))
>              (documentation "Check, mount, and unmount the given file system.")
>              (start #~(lambda args
>
> To test, invoke
>
>   ./pre-inst-env guix system reconfigure /etc/config.scm
>
You're a genius! This appears to have fixed the problem, Although it
increases my boot time by 5 seconds or so. I guess shepherd doesn't have
the ability to load such things in parallel yet.

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

end of thread, other threads:[~2018-08-01 15:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 15:25 bug#32313: Failed to boot after reconfiguring with a btrfs drive Brendan Tildesley
2018-07-30 16:55 ` Danny Milosavljevic
2018-07-31  2:04   ` Brendan Tildesley
2018-07-31 20:40     ` Danny Milosavljevic
2018-07-31 21:01       ` Danny Milosavljevic
2018-07-31 20:38 ` Danny Milosavljevic
2018-07-31 21:06   ` Danny Milosavljevic
2018-08-01 15:14     ` Brendan Tildesley
2018-08-01  1:58   ` Brendan Tildesley

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.