From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Image generation Date: Tue, 28 Apr 2020 23:10:54 +0200 Message-ID: <87wo5zs4dd.fsf@gnu.org> References: <878sior7fw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46270) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTXVK-00082G-Sl for guix-devel@gnu.org; Tue, 28 Apr 2020 17:11:49 -0400 In-Reply-To: <878sior7fw.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 21 Apr 2020 20:59:31 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: guix-devel@gnu.org Howdy! Mathieu Othacehe skribis: > 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. Awesome. > 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: > > (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))))))) That=E2=80=99s really cool! I=E2=80=99ve been willing to have something li= ke that forever, but the current record is buried on the build side, which makes it inconvenient to use like you do above. > On this branch, it is already possible to generate an EFI disk-image, > with the traditional command: > > ./pre-inst-env guix system disk-image gnu/system/examples/desktop.tmpl > > On my computer, this takes 6m50 versus 2h30 for the master version. I > tested the image in QEMU, everything seems fine. Oh, this much on =E2=80=98master=E2=80=99? Anyway, the speedup is undoubte= dly there and it=E2=80=99s really great. > Now there's still plenty of work. This branch needs some more > cleaning. Then we need to: > > * Add support for ISO images. I see you did that in the meantime. > * Extend support to grub (non-efi), extlinux and u-boot bootloaders. > * Check everything works with --system and --target arguments. Yeah. I saw your message to janneke, and indeed, I think there=E2=80=99s room for cooperation: janneke has come up with something that=E2=80=99s very close to =E2=80=9Cnormal=E2=80=9D Guix System for GNU/Hurd, and one of the main stum= bling blocks in my mind is building the image and in particular getting proper GRUB suppotr for multiboot OSes. > 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. I think it=E2=80=99s great. :-) Please do ping us when you want a closer review! Ludo=E2=80=99.