Collecting Garbage may render your System unbootable
Hi folks!
Recently I ran into an issue, that my system, and all other available generations in my boot menu where not bootable any more. Every profile would kernel panic. In a huff, I quickly deleted my root partition and reinstalled, which made it quite easy to do due to Guix' declarative nature and called it the day.
But then, several days later, I garbage collected another machine, then rebooted into the same kernel panics I experienced before, while noting that all profiles where bust too. So, there I had to reinstall again, and wondered if this is reproducible.
After testing in a VM, I have gotten it to a state as such:
Only the MySQL service was left over after removing all services. Enable Nonguix, build and install Linux with its linux-firmware drivers, delete all pull, package, and system generations and then garbage collect your store clean. Reboot.
The boot process should fail with a kernel panic.
A generation will not kernel panic, should I reconfigure the system right after garbage collecting and before rebooting. Hence, deleted files are put back into the store. This procedure is not reproducible on a vanilla Guix with no extra channels plugged into it.
But if I disable (initrd microcode-initrd)
it will keep the system
bootable. Which brings me back to my aforementioned situation with
two dead machines: It had gotten to the point, that I had no
linux-libre generations left on them, where none could be selected and
I just ruthlesly garbage collected and carelessly rebooted. In part that
was my fault that I never reconfigured these systems and simply
rebooted. But then, I wonder why this combination would render an
unbootable system? And has something like this been observed before?
The following declaration should render a system that kernel panics. Switching between kernel versions doesn't show a difference.
(use-modules (gnu)
(gnu packages databases)
(guix channels)
(guix inferior)
(nongnu packages linux)
(nongnu system linux-initrd)
(srfi srfi-1))
(use-service-modules databases networking ssh)
(operating-system
(locale "en_GB.utf8")
(timezone "Europe/Berlin")
(keyboard-layout (keyboard-layout "gb"))
(host-name "moon")
(users (cons* (user-account (name "john")
(group "users")
(home-directory "/home/john")
(supplementary-groups '("wheel" "netdev" "audio"
"video" "input" "lp")))
%base-user-accounts))
;; (kernel (let* ((channels (list (channel (name 'nonguix)
;; (url "https://gitlab.com/nonguix/nonguix")
;; (commit "c82a492fe165414347fa9fcaccfaec16df0a315a"))
;; (channel (name 'guix)
;; (url "https://git.savannah.gnu.org/git/guix.git")
;; (commit "2f6cbd55b6b1d196672e13a3231bfb288521ad60"))))
;; (inferior (inferior-for-channels channels)))
;; (first (lookup-inferior-packages inferior "linux" "5.11.14"))))
;; (initrd microcode-initrd)
;; (firmware (list linux-firmware))
(kernel (let* ((channels (list (channel (name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
(commit "14aafb5183c74f49078597f7bfb0122def7064f3"))
(channel (name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit "3802bb0ba027b5e792dc7cbecabaf19889acdc7b"))))
(inferior (inferior-for-channels channels)))
(first (lookup-inferior-packages inferior "linux" "5.11.16"))))
(initrd microcode-initrd)
(firmware (list linux-firmware))
(services (append (list (service dhcp-client-service-type)
(service openssh-service-type)
;; Why is MySQL provoking a kernel panic?
(service mysql-service-type
(mysql-configuration
(mysql mariadb))))
%base-services))
(bootloader (bootloader-configuration (bootloader grub-bootloader)
(target "/dev/sda")
(keyboard-layout keyboard-layout)))
(file-systems (cons* (file-system (mount-point "/")
(device (uuid "2c1d653f-a654-4571-8910-76135a2db40e"
'ext4))
(type "ext4"))
%base-file-systems)))