;; -*-scheme-*- ;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. ;; To build a disk image for a virtual machine, do ;; ;; ./pre-inst-env guix system image --target=i586-pc-gnu \ ;; gnu/system/examples/bare-hurd.tmpl ;; ;; You may run it like so ;; ;; guix environment --ad-hoc qemu -- qemu-system-i386 -enable-kvm -m 512M \ ;; -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \ ;; -snapshot -hda ;; ;; and use it like ;; ;; ssh -p 10022 root@localhost ;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' ;; ;; or even (if you use --image-size=3G) ;; ;; guix build hello (use-modules (gnu) (gnu system hurd) (guix utils)) (use-service-modules ssh) (use-package-modules ssh) (define %hurd-os (operating-system (inherit %hurd-default-operating-system) (bootloader (bootloader-configuration (bootloader grub-minimal-bootloader) (target "/dev/sdX"))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext2")) %base-file-systems)) (host-name "guixygnu") (timezone "Europe/Amsterdam") (users (cons (user-account (name "guix") (comment "Anonymous Hurd Hacker") (group "users") (supplementary-groups '("wheel"))) %base-user-accounts)) (packages (cons openssh-sans-x %base-packages/hurd)) (services (cons (service openssh-service-type (openssh-configuration (openssh openssh-sans-x) (port-number 2222) (permit-root-login #t) (allow-empty-passwords? #t) (password-authentication? #t))) %base-services/hurd)))) %hurd-os path: root/tests/boot-parameters.scm
AgeCommit message (Expand)Author
2020-12-21system: Allow separated /boot and encrypted root....* gnu/bootloader/grub.scm (grub-configuration-file): New parameter store-crypto-devices. [crypto-devices]: New helper function. [builder]: Use crypto-devices. * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * gnu/tests/install.scm (%encrypted-root-not-boot-os, %encrypted-root-not-boot-os): New os declaration. (%encrypted-root-not-boot-installation-script): New script, whose contents were initially taken from %encrypted-root-installation-script. (%test-encrypted-root-not-boot-os): New test. * gnu/system.scm (define-module): Export operating-system-bootoader-crypto-devices and boot-parameters-store-crypto-devices. (<boot-parameters>): Add field store-crypto-devices. (read-boot-parameters): Parse store-crypto-devices field. [uuid-sexp->uuid]: New helper function extracted from device-sexp->device. (operating-system-bootloader-crypto-devices): New function. (operating-system-bootcfg): Use operating-system-bootloader-crypto-devices to provide its contents to the bootloader configuration generation process. (operating-system-boot-parameters): Add store-crypto-devices to the generated boot-parameters. (operating-system-boot-parameters-file): Likewise to the file with the serialized structure. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * tests/boot-parameters.scm (%default-store-crypto-devices): New variable. (%grub-boot-parameters, test-read-boot-parameters): Use %default-store-crypto-devices. (tests store-crypto-devices): New tests. Miguel Ángel Arruga Vivas
2020-11-01system: Add store-directory-prefix to boot-parameters....Fixes <http://issues.guix.gnu.org/44196> * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-directory-prefix. * gnu/system.scm (define-module): Export boot-parameters-store-directory-prefix. (<boot-parameters>)[store-directory-prefix]: New field. It is used to generate the correct paths when /gnu/store is installed on a btrfs subvolume whose name doesn't match the final runtime path, as the bootloader doesn't have knowledge about the final mounting points. [boot-parameters-store-directory-prefix]: New accessor. (read-boot-parameters): Read directory-prefix from store field. (operating-system-boot-parameters-file): Add directory-prefix to store field. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-directory-prefix. * test/boot-parameters.scm (%default-btrfs-subvolume, %default-store-directory-prefix): New variables. (%grub-boot-parameters): Use %default-store-directory-prefix. (%default-operating-system): Use %default-btrfs-subvolume. (test-boot-parameters): Add directory-prefix. (test optional fields): Add test for directory-prefix. (test os store-directory-prefix): New test. Miguel Ángel Arruga Vivas
2020-10-18system: Add locale to boot-parameters....* gnu/system.scm (define-module)[export]: Add boot-parameters-locale. (<boot-parameters>)[locale]: New field. [boot-parameters-locale]: New accessor. (read-boot-parameters): Read locale field. (operating-system-boot-parameters): Provide operating-system locale to boot-parameters record. (opeating-system-boot-parameters-file): Likewise. * Makefile.am (SCM_TESTS): Add tests/boot-parameters.scm. * tests/boot-parameters.scm: New test file. Miguel Ángel Arruga Vivas