From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Raghav Gururajan" Subject: Re: Prevent guix gc from removing *grub.cfg under /gnu/store/ Date: Tue, 19 Feb 2019 23:26:40 +0000 Message-ID: <4c06b44e63d7b2ae19fede10c114fbb7@disroot.org> References: <20190220000630.20ba9be4@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwEmn-0006HA-SQ for help-guix@gnu.org; Tue, 19 Feb 2019 18:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwEmk-0006Ia-6c for help-guix@gnu.org; Tue, 19 Feb 2019 18:26:48 -0500 Received: from knopi.disroot.org ([178.21.23.139]:37728) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwEmi-0006H5-BL for help-guix@gnu.org; Tue, 19 Feb 2019 18:26:45 -0500 In-Reply-To: <20190220000630.20ba9be4@alma-ubu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?utf-8?B?QmrDtnJuIEjDtmZsaW5n?= Cc: help-guix@gnu.org Thanks for your reply. I am not trying to manually remove anything from /= gnu/store/. I could use your suggestion if I am building a package throug= h "guix build" command. But the file "[...]grub.cfg" under /gnu/store/ is= created by the system (not user) during "guix system init" process. So h= ow can I prevent "guix gc" process from removing a system created file? T= hanks! =0A=0AFebruary 19, 2019 6:14 PM, "Bj=C3=B6rn H=C3=B6fling" wrote:=0A=0A> On Tue, 19 Feb 2019 18:15:34 += 0000=0A> "Raghav Gururajan" wrote:=0A> =0A>> Hi Guix!= =0A>> =0A>> Since my BIOS comes with in-built grub payload, I did not wan= t to=0A>> install bootloader on disk (but do want grub.cfg file=0A>> unde= r /gnu/store/), so I passed --no-bootloader parameter during guix=0A>> sy= stem init. The guix system got successfully instantiated and there=0A>> w= as *grub.cfg file under /gnu/store/. The file stayed even after=0A>> mult= iple reboot, guix pull and guix package -u. But when I did guix=0A>> gc, = it removed the *grub.cfg file under /gnu/store/. How can I=0A>> prevent t= his from happening? Since I am a novice user, please provide=0A>> me step= -wise explanation.=0A> =0A> Hi,=0A> =0A> I'm not 100% sure that what you = are doing is correct in the Guix-sense.=0A> Anyway, what's important is t= hat you never delete from the /gnu/store=0A> manually, always use guix gc= , as you did.=0A> =0A> To prevent things in the store from garbage collec= tion, you can use the=0A> additional build parameter "--root=3Dfile", see= here:=0A> =0A> https://www.gnu.org/software/guix/manual/en/guix.html#Add= itional-Build-Options=0A> =0A> i.e. guix build ... --root=3D/home/me/my-g= c-root=0A> =0A> That would prevent the gc to remove that file, as long as= that created=0A> link points to the store entry.=0A> =0A> Hope this help= s,=0A> =0A> Bj=C3=B6rn