all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/8] WIP: Better support for non-grub bootloaders.
@ 2017-02-14 15:28 David Craven
  2017-02-14 15:28 ` [PATCH 1/8] file-systems: Add FAT32 support David Craven
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: David Craven @ 2017-02-14 15:28 UTC (permalink / raw)
  To: guix-devel

These patches make changes to the bootloader API and will break operating-system's
and some scripts (--no-grub is renamed to --no-bootloader).

I would like some feedback on the API and also ideas on how to handle API changes
with minimal discomfort to our users.

The most interesting commit is 8a01985d7a936809102b10d494dc2286b3f8c6f2 which defines
a <bootloader-configuration> record. extlinux-configuration, grub-configuration and
syslinux-configuration are designed as transformation passes on a bootloader-configuration
record. The idea is that someone that wants to add support for a new bootloader can
use

(bootloader (bootloader-configuration
             ...))

and users that want to use a supported bootloader can configure it like this

(bootloader (grub-configuration
             (bootloader-configuration
              (device "/dev/sda1"))))

another important API change is that an operating-system does not need to set
the bootloader when it is only intended to run through guix system vm or on
an embedded system that has an extlinux compatible bootloader in ROM.

Things that don't work yet:
* system tests are broken due to API changes
* grub-efi needs an installation procedure and the vm code needs
  support for alternative firmware like ovmf, gpt partition table
  and EFI boot partition.
* The syslinux and grub bootloader configurations still require
  guix/scripts/system.scm to handle the new API on init and reconfigure
  and requires extensive testing on real hardware.
* No automated system tests yet.

Here is an example for testing:

(use-modules (gnu) (gnu system bootloader))

;; defaults to extlinux-configuration
;; works for everything that only requires a gc-root and for most
;; embedded systems that have a bootloader in rom.
(define extlinux-os
  (operating-system
    (host-name "host-name")
    (timezone "Europe/Zurich")
    (file-systems
     (cons
      (file-system
        (device "my-root")
        (title 'label)
        (mount-point "/")
        (type "ext4"))
      %base-file-systems))))

(define syslinux-os
  (operating-system
    (inherit extlinux-os)
    (bootloader (syslinux-configuration))))

(define grub-os
  (operating-system
    (inherit extlinux-os)
    (bootloader (grub-configuration))))

(define grub-efi-os
  (operating-system
    (inherit extlinux-os)
    (bootloader (grub-efi-configuration))

    (file-systems (cons
                   (file-system
                     (device "my-efi")
                     (title 'label)
                     (mount-point "/boot")
                     (type "vfat")
                     (needed-for-boot? #t))
                   (operating-system-file-systems extlinux-os)))))

;; Test with $(./pre-inst-env guix system vm bootloader-test.scm --full-boot)
syslinux-os

David Craven (8):
  file-systems: Add FAT32 support.
  system: Pass <bootloader-parameter> to grub.
  system: Add extlinux support.
  scripts: system: Rename --no-grub option to --no-bootloader.
  vm: Remove hard coded kernel file name.
  vm: Improve readability of run-vm.sh generation.
  vm: Fix full-boot? option.
  bootloader: Add install procedures and use them.

 gnu/build/file-systems.scm |  66 +++++++++++++--
 gnu/build/install.scm      |  36 ++------
 gnu/build/vm.scm           |  17 ++--
 gnu/local.mk               |   1 +
 gnu/system.scm             |  31 ++++---
 gnu/system/bootloader.scm  | 205 +++++++++++++++++++++++++++++++++++++++++++++
 gnu/system/grub.scm        |  41 ++++++---
 gnu/system/vm.scm          | 140 ++++++++++++++++++-------------
 guix/scripts/system.scm    |  48 +++++------
 tests/guix-system.sh       |   2 -
 tests/system.scm           |   2 -
 11 files changed, 435 insertions(+), 154 deletions(-)
 create mode 100644 gnu/system/bootloader.scm

--
2.11.1

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

end of thread, other threads:[~2017-03-18 17:25 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 15:28 [PATCH 0/8] WIP: Better support for non-grub bootloaders David Craven
2017-02-14 15:28 ` [PATCH 1/8] file-systems: Add FAT32 support David Craven
2017-03-01 16:30   ` Danny Milosavljevic
2017-02-14 15:28 ` [PATCH 2/8] system: Pass <bootloader-parameter> to grub David Craven
2017-02-14 15:28 ` [PATCH 2/8] system: Pass <boot-parameters> " David Craven
2017-02-14 15:28 ` [PATCH 3/8] system: Add extlinux support David Craven
2017-02-14 15:28 ` [PATCH 4/8] scripts: system: Rename --no-grub option to --no-bootloader David Craven
2017-02-14 15:28 ` [PATCH 5/8] vm: Remove hard coded kernel file name David Craven
2017-02-28 22:48   ` Danny Milosavljevic
2017-02-14 15:28 ` [PATCH 6/8] vm: Improve readability of run-vm.sh generation David Craven
2017-02-28 23:44   ` Danny Milosavljevic
2017-02-14 15:28 ` [PATCH 7/8] vm: Fix full-boot? option David Craven
2017-03-06 22:44   ` Ludovic Courtès
2017-02-14 15:28 ` [PATCH 8/8] bootloader: Add install procedures and use them David Craven
2017-03-06 22:04 ` [PATCH 0/8] WIP: Better support for non-grub bootloaders Ludovic Courtès
2017-03-17 12:43   ` Mathieu Othacehe
2017-03-17 12:49     ` John Darrington
2017-03-18 13:53       ` Ludovic Courtès
2017-03-18 17:25         ` David Craven

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.