Commit Graph

40 Commits

Author SHA1 Message Date
Leo Famulari c48a145fbb
system: grub: Actually default to 'gfxterm' for displaying the GRUB menu.
This is a followup to commit e0b2e93005.

* gnu/system/grub.scm (eye-candy): Re-order the elements of the generated
GRUB configuration.
2017-05-15 16:22:17 -04:00
Leo Famulari e0b2e93005
system: grub: Expose GRUB's interactive interface settings.
* gnu/system/grub.scm (<grub-configuration>): Add new fields
terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
(grub-setup-io, setup-gfxterm): New procedures.
* doc/guix.texi (GRUB Configuration): Document the new fields.
2017-05-14 14:12:26 -04:00
Ludovic Courtès 76f429ad9b
system: grub: Use the native Guile-Cairo and Guile-SVG.
* gnu/system/grub.scm (svg->png): Use 'ungexp-native' aka. #+ when
referring to GUILE-CAIRO, GUILE-SVG, and SVG.
2017-05-09 00:18:05 +02:00
Danny Milosavljevic bf8b09169c
system: grub: Use boot-parameters instead of menu-entry where possible.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters
instead of menu-entry where possible.
* guix/scripts/system.scm (profile-boot-parameters): Update docstring.
(reinstall-grub): Use profile-boot-parameters.
(perform-action): Use profile-boot-parameters.
2017-05-05 15:03:48 +02:00
Danny Milosavljevic 958a1fda9e
system: Make grub use <menu-entry> instead of <boot-parameters> again.
* gnu/system/grub.scm: Remove boot-parameters->menu-entry.
(grub-configuration): Don't use boot-parameters->menu-entry.
* gnu/system.scm (operating-system-bootcfg): Use menu-entry.
* guix/scripts/system.scm (reinstall-grub): Use profile-grub-entries.
(perform-action): Use profile-grub-entries.
2017-04-15 22:02:38 +02:00
Mathieu Othacehe 2e58e05bb6
system: Pass boot-parameters to (gnu system grub).
* gnu/system.scm (operating-system-bootcfg): Pass boot-parameters.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters->menu-entry.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 16:37:55 +02:00
Danny Milosavljevic 0ab1e8ae88
system: grub: Use (first all-entries) instead of (first entries).
* gnu/system/grub.scm (grub-configuration-file): Use (first all-entries)
instead of (first entries).
2017-04-15 15:49:47 +02:00
Ludovic Courtès 5f19fb6a26
system: grub: Don't attempt to load non-EFI modules on EFI.
This resulted in a couple of harmless warnings just before the menu is
displayed.

* gnu/system/grub.scm (eye-candy)[setup-gfxterm-body]: Move 'vbe' and
'vga' loading to the non-EFI branch.
2017-03-25 22:50:24 +01:00
Ludovic Courtès ecc4324fef
system: grub: Add missing URL in comment.
* gnu/system/grub.scm (grub-root-search): Add missing URL in comment.
2017-03-06 23:54:48 +01:00
David Craven 862e38d551
gnu: Move (gnu packages grub) and (gnu packages u-boot) ...
to (gnu packages bootloaders).

* gnu/packages/grub.scm: Rename to bootloaders.scm.
* gnu/packages/u-boot.scm: Move to bootloaders.scm.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add bootloaders.scm,
  remove grub.scm and u-boot.scm;
* gnu/system/grub.scm: Import (gnu packages bootloaders).
* gnu/system/install.scm: Import (gnu packages bootloaders).
* gnu/system/vm.scm: Import (gnu packages bootloaders).
2017-02-10 17:15:35 +01:00
Ludovic Courtès 357db1f91d
system: More 'file-append' instead of #~(string-append #$thing …).
* gnu/system/shadow.scm (<user-account>)[shell]: Use 'file-append'.
(%base-user-accounts): Likewise.
* gnu/system/grub.scm (%background-image): Likewise.
2017-02-01 12:36:41 +01:00
Ludovic Courtès 4d0a3d8e9f
system: grub: Load relevant EFI modules on EFI systems.
* gnu/system/grub.scm (eye-candy)[setup-gfxterm-body]: Add 'insmod'
invocations when ${grub_platform} is "efi".
2017-01-03 18:16:01 +01:00
Marius Bakke 81bf2ccbc4
system: Use grub from bootloader configuration.
* gnu/system/grub.scm (gnu): Export grub-configuration-grub.
* guix/scripts/system.scm (perform-action): Use it.
(define-module): Don't import (gnu packages grub).

Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
2016-11-08 14:35:05 +00:00
Chris Marusich 1ef8b72a7f
system: Record store file system info in each generation.
* gnu/system.scm (<boot-parameters>)[store-device, store-mount-point]:
New fields.
(read-boot-parameters): Initialize them.
(operating-system-grub.cfg): Likewise.  Remove STORE-FS argument from
call to 'grub-configuration-file'.
(operating-system-parameters-file): Add 'store' element in
'boot-parameters'.
* gnu/system/grub.scm (strip-mount-point): Replace 'store-fs' parameter
by 'mount-point'; adjust accordingly.  Adjust callers.
(<menu-entry>)[device, device-mount-point]: New fields.
(eye-candy): Replace 'root-fs' parameter by 'store-device'; add
'store-mount-point'.  Use keyword arguments for 'system' and 'port'.
(grub-root-search): Remove 'root-fs' by 'device' and adjust
accordingly.
(grub-configuration-file): Remove 'store-fs' parameter.  Adjust
accordingly.
* guix/scripts/system.scm (previous-grub-entries): Initialize 'device'
and 'device-mount-point' fields from PARAMS.
* doc/guix.texi (GRUB Configuration): Document 'device' and
'device-mount-point'.  Explain that 'linux' can be prefixed by a GRUB
device name.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-10-30 22:59:46 +01:00
Ludovic Courtès ffde82c9ec
system: grub: Use Guile-{RSVG,Cairo} instead of Inkscape + ImageMagick.
Based on a suggestion by Andy Wingo at
<https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00753.html>.

* gnu/build/svg.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/system/grub.scm (svg->png): Add #:width and #:height.  Rewrite to
use (gnu build svg).
(resize-image): Remove.
(grub-background-image): Adjust accordingly.
2016-10-25 01:21:28 +02:00
Ludovic Courtès 5babe521c8
system: Don't emit a GRUB 'search' command when passed a GRUB file name.
Reported by Tomáš Čech <tcech@suse.com>
at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20067#26>.

* gnu/system/grub.scm (grub-root-search): Don't emit anything when FILE
is a string that does not denote an absolute file name.
2016-09-26 00:18:39 +09:00
Carlos Sánchez de La Lama 0f65f54ebd
system: grub.cfg uses correct file names when store is not in root partition.
Fixes <http://bugs.gnu.org/24346>.
Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama).

* guix/scripts/system.scm (previous-grub-entries): Get the initrd file
name from PARAMS.
* gnu/system.scm (operating-system-grub.cfg): Use
'operating-system-initrd-file' to retrieve the initrd file name.
* gnu/system/grub.scm (strip-mount-point): New procedure.
(grub-configuration-file)[entry->gexp]: Call 'strip-mount-point' for
LINUX and INITRD.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-09-24 17:48:13 +09:00
Ludovic Courtès 44d5f54e31
system: grub: Allow arbitrary kernel file names in 'menu-entry'.
Fixes <http://bugs.gnu.org/20067>.
Reported by Tomáš Čech <sleep_walker@suse.cz>.

* gnu/system.scm (system-linux-image-file-name)
(operating-system-kernel-file): New procedures.
(operating-system-grub.cfg): Use 'operating-system-kernel-file' for the
'kernel' field of 'menu-entry'.
(operating-system-parameters-file): Likewise for the 'kernel' entry.
(read-boot-parameters): Adjust 'kernel' field so that it contains the
absolute file name of the image.
* gnu/system/grub.scm (grub-configuration-file)[linux-image-name]:
Remove.
[entry->gexp]: Assume LINUX is the absolute file name of the kernel
image.
* doc/guix.texi (GRUB Configuration): Add an example, and adjust
'kernel' field documentation accordingly.
2016-09-09 23:54:43 +02:00
John Darrington fdf14c64f1
gnu: Add edit warning to generated grub.cfg files
* gnu/services/grub.scm (grub-configuration-file): Add code to emit warning.
2016-09-08 18:08:29 +02:00
Ludovic Courtès 6b779207ee system: grub: Search root device by label or UUID if possible.
Fixes <http://bugs.gnu.org/22281>.
Reported by Christopher Allan Webber <cwebber@dustycloud.org>.

* gnu/system/grub.scm (eye-candy): Add 'root-fs' parameter.  Replace
'search --file' command in the output with whatever 'grub-root-search'
returns.
(grub-root-search): New procedure.
(grub-configuration-file): Add 'store-fs' parameter.  Use
'grub-root-search' instead of hard-coded 'search --file' commands.
* gnu/system.scm (store-file-system,
operating-system-store-file-system): New procedures.
(operating-system-grub.cfg): Use it, and adjust call to
'grub-configuration-file'.
* tests/system.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2016-01-22 00:02:52 +01:00
Ludovic Courtès 6394fe650e system: grub: Use a bigger background image.
* gnu/system/grub.scm (grub-background-image): Increase the default
  values of WIDTH and HEIGHT.  After all, it's 2015 already!
2015-11-02 09:54:21 +01:00
Ludovic Courtès 122c3a1d67 system: grub: Let GRUB choose the best graphics mode.
On PCs, it means that it will typically choose resolutions higher
than 640x480, which is nicer.

* gnu/system/grub.scm (eye-candy)[setup-gfxterm-body]: Leave 'gfxmode'
  unset.
2015-10-29 19:07:57 +01:00
Mark H Weaver 6b173ac004 system: grub: Adjust eye-candy to work on non-Intel systems.
* gnu/system/grub.scm (eye-candy): Accept additional 'system' argument.  Add
  local 'setup-gfxterm-body' variable.  Replace the 'load_video' grub function
  with 'setup_gfxterm', which includes everything in the 'if loadfont' form on
  Intel systems, but is empty on non-Intel.
  (grub-configuration-file): Pass 'system' to 'eye-candy.
2015-10-27 21:44:46 +01:00
Mark H Weaver c448bf7443 system: grub: On MIPS, the linux image name is vmlinuz, not bzImage.
* gnu/system/grub.scm (grub-configuration-file): Add 'linux-image-name'
  internal procedure.  Use it from 'entry->gexp'.
2015-10-27 21:44:46 +01:00
Ludovic Courtès cf2abac8ec artwork: Update to latest version.
* gnu/artwork.scm (%artwork-repository): Update.
* gnu/services/xorg.scm (%default-slim-theme-name): Change to "0.x".
* gnu/system/grub.scm (%background-image): Change to
  GuixSD-fully-black-4-3.svg.
2015-05-07 23:11:23 +02:00
Ludovic Courtès 9c09760a78 artwork: Update snapshot to GuixSD branding.
* gnu/artwork.scm (%artwork-repository): Update to new "GuixSD"
  branding.
* gnu/system/grub.scm (%background-image, %default-theme): Adjust
  accordingly.
2015-02-12 23:43:18 +01:00
Ludovic Courtès ccc2678b0d system: grub: Make sure the font and background image are always found.
* gnu/system/grub.scm (eye-candy): Add 'search --file --set'.
2014-12-13 22:15:01 +01:00
Ludovic Courtès 6c777cf88c system: Adjust 'grub.cfg' to work on systems with a separate /boot.
Fixes <http://bugs.gnu.org/19220>.
Reported by Nikita Karetnikov <nikita@karetnikov.org>.

* gnu/system/grub.scm (grub-configuration-file)[entry->gexp]: Add
  'search --file --set'.
  (grub-configuration-file)[builder]: Remove 'search.file'.
2014-12-13 22:13:57 +01:00
Ludovic Courtès 84dfb45821 gnu: Introduce (gnu artwork) module.
* gnu/artwork.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/xorg.scm: Use it.
  (%artwork-repository): Remove.
* gnu/system/grub.scm: Use it.
  (%artwork-repository): Remove.
2014-11-12 14:28:36 +01:00
Ludovic Courtès 28567712f3 system: grub: Adjust default theme color.
* gnu/system/grub.scm (%default-theme)[color-highlight]: Change
  foreground to cyan, as suggested by Felipe López.
2014-11-08 22:34:24 +01:00
Ludovic Courtès 99ae9ceb18 system: grub: Add preliminary support for themes.
* gnu/system/grub.scm (<grub-image>, <grub-theme>): New record types.
  (%artwork-repository, %background-image): New variables.
  (<grub-configuration>)[theme]: New field.
  (svg->png, resize-image, grub-background-image, eye-candy): New
  procedures.
  (grub-configuration-file): Use 'eye-candy' and add it in BUILDER.
2014-11-08 15:10:42 +01:00
Mark H Weaver 2f7f32003f system: grub: Change the default default-entry to 0.
* gnu/system/grub.scm (<grub-configuration>)[default-entry]: Change the
  default to 0.
2014-08-13 12:56:25 -04:00
Ludovic Courtès fe6e3fe2a5 system: Support the addition of old entries in the GRUB menu.
* gnu/system.scm (operating-system-grub.cfg): Add 'old-entries'
  parameter.  Pass it to 'grub-configuration-file'.
* gnu/system/grub.scm (grub-configuration-file): Add #:old-entries
  parameter.  Honor it.
2014-06-25 23:53:27 +02:00
Ludovic Courtès d5b429abda system: Add 'grub-configuration' record.
* gnu/system/grub.scm (<grub-configuration>): New record type.
  (grub-configuration-file): Add 'config' parameter; remove
  #:default-entry and #:timeout.  Honor CONFIG.
* gnu/system.scm (<operating-system>): Remove 'bootloader-entries'
  field; remove default value for 'bootloader' field.
  (operating-system-grub.cfg): Pass the 'bootloader' field to
  'grub-configuration-file'.
* build-aux/hydra/demo-os.scm (bootloader): New field.
2014-05-18 22:27:23 +02:00
Ludovic Courtès f6a7b21df7 system: grub: Rewrite using gexps.
* gnu/system/grub.scm (grub-configuration-file): Rewrite using
  'gexp->derivation'.
* gnu/system.scm (operating-system-derivation): Adjust accordingly.
2014-04-28 23:41:08 +02:00
Ludovic Courtès 735c6dd7fa gnu: Lower initrd makers from packages to monadic procedures.
* gnu/packages/linux-initrd.scm: Remove.
* gnu/system/linux-initrd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/system.scm (<operating-system>): Change default 'initrd' value
  to (gnu-system-initrd).
  (operating-system-derivation): Bind 'operating-system-initrd'.  Pass
  'menu-entry' an initrd file name instead of a package.
* gnu/system/grub.scm (grub-configuration-file): Expect 'initrd' to be
  file name.
2014-01-29 16:50:02 +01:00
Ludovic Courtès 033adfe7e0 gnu: Add (gnu system).
* gnu/system/vm.scm (lower-inputs): Move to monads.scm.
  (qemu-image): Don't add GRUB-CONFIGURATION to the INPUTS-TO-COPY.
  (union, file-union, etc-directory): Move to gnu/system.scm.
  (%demo-operating-system): New variable.
  (system-qemu-image): Add 'os' parameter.  Rewrite in terms of
  'operating-system-derivation'.
* guix/monads.scm (lower-inputs): New procedure.
* gnu/system/grub.scm (grub-configuration-file): Change 'entries' to be
  a plain list instead of a list of monadic values.
* gnu/system.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
2013-12-10 00:24:02 +01:00
Ludovic Courtès d9f0a23704 gnu: vm: Rewrite helper functions as monadic functions.
* gnu/system/dmd.scm (host-name-service, nscd-service, mingetty-service,
  syslog-service, guix-service, static-networking-service): Rewrite as
  monadic functions.
  (dmd-configuration-file): Use 'text-file' instead of
  'add-text-to-store'.
* gnu/system/grub.scm (grub-configuration-file): Rewrite as a monadic
  function.
* gnu/system/linux.scm (pam-services->directory): Likewise.
* gnu/system/shadow.scm (group-file, passwd-file, guix-build-accounts):
  Likewise.
* gnu/system/vm.scm (expression->derivation-in-linux-vm, qemu-image,
  union, system-qemu-image): Likewise.
2013-10-03 23:12:20 +02:00
Ludovic Courtès 59688fc4b5 derivations: 'derivation' and related procedures return a single value.
* guix/derivations.scm (derivation->output-path,
  derivation->output-paths): New procedures.
  (derivation-path->output-path): Use 'derivation->output-path'.
  (derivation-path->output-paths): Use 'derivation->output-paths'.
  (derivation): Accept 'derivation?' objects as inputs.  Return a single
  value.
  (build-derivations): New procedure.
  (compiled-modules): Use 'derivation->output-paths'.
  (build-expression->derivation)[source-path]: Add case for when the
  input matches 'derivation?'.
  [prologue]: Accept 'derivation?' objects in INPUTS.
  [mod-dir, go-dir]: Use 'derivation->output-path'.
* guix/download.scm (url-fetch): Adjust to the single-value return.
* guix/packages.scm (package-output): Use 'derivation->output-path'.
* guix/scripts/build.scm (guix-build): When the argument is
  'derivation-path?', pass it through 'read-derivation'.
  Use 'derivation-file-name' to print out the .drv file names, and to
  register them.  Use 'derivation->output-path' instead of
  'derivation-path->output-path'.
* guix/scripts/package.scm (roll-back): Adjust to the single-value
  return.
  (guix-package): Use 'derivation->output-path'.
* guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?'
  objects instead of .drv file names.
* gnu/system/grub.scm (grub-configuration-file): Use
  'derivation->output-path' instead of 'derivation-path->output-path'.
* gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm,
  tests/store.scm, tests/union.scm: Adjust to the new calling
  convention.
* doc/guix.texi (Defining Packages, The Store, Derivations): Adjust
  accordingly.
2013-09-18 18:49:53 +02:00
Ludovic Courtès 0ded70f37d gnu: Move helper code to (gnu system …) modules.
* gnu/packages/grub.scm (<menu-entry>, grub-configuration-file): Move
  to...
* gnu/system/grub.scm: ... here.  New file.
* gnu/packages/linux.scm (<pam-service>, <pam-entry>,
  pam-service->configuration, pam-service->directory,
  %pam-other-services, unix-pam-service): Move to...
* gnu/system/linux.scm: ... here.  New file.
* gnu/system/vm.scm (passwd-file): Move to...
* gnu/system/shadow.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add
  gnu/system/{grub,linux,shadow}.scm.
2013-09-11 22:36:50 +02:00