unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Raghav Gururajan" <rvgn@disroot.org>
To: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
Cc: help-guix@gnu.org
Subject: Re: Prevent guix gc from removing *grub.cfg under /gnu/store/
Date: Tue, 19 Feb 2019 23:26:40 +0000	[thread overview]
Message-ID: <4c06b44e63d7b2ae19fede10c114fbb7@disroot.org> (raw)
In-Reply-To: <20190220000630.20ba9be4@alma-ubu>

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 through "guix build" command. But the file "[...]grub.cfg" under /gnu/store/ is created by the system (not user) during "guix system init" process. So how can I prevent "guix gc" process from removing a system created file? Thanks! 

February 19, 2019 6:14 PM, "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de> wrote:

> On Tue, 19 Feb 2019 18:15:34 +0000
> "Raghav Gururajan" <rvgn@disroot.org> wrote:
> 
>> Hi Guix!
>> 
>> Since my BIOS comes with in-built grub payload, I did not want to
>> install bootloader on disk (but do want grub.cfg file
>> under /gnu/store/), so I passed --no-bootloader parameter during guix
>> system init. The guix system got successfully instantiated and there
>> was *grub.cfg file under /gnu/store/. The file stayed even after
>> multiple reboot, guix pull and guix package -u. But when I did guix
>> gc, it removed the *grub.cfg file under /gnu/store/. How can I
>> prevent this from happening? Since I am a novice user, please provide
>> me step-wise explanation.
> 
> Hi,
> 
> I'm not 100% sure that what you are doing is correct in the Guix-sense.
> Anyway, what's important is that you never delete from the /gnu/store
> manually, always use guix gc, as you did.
> 
> To prevent things in the store from garbage collection, you can use the
> additional build parameter "--root=file", see here:
> 
> https://www.gnu.org/software/guix/manual/en/guix.html#Additional-Build-Options
> 
> i.e. guix build ... --root=/home/me/my-gc-root
> 
> That would prevent the gc to remove that file, as long as that created
> link points to the store entry.
> 
> Hope this helps,
> 
> Björn

      parent reply	other threads:[~2019-02-19 23:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 18:15 Prevent guix gc from removing *grub.cfg under /gnu/store/ Raghav Gururajan
2019-02-19 23:06 ` Björn Höfling
2019-02-19 23:26 ` Raghav Gururajan [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c06b44e63d7b2ae19fede10c114fbb7@disroot.org \
    --to=rvgn@disroot.org \
    --cc=bjoern.hoefling@bjoernhoefling.de \
    --cc=help-guix@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).