Fix a boot problem reported by ng0

2016-11-03 Thread cmmarusich
As you know, ng0 was having trouble booting into GuixSD after 1ef8b72a7f87afe7cffe52393d99e1b14e4770e1. When I looked closely at the change, I realized we were not doing the right thing in all cases. Here is a patch to fix that. I've confirmed via manual testing in a QEMU image that when using a

[PATCH] system: Avoid using device paths in device field.

2016-11-03 Thread cmmarusich
From: Chris Marusich This fixes a regression introduced by 1ef8b72a7f87afe7cffe52393d99e1b14e4770e1, in which we would incorrectly use a device path in a label-based grub root search command, e.g. 'search --label --set /dev/sda4'. * gnu/system.scm (grub-device): New procedure. (operating-system-

[PATCH 4/5] install: Extract procedure: install-grub-config.

2016-11-01 Thread cmmarusich
From: Chris Marusich * gnu/build/install.scm (install-grub-config): New procedure. (install-grub): Use it. --- gnu/build/install.scm | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 7431a09..3d1594e 1

[PATCH 1/5] profiles: Extract a procedure for getting relative generation numbers.

2016-11-01 Thread cmmarusich
From: Chris Marusich * guix/profiles.scm (relative-generation-spec->number): New procedure. * guix/scripts/package.scm (switch-generation-action): Use it. --- guix/profiles.scm| 19 +++ guix/scripts/package.scm | 8 ++-- 2 files changed, 21 insertions(+), 6 deletions

[PATCH 2/5] system: Rename previous-grub-entries to profile-grub-entries.

2016-11-01 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (previous-grub-entries, profile-grub-entries): Rename previous-grub-entries to profile-grub-entries to indicate that it is stateful and returns the entries for all profile generations, not just the previous ones. Update all callers. --- guix/script

[PATCH 5/5] system: Add 'guix system' actions: switch-generation and roll-back.

2016-11-01 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (roll-back-system, switch-to-system-generation): new actions. (reinstall-grub): New procedure, used by switch-to-system-generation. (show-help, process-command, guix-system): Honor the new actions. * doc/guix.texi (Invoking guix system) : Add the new

Follow-up: Add system roll-back and switch-generation commands

2016-11-01 Thread cmmarusich
This patch series builds on 1ef8b72a7f87afe7cffe52393d99e1b14e4770e1 to add two new 'guix system' actions: roll-back and switch-generation. I've verified that both 'make check' and 'make check-system' pass (with the exception of the system tests 'nss-mdns' and 'encrypted-root-os', which both fail

[PATCH 3/5] system: Optionally limit the entries returned by profile-grub-entries.

2016-11-01 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (profile-grub-entries): Add an optional parameter which allows the caller to limit the number of returned grub entries. --- guix/scripts/system.scm | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/scripts/system.scm

[PATCH 07/10] Factor out procedure: install-grub-config

2016-10-28 Thread cmmarusich
From: Chris Marusich * gnu/build/install (install-grub, install-grub-config): Extract code from 'install-grub' into a new procedure 'install-grub-config'. Also, define 'install-grub' using define, not define*, since it makes no use of the extra features that define* provides. --- gnu/buil

[PATCH 03/10] Refactor grub.cfg generation logic

2016-10-28 Thread cmmarusich
From: Chris Marusich This enables the implementation of 'guix system switch-generation' and 'guix system roll-back'. Those new commands will only be able to determine the store device and mount point for a given system generation by reading them from that generation's boot parameters file, which

[PATCH 02/10] Add 'device' field to

2016-10-28 Thread cmmarusich
From: Chris Marusich * gnu/system/grub.scm (): add field 'device'. * gnu/system.scm (grub-configuration-file): use a dummy value for 'device'. * guix/scripts/system.scm (previous-grub-entries): use a dummy value for 'device'. In a future commit, we will restructure the grub.cfg generation lo

[PATCH 06/10] grub-entries: take a list of numbers on input

2016-10-28 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (grub-entries): Add an optional parameter which allows the caller to limit the grub entries that get returned. --- guix/scripts/system.scm | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/scripts/system.scm b/guix/

[PATCH 09/10] Rename grub-entries to profile-grub-entries

2016-10-28 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (grub-entries): Rename this procedure to 'profile-grub-entries'. Update all callers. --- guix/scripts/system.scm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 0

[PATCH 01/10] * gnu/system.scm (): Add 'store-device' and 'store-fs-mount-point'.

2016-10-28 Thread cmmarusich
From: Chris Marusich In a future commit, we will restructure the grub.cfg generation logic to use this information, to enable the implementation of 'guix system switch-generation' and 'guix system roll-back'. --- gnu/system.scm | 58 +- 1 f

[PATCH 08/10] Implement switch-generation and roll-back

2016-10-28 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (roll-back-system, switch-to-system-generation, reinstall-grub): New procedures. * guix/scripts/system.scm (show-help, process-command, guix-system): Add references to the new actions. --- guix/scripts/system.scm | 97 ++

[PATCH 04/10] Extract procedure: relative-generation-spec->number

2016-10-28 Thread cmmarusich
From: Chris Marusich * guix/scripts/package.scm (switch-generation-action): Extract code from here... * guix/profiles.scm (relative-generation-spec->number): into this new procedure here. --- guix/profiles.scm| 17 + guix/scripts/package.scm | 8 ++-- 2 files ch

[PATCH 10/10] Mention new 'guix system' features in the manual

2016-10-28 Thread cmmarusich
From: Chris Marusich * doc/guix.texi (GRUB Configuration, Invoking guix system): Mention the new field 'device', update the custom example, and mention the new actions 'guix system roll-back' and 'guix system switch-generation' in the manual. * gnu/system/grub.scm (strip-mount-point): Ad

[PATCH 05/10] Rename previous-grub-entries to grub-entries

2016-10-28 Thread cmmarusich
From: Chris Marusich * guix/scripts/system.scm (previous-grub-entries): rename this procedure to grub-entries. Update all callers. This procedure actually returns an entry for every generation of the profile, so its name is confusing if it suggests that it only returns "previous" entries. ---

Add system roll-back and switch-generation commands

2016-10-28 Thread cmmarusich
Hi, This patch series adds 'guix system roll-back' and 'guix system switch-generation' commands. It should apply cleanly to the current master branch. I've tested the patches manually on a VM with a single disk, and a VM with multiple disks (with the store on a separate disk). Two of the "check