unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Image generation
@ 2020-04-21 18:59 Mathieu Othacehe
  2020-04-21 19:16 ` Leo Famulari
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mathieu Othacehe @ 2020-04-21 18:59 UTC (permalink / raw)
  To: guix-devel


Hello,

I made some progress on the image generation topic. As discussed
previously, the goal is to use the same principles as genimage[1], to
achieve faster image generation, without resorting to VM.

A very related topic, is to bring the possibility to create Guix System
images with custom layouts. That includes position, size and type of the
bootloader partition, offset of the root partition and so on. While this
is not really important for desktop usage, it is almost mandatory for
embedded usage.

The wip-disk-image branch allows to define a Guix System image along the
lines of:

--8<---------------cut here---------------start------------->8---
(define my-image
  (image
   (format 'disk-image)
   (operating-system my-os)
   (partitions
    (list (partition
           (size (* 40 (expt 2 20)))
           (label "GNU-ESP")
           (file-system "vfat")
           (flags '(esp))
           (initializer (gexp initialize-efi-partition)))
          (partition
           (size 'guess)
           (label "Guix_image")
           (file-system "ext4")
           (flags '(boot))
           (initializer (gexp initialize-root-partition)))))))
--8<---------------cut here---------------end--------------->8---

then, you can call '(system-image my-image) and get a bootable
disk-image.

On this branch, it is already possible to generate an EFI disk-image,
with the traditional command:

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system disk-image gnu/system/examples/desktop.tmpl
--8<---------------cut here---------------end--------------->8---

On my computer, this takes 6m50 versus 2h30 for the master version. I
tested the image in QEMU, everything seems fine.

Now there's still plenty of work. This branch needs some more
cleaning. Then we need to:

* Add support for ISO images.
* Extend support to grub (non-efi), extlinux and u-boot bootloaders.
* Check everything works with --system and --target arguments.

I've re-implemented some parts of genimage in (gnu build disk-image)
module. Now, we could also go further and remove the use of this tool
completely.

Please tell me what you think,

Thanks,

Mathieu

[1]: https://github.com/pengutronix/genimage

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-28 21:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 18:59 Image generation Mathieu Othacehe
2020-04-21 19:16 ` Leo Famulari
2020-04-24  9:31   ` Mathieu Othacehe
2020-04-28 21:15     ` Ludovic Courtès
2020-04-24  9:27 ` Mathieu Othacehe
2020-04-28 21:01   ` Ludovic Courtès
2020-04-28 21:10 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).