From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6FUKA8PuoGKoaAEAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 20:47:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KHb1AsPuoGJYyAAA9RJhRA (envelope-from ) for ; Wed, 08 Jun 2022 20:47:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8E88A3ECF1 for ; Wed, 8 Jun 2022 20:47:30 +0200 (CEST) Received: from localhost ([::1]:57622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nz0iH-00007c-Pe for larch@yhetil.org; Wed, 08 Jun 2022 14:47:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz0hq-00005i-8n for bug-guix@gnu.org; Wed, 08 Jun 2022 14:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nz0hq-0001TL-04 for bug-guix@gnu.org; Wed, 08 Jun 2022 14:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nz0hp-0001pB-UA for bug-guix@gnu.org; Wed, 08 Jun 2022 14:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48172: support split /boot partition Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 08 Jun 2022 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48172 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Vagrant Cascadian Cc: 48172@debbugs.gnu.org Received: via spool by 48172-submit@debbugs.gnu.org id=B48172.16547140006982 (code B ref 48172); Wed, 08 Jun 2022 18:47:01 +0000 Received: (at 48172) by debbugs.gnu.org; 8 Jun 2022 18:46:40 +0000 Received: from localhost ([127.0.0.1]:44294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nz0hU-0001oY-5M for submit@debbugs.gnu.org; Wed, 08 Jun 2022 14:46:40 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:37755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nz0hQ-0001oK-Kt for 48172@debbugs.gnu.org; Wed, 08 Jun 2022 14:46:39 -0400 Received: by mail-qt1-f178.google.com with SMTP id y15so15576437qtx.4 for <48172@debbugs.gnu.org>; Wed, 08 Jun 2022 11:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2GCbg3v3YKj5O+AAxD2swCMtTyUO+SdbWSfiJ7q/yfU=; b=Pk3v7pi3jFpUHw3Rw1Pz2UndyXiwRsLDW1FZASkks50qwiiEKQ3B1hiSLokLMp1WWc sHmTM1zWsH/DbqTpJIKUJFRdcgFHUJMr+ywUYlvPshn7P9lsmpzTNoYzD1TsntddEvI6 c8bT8nT3nsUQ0nrLEElMZkqlW56FkmMUPX9A3afuviy8vhyVmxMxtv8jKzl2mvX2dcPs QRf8flIAgGLYnvH32wRdZ5DGpSK7JdR9KTl8hQH+kkR58JizSEVS2hjIl3A4jA8fEKyk EJSSdJztBOeXT/LAlmYdpNofbVMmLVA/wPCsMPAmqZ9QmDA4hvRahy+WY9gjYVg3VYW7 GVsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2GCbg3v3YKj5O+AAxD2swCMtTyUO+SdbWSfiJ7q/yfU=; b=1k9c4qXJnRqGDdryK2uvKVmnFr4O12IyAOotkHkhlsgSpNDDbSTU3330GvYhKy2egv O1EuELICIy6fygYJigupezATHuIGNCVAdOJ4pGCSWugHGqSPKSWLuK14jcxJzR6RSsYb 3FuPm7E/Jd+yeRzVcOIZIYB9sZyn6Q1JdYZM8mE292JhQ6VipIc/av+6HtVcoI3cFBKQ G749TDODn5MBEx6hOJ5HlsmKtZ6n8DQhAfw4Oj2XY9cJq5dVSzwEBOE2P2ah/YvRXkG3 ymGs5NaZBqit70+qsnkNpJi3n09wQl0ZaTgpB2biXvi6nmSB06xIsogl/gc0yRIXo9EQ yM/A== X-Gm-Message-State: AOAM532lj6DWy4EzqA4gNQy1cTP/hOE6lf+qVBN2QBVPqbdzJkB67Jj/ NbSn8dM51USiOPsP8UuPAY/VmtresUlANg== X-Google-Smtp-Source: ABdhPJxVy0WTCnJg7/7wcJsnMOUPxNcqHy/FDgzGjJtmD59TAznG4wRjAEVPk2bW/BstqEmTJigbwg== X-Received: by 2002:ac8:5c94:0:b0:305:20d:afab with SMTP id r20-20020ac85c94000000b00305020dafabmr3070474qta.262.1654713990135; Wed, 08 Jun 2022 11:46:30 -0700 (PDT) Received: from hurd (dsl-151-172.b2b2c.ca. [66.158.151.172]) by smtp.gmail.com with ESMTPSA id f15-20020ac86ecf000000b00304edcfa109sm6123221qtv.33.2022.06.08.11.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 11:46:28 -0700 (PDT) From: Maxim Cournoyer References: <875z038851.fsf@dismail.de> <871raovntj.fsf@yucca> <87pmy8u7s3.fsf@yucca> <87zgwmlbxl.fsf@yucca> Date: Wed, 08 Jun 2022 14:46:23 -0400 In-Reply-To: <87zgwmlbxl.fsf@yucca> (Vagrant Cascadian's message of "Sat, 22 May 2021 14:02:14 -0700") Message-ID: <87r13zj8n4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654714050; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=2GCbg3v3YKj5O+AAxD2swCMtTyUO+SdbWSfiJ7q/yfU=; b=tRL/y+MSfLN1qTvfRdqhJ8V2IToBMtdYq6L9+maX2qhk9cHliDVe1yY4hUocbq7GcPu1sT GhfPelu45hEido/CDBsMXeHfzg0wk5qHwiL2d0Z+ttYuncq14qHQjLpS4ivo2EZN7FdWGG h8nlwZdAXJhSjbHV2OOt61xaWjT41t/Xh9/g3eh777OgsZH+QtPmC9QqcZwnxtD7R1TCyy OjWzRMG/l1+0SNuWYjkV95BmNx/3Eb6lzPFhOkAw++VT0ioudJl3JmzxZjFmOanoi5VKA9 pGoeNN8ZymvLx30oOI8CFQaHjfug4Gfpuex4aDov9qjYthKFN+8rzrQ4qy4Hew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654714050; a=rsa-sha256; cv=none; b=aOQ0Yvy1AKADjMO/Ma5qmA6cHYwoZPXUn2TYOGegkGwcJr55ovj5giId2fBixkKKgSWSgT QLpDijcfS4TJyC5RS6Ui51ukKCbirmdZlAhv7X6rsmuUAOfyK0uHtWpG7mTNYkokuBYNOJ Q9kY9V8BYuK/oS7Zv9KQQ79SJ9c4JBWjV65yU/kZuL7w3yqya3LhiQZVpseeEnLAXY/Z4g KRNW6lcSYotl8qL26rTXN+DoWK7V0nC7//0dC2T1XP1SunzuuHvi+DIcCsbSvUBcNE9eGY MxIO4rg5gO1x7WttFDggMYHjoNqxwEeHEnl0HRwaEIxsFmlm3zKE6wby7XWxsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Pk3v7pi3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.50 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Pk3v7pi3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8E88A3ECF1 X-Spam-Score: 5.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: qrgb2/e9qoFd Hi Vagrant, Vagrant Cascadian writes: > On 2021-05-02, Vagrant Cascadian wrote: >> Unfortunately, guix doesn't currently support booting off of a separate >> /boot partition, since the kernel and initrd are in /gnu/store; your >> bootloader needs to be able to mount the partition that /gnu/store is >> located on. >> >> The workaround would be to manually copy all files mentioned in grub.cfg >> (kernel, initrd, possibly others) into a partition somewhere on boot >> media, and tweak the grub.cfg appropriately... >> >> >> There are several cases where this sort of thing would be desireable: >> >> * The above scenario; the system does not expose an NVMe drive from EFI >> or BIOS. >> >> * Using u-boot and you want root on lvm, raid, encryption, etc. which >> u-boot does not support > > * Using luks1 format for /boot and luks2 format for / (unless grub2 > learns how to read luks2 already/soon) On top of the above use cases, I'll add one I found recently, after upgrading my disk array to 2.5 TiB on my aging BIOS desktop: * Keep boot files under the maximum 2 TiB addressable sector on BIOS (non-UEFI) systems using > 2 TiB drives. The problem would manifest itself by this cryptic GRUB error: "error: attempt to read or write outside of disk `proc'" The solution was to have a separate *and* standalone boot partition. The separate part is easy; just create a new partition and mount it as /boot in your config file system definitions. The second "standalone" part is not taken care by Guix System yet; with the help of Tobias I devised the following script that copies the minimum (init RAM disks and kernel images) to /boot and strips the prefixes on these paths, if any (I use Btrfs subvolumes): --8<---------------cut here---------------start------------->8--- #!/usr/bin/env bash set -e # Copy kernel and initrd images to /boot images=$(grep -E '^ (linux|initrd) ' /boot/grub/grub.cfg \ | awk '{ print $2 }' | sed 's|.*/gnu|/gnu|g' | sort | uniq) for image in $images; do mkdir -p /boot$(dirname $image) if [ ! -e /boot$image ] || ! cmp -s $image /boot$image; then echo copying cp $image to /boot$image... > /dev/error cp $image /boot$image fi done # Adjust /boot/grub/grub.cfg. sed -E -e 's/.*search.*--set.*//' \ -e 's/^insmod luks.*//' \ -e 's/^cryptomount.*//' \ -e 's,^( (linux|initrd) )[^ ]*(/gnu/[^ ]* ?),\1\3,' \ -i.bak /boot/grub/grub.cfg --8<---------------cut here---------------end--------------->8--- It's on my TODO to address this properly in Guix when I'll have the bandwidth. I hope that helps, Thanks! Maxim