From patchwork Wed May 27 07:22:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 22400 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6676527BBE3; Wed, 27 May 2020 08:23:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id F2E0E27BBE1 for ; Wed, 27 May 2020 08:23:08 +0100 (BST) Received: from localhost ([::1]:60080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdqP6-0004NO-E4 for patchwork@mira.cbaines.net; Wed, 27 May 2020 03:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdqP1-0004Me-2E for guix-patches@gnu.org; Wed, 27 May 2020 03:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdqP0-0000Ac-Pu for guix-patches@gnu.org; Wed, 27 May 2020 03:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdqP0-0003ch-Hw for guix-patches@gnu.org; Wed, 27 May 2020 03:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41560] [PATCH 0/8] image: Add MBR based boot support. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 May 2020 07:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41560@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159056415313874 (code B ref -1); Wed, 27 May 2020 07:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 May 2020 07:22:33 +0000 Received: from localhost ([127.0.0.1]:48064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdqOX-0003bi-9l for submit@debbugs.gnu.org; Wed, 27 May 2020 03:22:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:33892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdqOW-0003bb-0z for submit@debbugs.gnu.org; Wed, 27 May 2020 03:22:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdqOV-0004E6-S5 for guix-patches@gnu.org; Wed, 27 May 2020 03:22:31 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdqOV-0008RS-0A; Wed, 27 May 2020 03:22:31 -0400 Received: by mail-wm1-x32c.google.com with SMTP id u12so1990153wmd.3; Wed, 27 May 2020 00:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uia/eva7R4+9zqFPsgAyc9eIOW1Zc8Wz13BzpQXWWR4=; b=mvBhMIZycLrGUxakQSEPeYeF7Mx+blBPZXSnbJHXiWzmucc4rb6CmX9yBIoYbxcPJ+ aGzURcJOuakKmUGqA74wrRSnKxm/vYMj1SA+h6Lxlz1L7tY3qdm6JuPgYcLKpe1cmA2F QQ5nZvivxVVrt48CbRS7o8puwyRdRa3e5DF8iSFqJLBmLg6ntQ6SG+nMQp87PNSOriGY bG8FhRWbvW1XW3JnpoKu9GJRh7HyYRBGTWvkA5KdKtWf2v7tYch8sz8Z+ddLmzMIEFqp zxYjIV6zeiKdxet35xjiifOiBRZqA7RQ5MeEW/q9gzE6pEouFv3zOURqc5K7rgtOzRef aeNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uia/eva7R4+9zqFPsgAyc9eIOW1Zc8Wz13BzpQXWWR4=; b=K5pqAFYX/WEg5Jz/QhnPBkBrkDTMmGcNnwwHDqfgW9dpAkl/A36FgiiTAjgfYHU3GK Gnojmi+cJ/Vsz0zIvlWS/VXJOtsFgj0EuhdsCP5aKNf8leGBEDh5xFw681BLZLw+lUQ5 BDmVDG2gEj4txKbZjHHKFlrM8uIuYOVmyZiVm3KAQPxxu1aC0N+5GCHGeZVOo3IZDyPs uqQwZ9pwVG+QGlGtUJb5ZFXZiQOG3i8KMmct5Mcu7jRe/NLX6RjB5Z/QNiukNLd4CP/c hQCEEy/GhDEmM9CCuMCxlz/VkpH6NvINNt4IJ8diK0ohoGBFVW+pml5AzpfGcxK8CeeZ DS8g== X-Gm-Message-State: AOAM530dOX+HG0bgF1RO4Xca1Z4qfZj3cnpkuD0oNKViYEJZ8fHkDXG1 q0uXuWpQHYLDS342yUI8lcpIokzoxyM= X-Google-Smtp-Source: ABdhPJwSCYUCcERnfTatSVFyTukVXLVKC8IVI6Ge/sCl5p5jzflm1Icd9AvaTOFq3rJ2HQ0kCSqu4g== X-Received: by 2002:a1c:5985:: with SMTP id n127mr2786943wmb.64.1590564148571; Wed, 27 May 2020 00:22:28 -0700 (PDT) Received: from meru.fronius.com ([2a01:e0a:fa:a50:e5a2:3f70:d249:6ce9]) by smtp.gmail.com with ESMTPSA id l5sm1803209wml.27.2020.05.27.00.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 00:22:27 -0700 (PDT) From: Mathieu Othacehe X-Google-Original-From: Mathieu Othacehe Date: Wed, 27 May 2020 09:22:19 +0200 Message-Id: <20200527072219.25576-1-othacehe@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=m.othacehe@gmail.com; helo=mail-wm1-x32c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, Until now, only Grub EFI bootloader was supported in (gnu system image). Installing Grub EFI is as simple as copying a binary (created with grub-mkstandalone) in a dedicated partition. Now, for MBR based booting, one needs to run grub-install that does require root permissions. To overcome this issue, I used a hack inspired from OpenWrt and Buildroot. As grub-install is in fact a wrapper around grub-mkimage and grub-bios-setup, it is possible, with some plumbing and using those two tools, to install Grub on a raw disk-image, without root permissions. Thanks, Mathieu Mathieu Othacehe (8): bootloader: Add 'disk-image-installer'. bootloader: grub: Do not run grub-install when creating a disk-image. bootloader: grub: Use inheritance to define grub-minimal-bootloader. image: Add bootloader installation support. system: image: Correct genimage configuration file indentation. image: Use grub-efi to install the EFI bootloader. system: image: Fix image-with-os. image: Do not use VM to create disk-images. gnu/bootloader.scm | 5 +- gnu/bootloader/grub.scm | 80 ++++++++++++++++++++++------ gnu/build/image.scm | 9 +++- gnu/ci.scm | 20 +++---- gnu/system/image.scm | 113 ++++++++++++++++++---------------------- gnu/tests/install.scm | 8 +-- guix/scripts/system.scm | 16 +++--- guix/utils.scm | 5 ++ 8 files changed, 155 insertions(+), 101 deletions(-)