From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#29662: 'guix gc' as user makes system unbootable Date: Mon, 18 Dec 2017 15:31:59 +0100 Message-ID: <878te0t8dc.fsf@gnu.org> References: <874lox89g5.fsf@portkomputilo.i-did-not-set--mail-host-address--so-tickle-me> <844859f2-692e-f2b8-a7c4-bd6d72541fae@uni-bremen.de> <877etkwedd.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]:40739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQwTZ-0004Du-QS for bug-guix@gnu.org; Mon, 18 Dec 2017 09:33:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQwTW-0003gQ-JC for bug-guix@gnu.org; Mon, 18 Dec 2017 09:33:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQwTW-0003fp-By for bug-guix@gnu.org; Mon, 18 Dec 2017 09:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eQwTW-0000jt-3q for bug-guix@gnu.org; Mon, 18 Dec 2017 09:33:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: (Martin Castillo's message of "Mon, 18 Dec 2017 15:18:20 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Martin Castillo Cc: 29662@debbugs.gnu.org Hi, Martin Castillo skribis: >> Normally the current =E2=80=98grub.cfg=E2=80=99 is a GC root, which prev= ents the >> background image and other items from being deleted: >>=20 >> --8<---------------cut here---------------start------------->8--- >> $ ls -l /var/guix/gcroots/bootcfg=20 >> lrwxrwxrwx 1 root root 52 Dec 7 23:21 /var/guix/gcroots/bootcfg -> /gnu= /store/2bnr3z8q0rpvdc9zrshhyq4znx7jpzq6-grub.cfg >> $ guix gc --references /var/guix/gcroots/bootcfg=20 >> /gnu/store/i3l4cv1mz30l4jafbghmbgmafc0xb38h-grub-image.png >> /gnu/store/j5x3dfappv9fdp7h46kgm8wxjbcqv5r6-system >> /gnu/store/qkhhqqkr0lkczwqwbp95gx4s8v0pjj41-raw-initrd >> /gnu/store/xqfpwxbghvi3h85pfji6kdzw7db2sgxz-grub-2.02 >> /gnu/store/zi4awdcvrlj0fp74yb0y4ngah4qmcri0-linux-libre-4.14.4 >> $ sudo diff /var/guix/gcroots/bootcfg /boot/grub/grub.cfg=20 >> $ echo $? >> 0 >> --8<---------------cut here---------------end--------------->8--- [...] > Like I said, I cannot reproduce currently. guix gc --list-dead doesn't > mention grub files anymore. > > below you see what I wrote while doing stuff. it starts with a missing > bootcfg, then doing stuff and at '--- end' I start again with a bootcfg. > > --- start missing bootcfg > > $ ls /var/guix/gcroots > auto/ booted-system current-system profiles > > I don't have bootcfg in there. Under what circumstances did you have a system without /var/guix/gcroots/bootcfg? > # guix system switch-generation 14 > substitute: updating list of substitutes from > 'https://berlin.guixsd.org'... 100.0% > substitute: updating list of substitutes from > 'https://mirror.hydra.gnu.org'... 100.0% > The following derivation will be built: > /gnu/store/31bxx2nwp3lxzdkcy8bmybabfl1pi0af-grub.cfg.drv > Von Generation =C2=BB10=C2=AB zu =C2=BB14=C2=AB gewechselt > $ diff /var/guix/gcroots/bootcfg /boot/grub/grub.cfg > ## no-output, grub.cfg has still the same content-> > /var/guix/gcroots/bootcfg changed > # guix system reconfigure confs/config.scm > ## mentions expected grub error > $ diff /var/guix/gcroots/bootcfg /boot/grub/grub.cfg > see diff [2] > > it does not seem to update /var/guix/gcroots/bootcfg. > and bootcfg somehow lists the generation number in the default entry. Are you saying that =E2=80=98guix system switch-generation=E2=80=99 does no= t update the target of the /var/guix/gcroots/bootcfg symlink? (From a quick look at the code it seems to update it.) Thanks, Ludo=E2=80=99.