guix system init can't find file system by UUID, workaround results in broken boot
(address . bug-guix@gnu.org)
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)