guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing guix system rollback / switch-generation


From: Danny Milosavljevic
Subject: Re: Implementing guix system rollback / switch-generation
Date: Mon, 13 Jun 2016 11:21:38 +0200

Hi,

On Sun, 12 Jun 2016 18:46:55 +0200
address@hidden (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]