all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Error: File System With Given Label Not Found
@ 2023-05-06 13:51 Marek Paśnikowski
  2023-05-07  3:30 ` Felix Lechner via
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Paśnikowski @ 2023-05-06 13:51 UTC (permalink / raw)
  To: help-guix

Dear All

I am refactoring a freshly-installed system configuration
in the ORG Literate Programming style.  After each change
I do guix system reconfigure to catch mistakes and errors.

While following https://guix.gnu.org/manual/en/html_node/File-Systems.html
I encountered a new system error, when I tried to use the file-system-label procedure:

#+begin_src scheme
  (type "vfat")
  (mount-point "/boot/efi")
  ;; (device (uuid "4E57-A066"
  ;;                  'fat32))
  (device (file-system-label "izumi-esp"))
#+end_src

$ LC_ALL=C sudo guix system reconfigure config.scm -v 4
Password: 
/home/marek/src/izumi/config.scm:22:28: error: file system with label 'izumi-esp' not found

$ ls /dev/disk/by-partlabel/
izumi-esp  izumi-swap  izumi-system

According to the manual, I should be able to do away
with the UUID identifier in my configuration.

Is this a regression or outdated manual?  Is there anything
I could do to be able to identify the partitions with labels?

===============================================================

Below is the full configuration file for those interested.

$ cat izumi.org
#+title: Configuration of the Izumi computer -*- mode: org -*-
#+author: Marek Paśnikowski
#+startup: content
#+property: header-args:scheme :noweb yes
#+property: header-args:scheme+ :noweb-prefix no

* Guix

https://guix.gnu.org/en/manual/en/html_node/index.html

** System Configuration

https://guix.gnu.org/manual/en/html_node/System-Configuration.html

*** Using the Configuration System

https://guix.gnu.org/manual/en/html_node/Using-the-Configuration-System.html

#+name: OPERATING-SYSTEM-DERIVATION
#+begin_src scheme :tangle config.scm
  (use-modules (gnu))

  (use-package-modules certs)

  (use-service-modules cups
                       desktop
                       networking
                       ssh
                       xorg)

  (operating-system <<OS-RECORD>>)
#+end_src

*** operating-system Reference

https://guix.gnu.org/manual/en/html_node/operating_002dsystem-Reference.html

#+name: OS-RECORD
#+begin_src scheme
  (kernel-arguments (append %default-kernel-arguments
                            (list "nomodeset")))
  (bootloader (bootloader-configuration <<BOOTLOADER-CONFIGURATION-RECORD>>))
  (keyboard-layout <<MAIN-KEYBOARD-LAYOUT-RECORD>>)
  (host-name "izumi")
  (mapped-devices (list (mapped-device <<ENCRYPTED-STORAGE-RECORD>>)))
  (file-systems (append %base-file-systems
                        (list (file-system <<EFI-PARTITION-RECORD>>)
                              (file-system <<SYSTEM-PARTITION-RECORD>>))))
  (swap-devices (list (swap-space <<SWAP-PARTITION-RECORD>>)))
  (users (append %base-user-accounts
                 (list (user-account <<USER-MAREK-RECORD>>))))
  (packages (append %base-packages
                    (list nss-certs)))
  (timezone "Europe/Warsaw")
  (locale <<LOCALE-STRING>>)
  (services (append %base-services
                    (list (service <<NETWORK-MANAGER-SERVICE-OBJECT>>)
                          (service <<NTP-SERVICE-OBJECT>>)
                          (service <<OPENSSH-SERVICE-OBJECT>>)
                          (service <<WPA-SUPPLICANT-SERVICE-OBJECT>>))))
#+end_src

*** file-systems

https://guix.gnu.org/manual/en/html_node/File-Systems.html

#+name: EFI-PARTITION-RECORD
#+begin_src scheme
  (type "vfat")
  (mount-point "/boot/efi")
  ;; (device (uuid "4E57-A066"
  ;;                  'fat32))
  (device (file-system-label "izumi-esp"))
#+end_src

#+name: SYSTEM-PARTITION-RECORD
#+begin_src scheme
  (type "xfs")
  (mount-point "/")
  (device "/dev/mapper/izumi")
  (dependencies mapped-devices)
#+end_src

*** mapped-devices

#+name: ENCRYPTED-STORAGE-RECORD
#+begin_src scheme
  (source (uuid "b06171fb-beb4-46b1-bac6-aa65675d240a"))
  (target "izumi")
  (type luks-device-mapping)
#+end_src

*** swap-devices

#+name: SWAP-PARTITION-RECORD
#+begin_src scheme
  (target (uuid "5fe1a209-6ff9-4586-a61c-19187d33ba3b"))
#+end_src

*** users

The list of user accounts ('root' is implicit).

#+name: USER-MAREK-RECORD
#+begin_src scheme
  (name "marek")
  (comment "Marek Paśnikowski")
  (group "users")
  (home-directory "/home/marek")
  (supplementary-groups (list "audio"
                              "netdev"
                              "video"
                              "wheel"))
#+end_src

*** keyboard-layout

#+name: MAIN-KEYBOARD-LAYOUT-RECORD
#+begin_src scheme
  (keyboard-layout "pl")
#+end_src

*** locale

#+name: LOCALE-STRING
#+begin_src scheme
  "pl_PL.utf8"
#+end_src

*** services

Below is the list of system services.  To search for available
services, run 'guix system search KEYWORD' in a terminal.

#+name: NETWORK-MANAGER-SERVICE-OBJECT
#+begin_src scheme
  network-manager-service-type
#+end_src

#+name: NTP-SERVICE-OBJECT
#+begin_src scheme
  ntp-service-type
#+end_src

To configure OpenSSH, pass an 'openssh-configuration'
record as a second argument to 'service' below.

#+name: OPENSSH-SERVICE-OBJECT
#+begin_src scheme
  openssh-service-type
#+end_src

#+name: WPA-SUPPLICANT-SERVICE-OBJECT
#+begin_src scheme
  wpa-supplicant-service-type
#+end_src
*** bootloader

#+name: BOOTLOADER-CONFIGURATION-RECORD
#+begin_src scheme
  (bootloader grub-efi-bootloader)
  (targets (list "/boot/efi"))
  (keyboard-layout <<MAIN-KEYBOARD-LAYOUT-RECORD>>)
#+end_src


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

* Re: Error: File System With Given Label Not Found
  2023-05-06 13:51 Error: File System With Given Label Not Found Marek Paśnikowski
@ 2023-05-07  3:30 ` Felix Lechner via
  2023-05-07  7:18   ` Marek Paśnikowski
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Lechner via @ 2023-05-07  3:30 UTC (permalink / raw)
  To: Marek Paśnikowski; +Cc: help-guix

Hi Marek,

On Sat, May 6, 2023 at 6:52 AM Marek Paśnikowski
<marekpasnikowski@protonmail.com> wrote:
>
>   (device (file-system-label "izumi-esp"))

That configuration option expects a file system label (and not a
partition label). You can see the difference with the command 'blkid'.

> $ ls /dev/disk/by-partlabel/
> izumi-esp  izumi-swap  izumi-system

You can find the label you need with the command

    ls /dev/disk/by-label

although in your case, it may be easier to run

   sudo dosfslabel /dev/disk/by-partlabel/izumi-esp

Kind regards
Felix


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

* Re: Error: File System With Given Label Not Found
  2023-05-07  3:30 ` Felix Lechner via
@ 2023-05-07  7:18   ` Marek Paśnikowski
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Paśnikowski @ 2023-05-07  7:18 UTC (permalink / raw)
  To: Felix Lechner; +Cc: help-guix

> > (device (file-system-label "izumi-esp"))
> 
> 
> That configuration option expects a file system label (and not a
> partition label). You can see the difference with the command 'blkid'.

Thank you.  This is a major discovery for me.
It immediately reminded me of the difference between
function parameters and arguments.

If only parted edited FS labels instead of PART labels,
none of this would have happened.


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

end of thread, other threads:[~2023-05-07  7:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-06 13:51 Error: File System With Given Label Not Found Marek Paśnikowski
2023-05-07  3:30 ` Felix Lechner via
2023-05-07  7:18   ` Marek Paśnikowski

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.