From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EBZkFpIiNGEpCAAAgWs5BA (envelope-from ) for ; Sun, 05 Sep 2021 03:51:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mEYPEpIiNGEeIgAA1q6Kng (envelope-from ) for ; Sun, 05 Sep 2021 01:51:14 +0000 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 8283216461 for ; Sun, 5 Sep 2021 03:51:13 +0200 (CEST) Received: from localhost ([::1]:42056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMhJP-0004PL-PX for larch@yhetil.org; Sat, 04 Sep 2021 21:51:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMhJG-0004Ow-ML for bug-guix@gnu.org; Sat, 04 Sep 2021 21:51:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMhJG-0005vb-FN for bug-guix@gnu.org; Sat, 04 Sep 2021 21:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMhJF-00021K-Ku for bug-guix@gnu.org; Sat, 04 Sep 2021 21:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44898: [wishlist] Make the GRUB installation procedure smarter References: <8xxH7oMlchpQqTKfkQXnJPhhoetZDQbFldlVKSNNlELUWA_WMMr3PLEjlUhsjrDQkWPwAinml4aAgLDArwcjehjdt0WrWOh9mPej2TxLgAE=@protonmail.com> In-Reply-To: <8xxH7oMlchpQqTKfkQXnJPhhoetZDQbFldlVKSNNlELUWA_WMMr3PLEjlUhsjrDQkWPwAinml4aAgLDArwcjehjdt0WrWOh9mPej2TxLgAE=@protonmail.com> Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 05 Sep 2021 01:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44898 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 44898@debbugs.gnu.org Received: via spool by 44898-submit@debbugs.gnu.org id=B44898.16308066417739 (code B ref 44898); Sun, 05 Sep 2021 01:51:01 +0000 Received: (at 44898) by debbugs.gnu.org; 5 Sep 2021 01:50:41 +0000 Received: from localhost ([127.0.0.1]:48898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMhIv-00020l-0m for submit@debbugs.gnu.org; Sat, 04 Sep 2021 21:50:41 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:35546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMhIs-00020X-OB for 44898@debbugs.gnu.org; Sat, 04 Sep 2021 21:50:39 -0400 Received: by mail-wr1-f43.google.com with SMTP id i6so4281681wrv.2 for <44898@debbugs.gnu.org>; Sat, 04 Sep 2021 18:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=user-agent:from:to:subject:date:message-id:mime-version; bh=DXQf8xaMUFdRnYxF3RTToGXq9aZ2nYaa8z4cORuMQoc=; b=XFGUmwQAJIphYUhnc6FBrVX8S8jW9zpZ8NiIom4TYEL9lLFQ9EyL2lyadBmoiimsk0 M6wEvS5TAqIZV3Kx94i5eS6krGD2DfSltzn/bY2VP9h475Dv8h5icm193l70GcOemPqd +zktqhvmEWpT3DgORYxZEFkgJNCecb60/Sno8WlSnFXsI6aPxqc8GTyDObHkBZYetAM9 Uy7VXZJMMQjRcrGmxUN2Dax6jfqQ5+D31AhQu3DOrQqlw3CtqF4BZVMs8JBf4MU6Xl4+ 2AR1bxQpULe65dIcIxaI+FssLefvoXGXCXOXX/UztHO/ydfipxAp634GR0OIll2cbEsR RMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=DXQf8xaMUFdRnYxF3RTToGXq9aZ2nYaa8z4cORuMQoc=; b=MwUM0FD6qsq2dk4QWrNK0Y+SqEkSiJcSICuWdQ0qXU9VJAFmtoIIx14PIoA5O7YM4b 6uU8pqsbrXEvGuxP6MmL6/FRwT7Fyi2gRxZ+4XzLYkK6GtZ/G0RGq5mmsRJ/QpoB4Ms9 P45FUyJqKlwVj39yhAOwL4ky/PDLcPxNBVWRLpJP/4FXRvvIbtkVRGNyck18GmHDOX3l mJIXL8hGthVsfIKkL67Uh5cd2iIruZaWXcJSkt0DqnegKt9OrGJ4VN6ldywK9OSIGmce gFLT83CHrKYwHeIwaWdqO4GjkZBaDH9aBZDKHfM0+UHgMy7074nF3qlO7vZlNwtFnxTD iYog== X-Gm-Message-State: AOAM532jMcWFUuc0mB1Y/7I7vx12PCWiP28o8aOcuF274GI1QwugH+AZ 4DY5SrqILHs+A6bZdW5EdwrtYpfUpNj9DQ38 X-Google-Smtp-Source: ABdhPJx/FQ7BQGHZ5JmH+VhU+dKdZcc6+dufAQttTUlhdcJSutlldADaqNekmbc6mTkKnWRaPUKK8g== X-Received: by 2002:adf:e4ce:: with SMTP id v14mr6218555wrm.49.1630806632018; Sat, 04 Sep 2021 18:50:32 -0700 (PDT) Received: from nomad-lp1 ([176.234.10.27]) by smtp.gmail.com with ESMTPSA id t64sm3242758wma.48.2021.09.04.18.50.30 for <44898@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Sep 2021 18:50:31 -0700 (PDT) User-agent: mu4e 1.6.5; emacs 28.0.50 From: muradm Date: Sun, 05 Sep 2021 04:27:25 +0300 Message-ID: <875yvf94f1.fsf@muradm.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630806673; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=DXQf8xaMUFdRnYxF3RTToGXq9aZ2nYaa8z4cORuMQoc=; b=KNQlixLsV3dRYSuRqOqufpe6z29iHbFx5uOouAk1ho5XEeX/AgxNcGYBFqcarWlvDpWvOb D/eNk8OjA9Oy/ScooMpU2YsxWjGeCsUeImy3P7htil4m9mXy6tp5IWfR0zkPraVEmollCy DXjqr+xo+82kZJotAV7btjheRaif0jIHhjNsYibOD3IY75nFZqGrpSTtDQXT3Fjq3KXkG2 XtLZ2jo0L5enc82E+CSNmId82bnIw0i3r1o2RNmW9grYZ5mBCOFvvaasvKNdPE1zqEAlXz REluwH5Cx9e/hcvwMrOGyuOizsAQ0O4pj4LEHgNcwF99/fxAXByLmzQZfRO5xg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630806673; a=rsa-sha256; cv=none; b=CYJEFmBx2HePO/z/cm7MuKmRKSiN1UfCp+evon1j70LcA2Y06ULC84BNhJot0m/f07ZYM+ m1VcHRLVOU/bhLmZ6twucNCWmX1U+QjgcgYDUcsCja8PJtQqdCDqD27gSlFMDbqBzNFgI6 Ircm6ylkFgiOrFoHwFM9wDdn7FfzyTYQdM4CKNuPqwyr5j+WiZfvTDuqq1ltGVMGGVBfxw nN4pn7vY37VtvOLCiLGhcdxiJol9uYwLnR/sTmjxrKEZecyVzEkMG70goWX06wJRzWOv0Z FX7s4HStUSYO8GD59ppY+um7H3pznXawLh7mPPHoCIO3ySAzuXhMGFc9D5bxLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=XFGUmwQA; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 0.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=XFGUmwQA; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 8283216461 X-Spam-Score: 0.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: lRhuAhJlGMaR First I was using Guix on Lenovo Carbon X1 in parallel with Arch. Few times I experiences "NVRAM full" or similar problem, I don't recall now. Solution was to reset NVRAM by some procedure. Half a year now, I moved to System76 Lemur Pro, where I have only Guix alone. Here I have another problem, sometimes it simply does not boot, then I have to plug USB, and run grub-install manually to recover. As per discussion on IRC today, I would suggest the folowing regarding grub efi, I'm not using other bootloaders, but I suppose same logic may apply. There are two things about grub: 1) /boot/efi/EFI/Guix/grubx64.efi & NVRAM - these are changing very very rarely, only when grub version change, boot partition change. 2) /boot/grub/* - these are changing only when grub version change or new guix generation is created, then grub.cfg is getting updated. Currently, as far as I understand, both of them are getting installed with one script from this derivation: /gnu/store/...-install-bootloader.scm.drv It could be split into two, one which runs grub-install, i.e. #1 above, the other which covers #2 above, let's say bootloader-phase-1-install and bootloader-phase-2-install respectively. Then, each script can be executed only when derivation is changing. With the following exceptions: - must be executed anyway on "guix system init ..." - must be executed only if "guix system reconfigure --force-bootloader ..." Scripts them selves store grub version (via absolute path), thus if grub updated, derivations will change. If for some reason, grub and/or nvram getting broken on boot, user has to boot with some kind recovery media anyway.