all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Few questions regarding the installation
@ 2022-12-17  0:01 Wolf
  2022-12-17  0:37 ` Felix Lechner via
  2022-12-17  2:41 ` Tobias Geerinckx-Rice
  0 siblings, 2 replies; 4+ messages in thread
From: Wolf @ 2022-12-17  0:01 UTC (permalink / raw)
  To: help-guix

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

Hello,

I started experimenting with Guix (currently just trying to install
new system inside a qemu) and I have couple questions regarding the
installation process.



For my setup, I want to use LVM, so I'm glad it is distributed on the
installation image. However, I have a hard time actually using it. It
seems to be available both as lvm2 and lvm2-static:

    root@gnu ~# find / -name pvcreate -executable
    /gnu/store/84nrv3kl3vvsrwknnccnhjal6z7iksxc-lvm2-static-2.03.11/sbin/pvcreate
    /gnu/store/vsxqa1l3p800flfzrq9vzq3v8bi0pfb7-lvm2-2.03.11/sbin/pvcreate

But it is not on the path:

    root@gnu ~# pvcreate
    bash: pvcreate: command not found

I'm currently calling it using

    # /gnu/store/*-lvm2-s*/sbin/pvcreate /dev/mapper/foo

But I will be the first one to admit that it is not a great way. So
what would be a better way to either call it or add it into the path?

On IRC I was advised to try guix install lvm2-static, which does work
(after sourcing the profile), however it does download the package
from the internet. That seems pointless, since I already have one
locally (as seen in the output of find above), so I would prefer to
use that one.



Another question is how to undo the effect of running herd start
cow-store /mnt. I did try the obvious (herd stop cow-store), but that
does not seem to do the trick. So, how can I do it?



Thank you,
W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

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

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

* Re: Few questions regarding the installation
  2022-12-17  0:01 Few questions regarding the installation Wolf
@ 2022-12-17  0:37 ` Felix Lechner via
  2022-12-17  2:41 ` Tobias Geerinckx-Rice
  1 sibling, 0 replies; 4+ messages in thread
From: Felix Lechner via @ 2022-12-17  0:37 UTC (permalink / raw)
  To: help-guix

Hi Wolf,

On Fri, Dec 16, 2022 at 4:02 PM Wolf <wolf@wolfsden.cz> wrote:
>
> On IRC I was advised to try guix install lvm2-static, which does work
> (after sourcing the profile),

That is the correct procedure.

> however it does download the package
> from the internet. That seems pointless, since I already have one
> locally (as seen in the output of find above), so I would prefer to
> use that one.

The versions may be slightly different. I do not believe the Guix
daemon would download a new version if it was already present in your
store. Please remember that the hash in the name of the store item may
be different.

Kind regards
Felix Lechner


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

* Re: Few questions regarding the installation
  2022-12-17  0:01 Few questions regarding the installation Wolf
  2022-12-17  0:37 ` Felix Lechner via
@ 2022-12-17  2:41 ` Tobias Geerinckx-Rice
  2022-12-18 23:21   ` Wolf
  1 sibling, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-12-17  2:41 UTC (permalink / raw)
  To: Wolf; +Cc: help-guix

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

Hi Wolf,

Wolf 写道:
> But it is not on the path:
>
>     root@gnu ~# pvcreate
>     bash: pvcreate: command not found

Indeed, lvm2(-static) wasn't actually installed on the 
installation image!

Commit 0906ce7389c6654fa3d1b3b52c8330eff0256264 fixes that:

  root@gnu ~# which pvcreate
  /run/current-system/profile/sbin/pvcreate

> On IRC I was advised to try guix install lvm2-static, which does 
> work
> (after sourcing the profile), however it does download the 
> package
> from the internet.

The installer image was generated using ‘guix system image’ with 
particular Guix version N.  Hence, all packages inside that image 
are those from Guix version N.  (In Guix, there is no ‘package 
repository’ distributed separately from the ‘package manager’.) 
These packages include the image's ‘guix’ package itself.

Hence, the ‘guix’ you can run in the image will always be older 
than the Guix that put lvm2-static in the image, and may contain 
older versions of some packages.

You'll have Guix N's lvm2-static in /gnu/store, but ‘guix install 
lvm2-static’ will install Guix N-1's version.  They might match, 
they might not.  I guess here they didn't.

>                    That seems pointless, since I already have 
>                    one
> locally (as seen in the output of find above), so I would prefer 
> to
> use that one.

You can simply

  root@gnu ~# guix install /gnu/store/84n[…]-lvm2-static-2.03.1

That might still download $things for $reasons, but they won't 
include lvm2-static.

> Another question is how to undo the effect of running herd start
> cow-store /mnt. I did try the obvious (herd stop cow-store), but 
> that
> does not seem to do the trick. So, how can I do it?

This I don't know either.  I always just reboot.

Kind regards,

T G-R

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

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

* Re: Few questions regarding the installation
  2022-12-17  2:41 ` Tobias Geerinckx-Rice
@ 2022-12-18 23:21   ` Wolf
  0 siblings, 0 replies; 4+ messages in thread
From: Wolf @ 2022-12-18 23:21 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: help-guix

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

Hello,

On 2022-12-17 03:41:17 +0100, Tobias Geerinckx-Rice wrote:
> Hi Wolf,
> 
> Wolf 写道:
> > But it is not on the path:
> > 
> >     root@gnu ~# pvcreate
> >     bash: pvcreate: command not found
> 
> Indeed, lvm2(-static) wasn't actually installed on the installation image!
> 
> Commit 0906ce7389c6654fa3d1b3b52c8330eff0256264 fixes that:
> 
>  root@gnu ~# which pvcreate
>  /run/current-system/profile/sbin/pvcreate

Great, so since 1.5.0 this will be taken care of (since I do not see
it in the 1.4.0 tree).

> 
> > On IRC I was advised to try guix install lvm2-static, which does work
> > (after sourcing the profile), however it does download the package
> > from the internet.
> 
> The installer image was generated using ‘guix system image’ with particular
> Guix version N.  Hence, all packages inside that image are those from Guix
> version N.  (In Guix, there is no ‘package repository’ distributed
> separately from the ‘package manager’.) These packages include the image's
> ‘guix’ package itself.
> 
> Hence, the ‘guix’ you can run in the image will always be older than the
> Guix that put lvm2-static in the image, and may contain older versions of
> some packages.
> 
> You'll have Guix N's lvm2-static in /gnu/store, but ‘guix install
> lvm2-static’ will install Guix N-1's version.  They might match, they might
> not.  I guess here they didn't.

Ah, based on this my understanding is that just the fact that
something is in the store does not mean it is actually installed. It
could be just a left over, or something pulled as a dependency. And
since lvm2{,-static} is not actually installed, it is not symlinked
into any usable path (even though is it present in the store).

Is that roughly correct summary? Sorry, this is my first try at the
guix/nix approach to things, so I want to be sure I understand it
properly.

> 
> >                    That seems pointless, since I already have
> > one
> > locally (as seen in the output of find above), so I would prefer to
> > use that one.
> 
> You can simply
> 
>  root@gnu ~# guix install /gnu/store/84n[…]-lvm2-static-2.03.1
> 
> That might still download $things for $reasons, but they won't include
> lvm2-static.
> 

It seems to still download $things for $reasons (quite few of them,
including mkfontscale for example). Since this is already resolved on
the master, for now I'll go with

    # This should not longer be necessary since guix 1.5.0
    if ! command -v pvcreate >/dev/null; then
    	guix install lvm2-static
    	GUIX_PROFILE="/root/.guix-profile"
    	. "$GUIX_PROFILE/etc/profile"
    fi

and call it a day. I will make a note to try to figure out $reasons at
some later time.

> > Another question is how to undo the effect of running herd start
> > cow-store /mnt. I did try the obvious (herd stop cow-store), but that
> > does not seem to do the trick. So, how can I do it?
> 
> This I don't know either.  I always just reboot.
> 
> Kind regards,
> 
> T G-R

Thank you for the help.

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

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

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

end of thread, other threads:[~2022-12-18 23:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-17  0:01 Few questions regarding the installation Wolf
2022-12-17  0:37 ` Felix Lechner via
2022-12-17  2:41 ` Tobias Geerinckx-Rice
2022-12-18 23:21   ` Wolf

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.