From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Implementing guix system rollback / switch-generation Date: Mon, 13 Jun 2016 11:21:38 +0200 Message-ID: <20160613112138.6a76d09b@scratchpost.org> References: <87wpm3qngd.fsf@gmail.com> <87a8iy68lm.fsf@gnu.org> <877fdyesni.fsf@gmail.com> <87k2hul5hc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCO46-0004xk-F5 for guix-devel@gnu.org; Mon, 13 Jun 2016 05:21:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCO41-00061y-Am for guix-devel@gnu.org; Mon, 13 Jun 2016 05:21:49 -0400 In-Reply-To: <87k2hul5hc.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel@gnu.org Hi, On Sun, 12 Jun 2016 18:46:55 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > So we assume the latest GRUB always =E2=80=9Cworks=E2=80=9D, and we gener= ate 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 at= omic. 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 larg= er disk write after standby wakeup) I have some experience with Guix non-at= omicity 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 sinc= e found and deleted the cache directory contents) Therefore, while I wouldn't replace (or re-symlink) the entire /boot on gui= x reconfiguration (it might be on its own partition, too), it *may* be usef= ul to use include files and put these there atomically, one file per versio= n. I'm not sure whether grub supports something like "include *.inc" with w= ildcards 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 dr= ive (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 upd= ate it like described. I think that the monolithic grub.cfg is fine.