Subject: Re: bug#51598: [PATCH 2/2] image: Support generating GPT images via `partition-table-type`

From: Mathieu Othacehe <[email-masked]>
Date: Fri, 12 Nov 2021 13:37:15 +0000

Hello Ryan

Nice one! I tried to generate a GPT image like so:

--8<---------------cut here---------------start------------->8---
$ cat /tmp/my-img.scm
(use-modules (gnu)
             (gnu image)
             (gnu system image))

(define my-os
  (primitive-load "/home/mathieu/guix/gnu/system/examples/lightweight-desktop.tmpl"))

(image
 (inherit
  (os->image my-os #:type efi-raw-image-type))
 (name 'raw-gpt)
 (partition-table-type 'gpt))

$ ./pre-inst-env guix system image /tmp/img.scm
--8<---------------cut here---------------end--------------->8---

However, the resulting image was not bootable because Grub was lacking
the part_gpt module. This is now fixed with
fb3df2011692b2a6fea9f4fefd71dd788453fbae.

I also noticed that trying to build a GPT image with a grub-bootloader
(bare-bones.tmpl image for instance), failed at build time, probably
because install-grub-disk-image is expecting an msdos partition.

It would be great if you could have a look to this issue as a follow-up :).

I pushed this patch anyway as 096a2bf8c59a955c634cc838e7f7111941c07b37.

Thanks,

Mathieu