This would not work when /boot is a separate partition, as reported by
Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>.
This fixes a regression introduced in 39d1f82.
* gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of
symlinking it, as was the case before 39d1f82.
* gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter.
Make it a permanent GC root instead of an indirect GC root.
(initialize-hard-disk): Adjust accordingly.
* guix/scripts/system.scm (install-grub*): Replace use of
'add-indirect-root' by the addition of a permanent GC root in
%GC-ROOTS-DIRECTORY.
Fixes <http://bugs.gnu.org/19160>.
* guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an
indirect GC root.
* gnu/build/install.scm (install-grub): Make TARGET a symlink.
* gnu/build/vm.scm (register-grub.cfg-root): New procedure.
(initialize-hard-disk): Use it.
* gnu/build/install.scm (directives): Remove "/bin/sh".
* gnu/build/activation.scm (activate-/bin/sh): New procedure.
* gnu/system.scm (operating-system-activation-script): Use it.
* gnu/build/install.scm (evaluate-populate-directive): Wrap body in
"catch 'system-error", and report clear errors. In the symlink case,
retry up EEXIST.
(populate-root-file-system): Remove /var/guix/profiles/system-1-link
before attempting to create it.