summaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
AgeCommit message (Collapse)Author
2017-12-16linux-boot: Add make-static-device-nodes.Danny Milosavljevic
* gnu/build/linux-boot.scm (make-static-device-nodes): New variable. (<device-node>): New variable. (read-static-device-nodes): New variable. (report-system-error): New variable. (catch-system-error): New variable. (create-device-node): New variable. (mkdir-p*): New variable. Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
2017-12-02linux-boot: Remove unneeded import.Ludovic Courtès
* gnu/build/linux-boot.scm: Remove unnecessary autoload of (system base compile).
2017-11-29linux-boot: Ensure /etc exists on the root file system.Ludovic Courtès
Fixes a regression introduced in c8289690365887ca1dd122645e479a89cf7cd969 whereby /etc would no longer be created as a result of calling 'mark-as-not-killable'. This would affect ISO images because 'make-iso9660-image' does not create /etc by default. In particular, the ISO installation image as created by the "iso-image-installer" test would fail to boot while creating the /root/etc/mtab symlink: <https://hydra.gnu.org/build/2352514/nixlog/9/raw>. * gnu/build/linux-boot.scm (mount-root-file-system): Make sure /root/etc exists.
2017-11-08build: Use overlayfs instead of unionfs.Hartmut Goebel
Overlayfs is part of the kernel, while unionfs needs FUSE. This also reduces the size of the initrd by ca. 4.3% (487K). * gnu/build/linux-boot.scm (mount-root-file-system): Remove optional parameter "unionfs"; mount using overlayfs instead of unionfs; new directory layout requied by overlayfs; update documentation. [mark-as-not-killable]: Remove now unused function * gnu/system/linux-initrd.scm (file-system-packages): Remove now unused packages "unionfs-fuse/static" and thus unused related 'if'. (linux-modules): Replace "fuse" by "overlay".
2017-10-11file-systems: 'mount-file-system' now takes a <file-system> object.Ludovic Courtès
* gnu/build/file-systems.scm (mount-file-system): Rename 'spec' to 'fs' and assume it's a <file-system>. * gnu/build/linux-boot.scm (boot-system): Assume MOUNTS is a list of <file-system> and adjust accordingly. * gnu/build/linux-container.scm (mount-file-systems): Remove 'file-system->spec' call. * gnu/services/base.scm (file-system-shepherd-service): Add 'spec->file-system' call. Add (gnu system file-systems) to 'modules'. * gnu/system/linux-initrd.scm (raw-initrd): Use (gnu system file-systems). Add 'spec->file-system' call for #:mounts.
2017-04-11build: Fix compilation warnings.Mathieu Othacehe
* gnu/build/linux-boot.scm (define-module): Use (guix build syscalls). * gnu/build/linux-modules.scm (define-module): Ditto. * gnu/build/file-systems (define-module): Stop re-exporting mount, umount and MS_* flags as this is now safe to include (guix build syscalls) instead. (mount): Remove procedure. (umount): Ditto. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-01-29Rename '/root/etc/dmd' directory and 'do-not-kill' file.Alex Kost
* gnu/services/base.scm (%do-not-kill-file): Rename to "/etc/shepherd/do-not-kill". * gnu/build/linux-boot.scm (mount-root-file-system): Rename "/root/etc/dmd" to "/root/etc/shepherd".
2016-01-05linux-boot: Remove verbose output for module loads.Ludovic Courtès
* gnu/build/linux-boot.scm (boot-system): Leave 'current-module-debugging-port' unchanged. * gnu/build/linux-modules.scm (load-linux-module*): Update comment about 'mmap'.
2015-09-20linux-boot: Mount /dev as a devtmpfs from the start.Ludovic Courtès
Suggested by Petter <petter@mykolab.ch> and Mark H Weaver <mhw@netris.org>. Reported by Duncan Keall <duncan@duncankeall.com>. Partly fixes <http://bugs.gnu.org/19190> by populating /dev/mapper early enough. * gnu/build/linux-boot.scm (mount-essential-file-systems): Mount /dev as a devtmpfs. (move-essential-file-systems): Add /dev. (mount-root-file-system): Mount /rw-root/dev as a devtmpfs instead of calling 'make-essential-device-nodes'. (boot-system): Remove call to 'make-essential-device-nodes'. * gnu/system/file-systems.scm (%devtmpfs-file-system): Remove. * doc/guix.texi (File Systems): Adjust accordingly.
2015-05-24gnu: linux-boot: Remove outdated and misleading comment.Ludovic Courtès
* gnu/build/linux-boot.scm (boot-system): Remove outdated comment.
2015-01-28linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.Ludovic Courtès
Reported Joshua Grant. Patch suggested by Mark H Weaver. * gnu/build/linux-boot.scm (mount-root-file-system): Use 'false-if-exception' instead of 'when (file-exists? ...)' to account for dangling symlinks.
2015-01-05linux-boot: Make /etc/mtab a symlink to /proc/self/mounts.宋文武
Fixes <http://bugs.gnu.org/19491>. * gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab a symlink to /proc/self/mounts. * gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab. * guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to #f.
2014-11-28linux-boot: Load modules and their dependencies, à la 'modprobe'.Ludovic Courtès
* gnu/build/linux-boot.scm: Use (gnu build linux-modules). (load-linux-module*): Remove. (boot-system): Add #:linux-module-directory parameter. [lookup-module]: New procedure. Call 'current-module-debugging-port'. Pass #:lookup-module to 'load-linux-module*'. Map LOOKUP-MODULE on LINUX-MODULES. * gnu/system/linux-initrd.scm (base-initrd): Adjust 'boot-system' call accordingly. Adjust #:modules argument as well. * gnu/system.scm (operating-system-activation-script)[%modules]: Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-11-26linux-boot: Call 'pre-mount' before 'mount-root-file-system'.Ludovic Courtès
Partly fixes <http://bugs.gnu.org/19190>. Reported by Nikita Karetnikov <nikita@karetnikov.org>. * gnu/build/linux-boot.scm (boot-system): Move PRE-MOUNT call before 'mount-root-file-system' is called.
2014-11-26linux-boot: Error out when 'pre-mount' returns #f.Ludovic Courtès
* gnu/build/linux-boot.scm (boot-system): Call 'error' when PRE-MOUNT returns #f.
2014-11-20linux-boot: Don't catch exceptions thrown by 'mount-root-file-system'.Ludovic Courtès
* gnu/build/linux-boot.scm (mount-root-file-system): Remove 'catch #t' around body. This was unneeded and even inconvenient because this procedure is called from within 'call-with-error-handling' already.
2014-11-13linux-boot: Make more disk partition block devices.Ludovic Courtès
Reported by nebuli on #guix. * gnu/build/linux-boot.scm (make-disk-device-nodes): Make 16 block devices for disk partitions.
2014-09-22system: Add support for boot-time mapped devices.Ludovic Courtès
* gnu/build/linux-boot.scm (boot-system): Add #:pre-mount parameter and honor it. * gnu/system/linux-initrd.scm (base-initrd): Add #:mapped-devices parameter. Add 'device-mapping-commands' variable, and use it to build the #:pre-mount argument of 'boot-system'. * gnu/system.scm (mapped-device-user, operating-system-user-mapped-devices, operating-system-boot-mapped-devices): New procedures. (device-mapping-services): Use 'operating-system-user-mapped-devices' instead of 'operating-system-mapped-devices'. (operating-system-initrd-file): Call the initrd with #:mapped-devices.
2014-09-18linux-initrd: Remove now obsolete #:guile-modules-in-chroot? parameter.Ludovic Courtès
* gnu/build/linux-boot.scm (boot-system): Remove #:guile-modules-in-chroot? and related code. * gnu/system/linux-initrd.scm (base-initrd): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove #:guile-modules-in-chroot? argument in 'base-initrd' call.
2014-09-08linux-initrd: Store Linux modules in a normal store directory.Ludovic Courtès
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:linux and #:linux-modules parameters. Remove call to 'float-linux-module-directory'. (base-initrd): Add call to 'float-linux-module-directory'. Use it in #:linux-modules argument in the gexp. Remove #:linux and #:linux-modules arguments to 'expression->initrd'. * gnu/build/linux-initrd.scm (build-initrd): Remove #:linux-module-directory parameter. Don't create 'modules' sub-directory. * gnu/build/linux-boot.scm (boot-system): Mentin that LINUX-MODULES is a list of absolute file names. Don't prepend "/modules/" to LINUX-MODULES. * doc/guix.texi (Initial RAM Disk): Adjust accordingly.
2014-09-08linux-initrd: Copy all the script's closure to the initrd.Ludovic Courtès
* gnu/system/linux-initrd.scm (expression->initrd): Remove calls to 'imported-modules' and 'compiled-modules'. Use 'gexp->script' with EXP. Add the result to TO-COPY. Make /init a symlink to that script, and copy its closure into the "contents" directory. Add fake /proc/self/exe symlink. * gnu/build/linux-boot.scm (load-linux-module*): Add comment about mmap. * gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "-m 256". This turns out to be needed for initrds containing things like e2fsck and several modules; with the default of 128 MiB, loading libahci.ko may fail with -1.
2014-09-03Move part of (gnu build linux-boot) to (gnu build file-systems).Ludovic Courtès
* gnu/build/linux-boot.scm (%ext2-endianness, %ext2-sblock-magic, %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name, read-ext2-superblock, ext2-superblock-uuid, ext2-superblock-volume-name, disk-partitions, partition-label-predicate, find-partition-by-label, canonicalize-device-spec, MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_BIND, MS_MOVE, bind-mount, check-file-system, mount-flags->bit-mask, mount-file-system): Move to... * gnu/build/file-systems.scm: ... here. New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Use (gnu build file-systems). * gnu/services/dmd.scm (dmd-configuration-file): Likewise. * gnu/system.scm (operating-system-activation-script): Likewise. * gnu/system/linux-initrd.scm (base-initrd): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2014-09-03Rename (gnu build linux-initrd) to (gnu build linux-boot).Ludovic Courtès
* gnu/build/linux-initrd.scm: Rename to... * gnu/build/linux-boot.scm: ... this. * gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly. * gnu/build/activation.scm, gnu/build/vm.scm, gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm, gnu/system/vm.scm: Adjust accordingly.