Reading F2FS UUIDs and labels is not supported

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • raingloom
Owner
unassigned
Submitted by
raingloom
Severity
normal

Debbugs page

R
R
raingloom wrote on 1 Apr 2020 23:40
guix system init can't find file system by UUID, workaround results in broken boot
(address . bug-guix@gnu.org)
20200402084054.055a83f0@riseup.net
Trying to install Guix System onto an SSD using an UltraBay dock.
Config is the attached file (with slight variations in the obvious
places)

`readlink /dev/disk/by-uuid/643a215d-a30e-473b-826e-5c35de29e38f` gives
me /dev/sdb1

Yet using (uuid "643a215d-a30e-473b-826e-5c35de29e38f") results in:

```
sudo -E guix system init --no-bootloader
Configs/Guix/desktop-parametric.scm /mnt
:( /home/raingloom/Configs/Guix/desktop-parametric.scm:50:26: error:
file system with UUID '643a215d-a30e-473b-826e-5c35de29e38f' not found
```

Switching the UUID to uppercase as in the example (thankfully) doesn't
change anything, not even the error message.

I tried using a label, same result.

I ended up using the /dev/disk/by-uuid and /dev/disk/by-id paths for
the root file system and the bootloader respectively, and that resulted
in a succesful system init, but upon trying to boot the SSD with the
other machine, I got thrown into a rescue shell, because it couldn't
find the root using that path.

**(Quick aside: there really should be a guide for using that rescue
shell. I can get around in a /bin/sh one, but this is nearly unusable.
At least autocompletion should be supported.)**

I tried modifying the --root kernel parameter from Grub, so that it
would point to /dev/sda1 directly (which is the device's name on the
other machine), but I was thrown into the rescue shell again, with the
same backtrace (with the old path replaced with /dev/sda1 of course).

Sooo, I have no idea what to do. Any tips on debugging this?

Or on reconfiguring a Guix System install that is on an external file
system? On Arch I'd just arch-chroot into it and fix it from there, but
I don't know of anything similar for Guix.
;; for REPL (use-modules (guix) (gnu services)) (use-modules (gnu) (gnu system nss) (gnu packages shells) (gnu packages package-management) (gnu packages gnome) (gnu packages xdisorg) (gnu packages android) (gnu system shadow) (gnu services linux)) (use-service-modules desktop ssh nix) (use-package-modules bootloaders certs ratpoison suckless wm) ((lambda* (:key use-proprietary-crap?) (if use-proprietary-crap? (use-modules (nongnu packages linux)) (use-modules (gnu packages linux))) (operating-system (host-name "greg") (timezone "Europe/Budapest") (locale "en_US.utf8") (kernel (if use-proprietary-crap? linux linux-libre)) (firmware (append (if use-proprietary-crap? (list iwlwifi-firmware) '()) %base-firmware)) ;; Use the UEFI variant of GRUB with the EFI System ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/disk/by-id/ata-KINGSTON_SMS200S3120G_50026B727202A944"))) ;; Assume the target root file system is labelled "my-root", ;; and the EFI System Partition has UUID 1234-ABCD. (file-systems (cons* (file-system (device (uuid "643a215d-a30e-473b-826e-5c35de29e38f")) (mount-point "/") (options "compress") (type "f2fs")) %base-file-systems)) (users (append (list (user-account (name "raingloom") (comment "your friendly localhost admin") (group "users") (shell "/run/current-system/profile/bin/zsh") (supplementary-groups '("adbusers" "audio" "kvm" "netdev" "video" "wheel")) (home-directory "/home/raingloom"))) %base-user-accounts)) (groups (cons (user-group (system? #t) (name "adbusers")) %base-groups)) (packages (cons* i3-wm i3status dmenu ;window manager ;; sway swaylock swayidle swaybg waybar ;wayland window manager nss-certs ;for HTTPS access zsh ;nicer login shell gvfs glib-networking nix gnome orca libwacom xf86-input-wacom %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with NetworkManager, and more. (services (append (list (service nix-service-type) (service openssh-service-type (openssh-configuration (x11-forwarding? #f))) (service earlyoom-service-type (earlyoom-configuration (minimum-available-memory 5)))) (modify-services %desktop-services (udev-service-type config => (udev-configuration (inherit config) (rules (cons* android-udev-rules libwacom (udev-configuration-rules config))))) (elogind-service-type config => (elogind-configuration (inherit config) (handle-lid-switch 'ignore))) (guix-service-type config => (guix-configuration (inherit config) (extra-options '("--gc-keep-derivations=yes" "--gc-keep-outputs=yes"))))))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))) #:use-proprietary-crap? #f)
L
L
Ludovic Courtès wrote on 2 Apr 2020 04:00
(name . raingloom)(address . raingloom@riseup.net)(address . 40386@debbugs.gnu.org)
87tv22nodk.fsf@gnu.org
Hi,

raingloom <raingloom@riseup.net> skribis:

Toggle quote (21 lines)
> Trying to install Guix System onto an SSD using an UltraBay dock.
> Config is the attached file (with slight variations in the obvious
> places)
>
> `readlink /dev/disk/by-uuid/643a215d-a30e-473b-826e-5c35de29e38f` gives
> me /dev/sdb1
>
> Yet using (uuid "643a215d-a30e-473b-826e-5c35de29e38f") results in:
>
> ```
> sudo -E guix system init --no-bootloader
> Configs/Guix/desktop-parametric.scm /mnt
> :( /home/raingloom/Configs/Guix/desktop-parametric.scm:50:26: error:
> file system with UUID '643a215d-a30e-473b-826e-5c35de29e38f' not found
> ```
>
> Switching the UUID to uppercase as in the example (thankfully) doesn't
> change anything, not even the error message.
>
> I tried using a label, same result.

What file system is on /dev/sdb1?

The code responsible for that is in (gnu build file-systems). It
currently recognizes only some file system types: ISO9660, ext2/3/4,
Btrfs, FAT32, FAT16, and JFS.

Can you try:

sudo guix repl
,use(gnu build file-systems)
(find-partition-by-uuid (uuid "643a215d-a30e-473b-826e-5c35de29e38f"))

?

Toggle quote (6 lines)
> I ended up using the /dev/disk/by-uuid and /dev/disk/by-id paths for
> the root file system and the bootloader respectively, and that resulted
> in a succesful system init, but upon trying to boot the SSD with the
> other machine, I got thrown into a rescue shell, because it couldn't
> find the root using that path.

Yes, because /dev/disk is not accessible early on. That’s why the
manual recommends using ‘uuid’ or ‘file-system-label’.

Toggle quote (4 lines)
> **(Quick aside: there really should be a guide for using that rescue
> shell. I can get around in a /bin/sh one, but this is nearly unusable.
> At least autocompletion should be supported.)**

Yes, that reminds me someone reported a serious Bournish bug on IRC.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 5 Apr 2020 15:13
control message for bug #40386
(address . control@debbugs.gnu.org)
87369hh98i.fsf@gnu.org
tags 40386 + moreinfo
quit
R
R
raingloom wrote on 5 Apr 2020 23:49
F2FS support Was: bug#40386: guix system init can't find file system by UUID, workaround results in broken boot
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40386@debbugs.gnu.org)
20200406084939.57a6e410@riseup.net
On Thu, 02 Apr 2020 13:00:39 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (58 lines)
> Hi,
>
> raingloom <raingloom@riseup.net> skribis:
>
> > Trying to install Guix System onto an SSD using an UltraBay dock.
> > Config is the attached file (with slight variations in the obvious
> > places)
> >
> > `readlink /dev/disk/by-uuid/643a215d-a30e-473b-826e-5c35de29e38f`
> > gives me /dev/sdb1
> >
> > Yet using (uuid "643a215d-a30e-473b-826e-5c35de29e38f") results in:
> >
> > ```
> > sudo -E guix system init --no-bootloader
> > Configs/Guix/desktop-parametric.scm /mnt
> > :( /home/raingloom/Configs/Guix/desktop-parametric.scm:50:26:
> > error: file system with UUID '643a215d-a30e-473b-826e-5c35de29e38f'
> > not found ```
> >
> > Switching the UUID to uppercase as in the example (thankfully)
> > doesn't change anything, not even the error message.
> >
> > I tried using a label, same result.
>
> What file system is on /dev/sdb1?
>
> The code responsible for that is in (gnu build file-systems). It
> currently recognizes only some file system types: ISO9660, ext2/3/4,
> Btrfs, FAT32, FAT16, and JFS.
>
> Can you try:
>
> sudo guix repl
> ,use(gnu build file-systems)
> (find-partition-by-uuid (uuid
> "643a215d-a30e-473b-826e-5c35de29e38f"))
>
> ?
>
> > I ended up using the /dev/disk/by-uuid and /dev/disk/by-id paths for
> > the root file system and the bootloader respectively, and that
> > resulted in a succesful system init, but upon trying to boot the
> > SSD with the other machine, I got thrown into a rescue shell,
> > because it couldn't find the root using that path.
>
> Yes, because /dev/disk is not accessible early on. That’s why the
> manual recommends using ‘uuid’ or ‘file-system-label’.
>
> > **(Quick aside: there really should be a guide for using that rescue
> > shell. I can get around in a /bin/sh one, but this is nearly
> > unusable. At least autocompletion should be supported.)**
>
> Yes, that reminds me someone reported a serious Bournish bug on IRC.
>
> Thanks,
> Ludo’.

It looks like the issue is that F2FS isn't supported, but I'm working
on adding support. UUID reading works, but labels still seem to be
buggy, and I'm still debugging some initrd issues, but I think I'm
close.
R
R
raingloom wrote on 20 May 2020 22:09
guix system init can't find file system by UUID, workaround results in broken boot
(address . 40386@debbugs.gnu.org)
20200521070952.01ad2132@riseup.net
This can be closed, now that we have F2FS support.

Although maybe the error message could be better for file systems that
are not supported. Right now the use has no way to distinguish whether
`guix system` failed to find their device because they mistyped the
UUID or because it doesn't even support their file system of choice at
all.
L
L
Ludovic Courtès wrote on 24 May 2020 14:21
control message for bug #40386
(address . control@debbugs.gnu.org)
87y2phxc4c.fsf@gnu.org
retitle 40386 Reading F2FS UUIDs and labels is not supported
quit
L
L
Ludovic Courtès wrote on 24 May 2020 14:21
(address . control@debbugs.gnu.org)
87wo51xc45.fsf@gnu.org
tags 40386 fixed
close 40386
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40386@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40386
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch