From debbugs-submit-bounces@debbugs.gnu.org Wed May 27 03:22:33 2020 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 To: guix-patches@gnu.org Subject: [PATCH 0/8] image: Add MBR based boot support. 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 Content-Transfer-Encoding: 8bit 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-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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(-) -- 2.26.2