all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Noob issues with maintaining a guix laptop system
@ 2019-06-03 14:44 Divan Santana
  2019-06-04  6:17 ` ison
  0 siblings, 1 reply; 4+ messages in thread
From: Divan Santana @ 2019-06-03 14:44 UTC (permalink / raw)
  To: Help guix

Hi All,

Issues of a noob with no lisp programming skills has in maintaining a
guix laptop system.

 * how to do a system reconfigure on an older guix generation?

Sometimes I do a guix pull and attempt a reconfigure. Due to various
reasons, the reconfigure may fail. I now want to do a reconfigure, but
on the older guix generation profile. How do I go about doing that?

I've tried rolling back my guix profile, but running =guix pull
--list-generations= fails.

  #+begin_example
    ~ ᐅ guix pull --list-generations
    Generation 1    Oct 12 2018 20:44:32
      guix aa227b3
        repository URL: https://git.savannah.gnu.org/git/guix.git
        branch: master
        commit: aa227b3be3d7728331a08dbd139c47c9b271dc23
      guix-chromium 16130df
        repository URL: https://gitlab.com/mbakke/guix-chromium.git
        branch: master
        commit: 16130df2cc9a3424caa8230323b7d49c445f0813
    Generation 2    Oct 13 2018 15:35:07
      guix d781469
        repository URL: https://git.savannah.gnu.org/git/guix.git
        branch: master
        commit: d7814696b884a7c5e4a58f539ece53f4998689a3
      guix-chromium 16130df
        repository URL: https://gitlab.com/mbakke/guix-chromium.git
        branch: master
        commit: 16130df2cc9a3424caa8230323b7d49c445f0813
    Backtrace:
              10 (primitive-load "/home/ds/.config/guix/current/bin/guix")
    In guix/ui.scm:
      1747:12  9 (run-guix-command _ . _)
    In ice-9/boot-9.scm:
        829:9  8 (catch _ _ #<procedure 7f2580061910 at guix/ui.scm:703…> …)
        829:9  7 (catch _ _ #<procedure 7f2580061928 at guix/ui.scm:826…> …)
        829:9  6 (catch _ _ #<procedure 7f257daedba0 at guix/scripts/pu…> …)
        829:9  5 (catch system-error #<procedure 41c66a0 at guix/script…> …)
    In guix/scripts/pull.scm:
       479:15  4 (_)
        462:4  3 (display-profile-content-diff "/var/guix/profiles/per-…" …)
    In guix/memoization.scm:
        100:0  2 (_ #<hash-table 414aa60 0/31> "/var/guix/profiles/per-…" …)
    In guix/scripts/pull.scm:
       363:21  1 (_)
    In guix/inferior.scm:
        151:7  0 (port->inferior _ _)

    guix/inferior.scm:151:7: In procedure port->inferior:
    no binding `console-setup' in module (gnu packages xorg)
  #+end_example

Any ideas?

 * Adding a swap device from a file on disk

Something like this:

~ sudo file /mnt/swapfile
Password:
/mnt/swapfile: Linux/i386 swap file (new style) with SWSUSP1 image

(operating-system
   ...
   (swap-devices '("/mnt/swapfile"))
   ...
   )

But fails with:

#+begin_example
  guix system: error: exception caught while executing 'start' on service 'swap-/mnt/swapfile':
  In procedure swapon: "/mnt/swapfile": Invalid argument
#+end_example

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

* Re: Noob issues with maintaining a guix laptop system
  2019-06-03 14:44 Noob issues with maintaining a guix laptop system Divan Santana
@ 2019-06-04  6:17 ` ison
  2019-06-04  7:11   ` Julien Lepiller
  0 siblings, 1 reply; 4+ messages in thread
From: ison @ 2019-06-04  6:17 UTC (permalink / raw)
  To: Divan Santana; +Cc: help-guix

Just to be clear, when a reconfigure fails you can make any necessary changes
and run it again. Guix operations are atomic so it doesn't actually change the
state of your system in any way until it finishes.

But, if you're asking about rolling back the "guix pull" so that you can run
reconfigure with the older versions as if you had never ran "guix pull" in the
first place, then I think you could try this:
guix describe
which should print out the "commit" used when you last reconfigured the system.
Then you could try the following command with <commit-string> replaced with the
value you got above:
guix pull --commit=<commit-string>
That should make sure your package data matches what was used last time you
successfully reconfigured.

As for the swapfile, it should work exactly how you showed.
That error makes me think the problem is with how you set up the swapfile. Did
you run "dd" to allocate space for the swapfile?

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

* Re: Noob issues with maintaining a guix laptop system
  2019-06-04  6:17 ` ison
@ 2019-06-04  7:11   ` Julien Lepiller
  2019-06-05 18:27     ` Divan Santana
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Lepiller @ 2019-06-04  7:11 UTC (permalink / raw)
  To: help-guix, ison, Divan Santana

Le 4 juin 2019 08:17:11 GMT+02:00, ison <ison@airmail.cc> a écrit :
>Just to be clear, when a reconfigure fails you can make any necessary
>changes
>and run it again. Guix operations are atomic so it doesn't actually
>change the
>state of your system in any way until it finishes.
>
>But, if you're asking about rolling back the "guix pull" so that you
>can run
>reconfigure with the older versions as if you had never ran "guix pull"
>in the
>first place, then I think you could try this:
>guix describe
>which should print out the "commit" used when you last reconfigured the
>system.
>Then you could try the following command with <commit-string> replaced
>with the
>value you got above:
>guix pull --commit=<commit-string>
>That should make sure your package data matches what was used last time
>you
>successfully reconfigured.

That's a good suggestion, except guix describe will tell you the connit of the currently installed guix, which is the one you've guix pull'ed to.

I thenk you can use guix package to manage the guix pull profile, like so:

guix package -p /var/guix/profiles/per-user/current-guix --list-generations

You can also use --roll-back or switch directly to an older generation.

But in general I think it would be better for you to report your failure(s) so we can help and fix them :)

>
>As for the swapfile, it should work exactly how you showed.
>That error makes me think the problem is with how you set up the
>swapfile. Did
>you run "dd" to allocate space for the swapfile?

And run mkswap on it?

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

* Re: Noob issues with maintaining a guix laptop system
  2019-06-04  7:11   ` Julien Lepiller
@ 2019-06-05 18:27     ` Divan Santana
  0 siblings, 0 replies; 4+ messages in thread
From: Divan Santana @ 2019-06-05 18:27 UTC (permalink / raw)
  To: Julien Lepiller, help-guix, ison

Julien Lepiller <julien@lepiller.eu> writes:

> Le 4 juin 2019 08:17:11 GMT+02:00, ison <ison@airmail.cc> a écrit :
>>Just to be clear, when a reconfigure fails you can make any necessary
>>changes
>>and run it again. Guix operations are atomic so it doesn't actually
>>change the
>>state of your system in any way until it finishes.
>>
>>But, if you're asking about rolling back the "guix pull" so that you
>>can run
>>reconfigure with the older versions as if you had never ran "guix pull"
>>in the
>>first place, then I think you could try this:
>>guix describe
>>which should print out the "commit" used when you last reconfigured the
>>system.
>>Then you could try the following command with <commit-string> replaced
>>with the
>>value you got above:
>>guix pull --commit=<commit-string>
>>That should make sure your package data matches what was used last time
>>you
>>successfully reconfigured.

Cool, I'll note for next time it happens and report back if I get stuck.

Thanks a lot

> That's a good suggestion, except guix describe will tell you the connit of the currently installed guix, which is the one you've guix pull'ed to.
>
> I thenk you can use guix package to manage the guix pull profile, like so:
>
> guix package -p /var/guix/profiles/per-user/current-guix --list-generations
>
> You can also use --roll-back or switch directly to an older generation.
>
> But in general I think it would be better for you to report your failure(s) so we can help and fix them :)
>
>>
>>As for the swapfile, it should work exactly how you showed.
>>That error makes me think the problem is with how you set up the
>>swapfile. Did
>>you run "dd" to allocate space for the swapfile?
>
> And run mkswap on it?

I thought I did that, but perhaps not.

Either way, your guys advise helped, it's working now, after a mkswap. Thanks!

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

end of thread, other threads:[~2019-06-05 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-03 14:44 Noob issues with maintaining a guix laptop system Divan Santana
2019-06-04  6:17 ` ison
2019-06-04  7:11   ` Julien Lepiller
2019-06-05 18:27     ` Divan Santana

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.