all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Prevent guix gc from removing *grub.cfg under /gnu/store/
@ 2019-02-19 18:15 Raghav Gururajan
  2019-02-19 23:06 ` Björn Höfling
  2019-02-19 23:26 ` Raghav Gururajan
  0 siblings, 2 replies; 3+ messages in thread
From: Raghav Gururajan @ 2019-02-19 18:15 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

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.

Thank you!

Regards,
RG.

[-- Attachment #2: Type: text/html, Size: 869 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prevent guix gc from removing *grub.cfg under /gnu/store/
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Björn Höfling @ 2019-02-19 23:06 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Prevent guix gc from removing *grub.cfg under /gnu/store/
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Raghav Gururajan @ 2019-02-19 23:26 UTC (permalink / raw)
  To: Björn Höfling; +Cc: help-guix

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-19 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.