From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Implementing guix system rollback / switch-generation
Date: Mon, 13 Jun 2016 11:21:38 +0200 [thread overview]
Message-ID: <20160613112138.6a76d09b@scratchpost.org> (raw)
In-Reply-To: <87k2hul5hc.fsf@gnu.org>
Hi,
On Sun, 12 Jun 2016 18:46:55 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> So we assume the latest GRUB always “works”, and we generate a grub.cfg
> with a menu list all the older generations, which is rather convenient
> from the UI viewpoint, I think.
It's definitely convenient. Back when I enabled home encryption GuixSD didn't boot multiple times. Having the older generations there saved me from a system reinstallation / restore.
However, I think the actual point is to have all the "update" actions be atomic. Because there's something in the Linux kernel config (only on GuixSD; works just fine on Ubuntu) which makes my laptop crashy (on the first larger disk write after standby wakeup) I have some experience with Guix non-atomicity and let me tell you it's not good. (Just the other day it broke the substitute cache - so I couldn't use substitutes at all anymore; I've since found and deleted the cache directory contents)
Therefore, while I wouldn't replace (or re-symlink) the entire /boot on guix reconfiguration (it might be on its own partition, too), it *may* be useful to use include files and put these there atomically, one file per version. I'm not sure whether grub supports something like "include *.inc" with wildcards but that would be an idea.
For the record: atomically creating an important file means:
- write content into tempfile, if necessary into a subdir of the correct drive (where the finished file will be)
- fdatasync
- rename tempfile to have finished name (atomically)
Also without the include files it's fine to use one larger grub.cfg and update it like described.
I think that the monolithic grub.cfg is fine.
next prev parent reply other threads:[~2016-06-13 9:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 22:29 Implementing guix system rollback / switch-generation Chris Marusich
2016-06-06 8:10 ` Ludovic Courtès
2016-06-09 7:19 ` Chris Marusich
2016-06-12 16:46 ` Ludovic Courtès
2016-06-13 9:21 ` Danny Milosavljevic [this message]
2016-06-13 15:00 ` Atomic file updates Ludovic Courtès
2016-06-06 12:10 ` Implementing guix system rollback / switch-generation Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160613112138.6a76d09b@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.