Subject: bug#44353: guix system disk-image -t raw fails with grub-efi-bootloader

From: Mathieu Othacehe <[email-masked]>
Date: Sun, 08 Nov 2020 12:04:55 +0100

Hey,

> $ time ./pre-inst-env guix system disk-image
> gnu/system/examples/lightweight-desktop.tmpl --verbosity=2 --no-offload
>
> That took 38 minutes on my system and produced /gnu/store/...-disk-image.

Strange, only 8 minutes for me. Does it include the time necessary to
fetch all substitutes? Are you using a SSD drive?

> $ qemu-system-x86_64 -m 1024 -bios $(guix build
> ovmf)/share/firmware/ovmf_x64.bin -hda /tmp/lightweight-desktop.img

It tries to mount the EFI file-system with UUID "1234-ABCD" and
fails. You can remove this one for the lightweight-desktop configuration
to obtain a bootable system.

> Would break if device was set to #f, as is done in (guix build image)'s
> initialize-efi-partition:
>
>   (when bootloader-installer
>     (display "installing bootloader...\n")
>     (bootloader-installer bootloader-package #f root))
>
> Is my analysis correct?  If so, the patch I sent yesterday would fix the
> problem more thoroughly.

Yes it is probably broken too. However, I would prefer not to introduce
bootloader specific stuff in (gnu system image).

I think the bootloaders should try to do their best with the DEVICE and
MOUNT-POINT arguments passed to bootloader-installer procedure. It
means, trying to install themselves using only MOUNT-POINT argument or
bailing out.

WDYT?

Thanks,

Mathieu