unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Unfortunate statefulness of Guix Install image
@ 2021-04-30 19:32 Vladilen Kozin
  2021-05-01  8:32 ` Vladilen Kozin
  2021-05-01 13:48 ` Tobias Geerinckx-Rice
  0 siblings, 2 replies; 3+ messages in thread
From: Vladilen Kozin @ 2021-04-30 19:32 UTC (permalink / raw)
  To: guix-devel

Hello Guix.

This may or may not be a "bug", but thought I'd report something I run
into. I found that GUI install never worked for me but booting off
Guix Install USB and then following
https://guix.gnu.org/manual/en/html_node/Manual-Installation.html
worked perfectly fine. Except, when you try to do the manual install
off the same USB ... twice. That is, having installed a system once
off that USB, you then try to install another and your `guix system
init path/to/config.scm /mnt` would almost immediately fail with error
saying that some expected derivation have not been found in the store.

My best guess from what I've read in the manual is this. Store is not
the only place where derivations appear. /var/guix/db stores metadata
about said derivations. So the first time you do `herd start cow-store
/mnt` trick it'll create the store there but will populate the db on
that USB drive. Next time you try to install from that same USB on a
different machine it'll have its db reference derivations that are no
longer available. I worked around this by stupidly `mv /var/guix/db
/var/guix/db.old` and `guix system init` went without trouble.

I guess my complaint is that at least the manual way (maybe GUI
install, too) is completely stateful and turns that USB stick into
"consumable good" unless you know about the database.

Sorry, dunno enough about Guix, so maybe I've been doing something wrong.
-- 
Best regards
Vlad Kozin


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

* Re: Unfortunate statefulness of Guix Install image
  2021-04-30 19:32 Unfortunate statefulness of Guix Install image Vladilen Kozin
@ 2021-05-01  8:32 ` Vladilen Kozin
  2021-05-01 13:48 ` Tobias Geerinckx-Rice
  1 sibling, 0 replies; 3+ messages in thread
From: Vladilen Kozin @ 2021-05-01  8:32 UTC (permalink / raw)
  To: guix-devel

If I read this https://guix.gnu.org/manual/en/html_node/The-Store.html#The-Store
correctly, then perhaps a proper solution to this is to also supply
--localstatedir in attempt to ensure that the db with metadata ends up
on the target partition? So e.g. like this:

guix system --localstatedir /mnt/var init /mnt/etc/config.scm /mnt

I've not tried it, but if it is the way to solve this, then perhaps
this extra step belongs in the Manual Installation section of the
manual.

On Fri, 30 Apr 2021 at 20:32, Vladilen Kozin <vladilen.kozin@gmail.com> wrote:
>
> Hello Guix.
>
> This may or may not be a "bug", but thought I'd report something I run
> into. I found that GUI install never worked for me but booting off
> Guix Install USB and then following
> https://guix.gnu.org/manual/en/html_node/Manual-Installation.html
> worked perfectly fine. Except, when you try to do the manual install
> off the same USB ... twice. That is, having installed a system once
> off that USB, you then try to install another and your `guix system
> init path/to/config.scm /mnt` would almost immediately fail with error
> saying that some expected derivation have not been found in the store.
>
> My best guess from what I've read in the manual is this. Store is not
> the only place where derivations appear. /var/guix/db stores metadata
> about said derivations. So the first time you do `herd start cow-store
> /mnt` trick it'll create the store there but will populate the db on
> that USB drive. Next time you try to install from that same USB on a
> different machine it'll have its db reference derivations that are no
> longer available. I worked around this by stupidly `mv /var/guix/db
> /var/guix/db.old` and `guix system init` went without trouble.
>
> I guess my complaint is that at least the manual way (maybe GUI
> install, too) is completely stateful and turns that USB stick into
> "consumable good" unless you know about the database.
>
> Sorry, dunno enough about Guix, so maybe I've been doing something wrong.
> --
> Best regards
> Vlad Kozin



-- 
Best regards
Vlad Kozin


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

* Re: Unfortunate statefulness of Guix Install image
  2021-04-30 19:32 Unfortunate statefulness of Guix Install image Vladilen Kozin
  2021-05-01  8:32 ` Vladilen Kozin
@ 2021-05-01 13:48 ` Tobias Geerinckx-Rice
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Geerinckx-Rice @ 2021-05-01 13:48 UTC (permalink / raw)
  To: Vladilen Kozin; +Cc: guix-devel

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

Vladilen,

I'm writing mainly to save you some time testing ‘guix system init 
--localstatedir’.  That is a ./configure option used when building 
Guix from source.  I don't think any option will help you here.

Vladilen Kozin 写道:
> Except, when you try to do the manual install off the same USB
> ... twice.

You're likely the first person to try this!

I *think* it implies that /var/guix/db is low-key bogus once 
cow-store is stopped, but I didn't test that assertion.  It should 
be reverted together with /gnu/store.

IMO what you want should be possible.  That it's not is a bug, 
albeit a low-priority one.

> My best guess from what I've read in the manual is this. Store 
> is not
> the only place where derivations appear. /var/guix/db stores 
> metadata
> about said derivations. So the first time you do `herd start 
> cow-store
> /mnt` trick it'll create the store there but will populate the 
> db on
> that USB drive. Next time you try to install from that same USB 
> on a
> different machine it'll have its db reference derivations that 
> are no
> longer available. I worked around this by stupidly `mv 
> /var/guix/db
> /var/guix/db.old` and `guix system init` went without trouble.

This is a relatively simple fix.  Thanks for testing it.  Would 
you be able and willing to modify cow-store to handle /var/guix/db 
as well?

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

end of thread, other threads:[~2021-05-01 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 19:32 Unfortunate statefulness of Guix Install image Vladilen Kozin
2021-05-01  8:32 ` Vladilen Kozin
2021-05-01 13:48 ` Tobias Geerinckx-Rice

Code repositories for project(s) associated with this public inbox

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

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).