Subject: guix system vm-image fails when using grub-efi-bootleader
From: Maxim Cournoyer <[email-masked]>
To: bug-guix <[email-masked]>
Date: Sat, 07 Nov 2020 23:41:44 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Attempting to build the lightweight-desktop.tpml image configuration using:

$ guix system vm-image gnu/system/examples/lightweight-desktop.tmpl --verbosity=10 --no-offload

ends up crashing with:

--8<---------------cut here---------------start------------->8---
populating...
creating FAT partition...
mkfs.fat 4.1 (2017-01-24)
mounting root partition...
[ 2314.084305] EXT4-fs (vda1): mounted filesystem with ordered data mode. Opts: (null)
installing bootloader...
Backtrace:
           1 (primitive-load "/gnu/store/8v2p9vi8249z31f8gsvrdf3c0b4
In ./gnu/build/vm.scm:
    485:6  0 (initialize-hard-disk "/dev/vda" #:bootloader-package _ 
./gnu/build/vm.scm:485:6: In procedure initialize-hard-disk:
ERROR:
  1. &message: "'/gnu/store/8jf4yz2vb77d7ww1q42x3hqr5bd6nwl3-grub-efi-2.04/sbin/grub-install --boot-directory /fs/boot --bootloader-id=Guix --efi-directory /fs/dev/vda' exited with status 1; output follows:\n\n "
[ 2315.563173] reboot: Restarting system
[ 2315.569476] reboot: machine restart
file-size: /gnu/store/0llx3y194278l5ksr4xh9kc64mh8nn8d-nss-certs-3.52.1/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny:2.6.73.65.44.228.0.16.pem: No such file or directory
file-size: /gnu/store/8i7j0d7hwz56hkzd83cwbdfnir2d1g68-profile/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny:2.6.73.65.44.228.0.16.pem: No such file or directory
Backtrace:
           1 (primitive-load "/gnu/store/wjnqppa67w1cql169d1z5dmcldj?")
In ./gnu/build/vm.scm:
   198:12  0 (load-in-linux-vm _ #:output _ #:qemu _ #:memory-size _ ?)
./gnu/build/vm.scm:198:12: In procedure load-in-linux-vm:
guest VM code exited with a non-zero status 256
--8<---------------cut here---------------end--------------->8---

The value of the --efi-directory argument (/fs/dev/vda) of the grub-install
command seems suspicious to me.

Thanks,

Maxim