summaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
AgeCommit message (Collapse)Author
2022-03-01initrd: Honor rootfstype and rootflags command-line parameters.Maxim Cournoyer
* gnu/build/linux-boot.scm (boot-system): Honor rootfstype and rootflags arguments. Update doc. Error out in case there is insufficient information with regard to the root file system. Restore the behavior of inferring the root device from the root file system from the operating system in case the root argument is not provided. * doc/guix.texi (Initial RAM Disk): Document the new command-line parameters.
2022-03-01initrd: Use non-hyphenated kernel command-line parameter names.Maxim Cournoyer
This is to make it less surprising, given the common convention sets forth by the kernel Linux command-line parameters. * gnu/build/linux-boot.scm (boot-system): Rename '--load', '--repl', '--root' and '--system' to 'gnu.load', 'gnu.repl', 'root' and 'gnu.system', respectively. Adjust doc. (find-long-option): Adjust doc. * gnu/installer/parted.scm (installer-root-partition-path): Adjust accordingly. * gnu/system.scm (bootable-kernel-arguments): Add a VERSION argument and update doc. Use VERSION to conditionally return old style vs new style initrd arguments. (%boot-parameters-version): Increment to 1. (operating-system-boot-parameters): Adjust doc. (operating-system-boot-parameters-file): Likewise. * gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Likewise. * doc/guix.texi: Adjust doc. * gnu/build/activation.scm (boot-time-system): Adjust accordingly. * gnu/build/hurd-boot.scm (boot-hurd-system): Likewise. * gnu/packages/commencement.scm (%final-inputs-riscv64): Adjust comment.
2022-02-17build: linux-boot: Expound docstring of the 'boot-system' procedure.Maxim Cournoyer
* gnu/build/linux-boot.scm (boot-system): Document the Linux command-line parameters it understands and split a long string over two lines.
2021-09-23syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice
* guix/cpio.scm (device-number, device->major+minor): Move to, and subsequently import from, … * guix/build/syscalls.scm (device-number, device-number->major+minor): …here. Note the slight name change. (mounts): Replace 16-bit open code with a DEVICE-NUMBER call. * gnu/build/linux-boot.scm (device-number): Remove duplicate 16-bit implementation in favour of the one above. (resume-if-hibernated): Reuse DEVICE-NUMBER->MAJOR+MINOR.
2021-09-23linux-boot: Honour fsck.mode & fsck.repair.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (boot-system): Honour ‘fsck.mode=’ and ‘fsck.repair=’ kernel command line options. * doc/guix.texi (Initial RAM Disk): Document both.
2021-09-23file-systems: Support forced checks & repairs.Tobias Geerinckx-Rice
* gnu/build/file-systems.scm (check-ext2-file-system) (check-bcachefs-file-system, check-btrfs-file-system) (check-fat-file-system, check-jfs-file-system, check-f2fs-file-system) (check-ntfs-file-system, check-file-system): Take and honour new FORCE? and REPAIR arguments. Update the docstring. Adjust all callers. * gnu/system/file-systems.scm <file-system>: Add new SKIP-CHECK-IF-CLEAN? and REPAIR fields. (file-system->spec, spec->file-system): Adjust accordingly. * gnu/build/linux-boot.scm (mount-root-file-system): Take new SKIP-CHECK-IF-CLEAN? and REPAIR keyword arguments. Thread them through to CHECK-FILE-SYSTEM. * doc/guix.texi (File Systems): Document both new <file-system> options.
2021-09-12linux-boot: Remove mummified comment.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (configure-qemu-networking): Delete 2014 comment about not doing something here.
2021-06-16gnu: Respect ‘rootdelay’ kernel command-line argument.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS" when specified on the kernel command line.
2021-05-23gnu: Respect the root file-system's CHECK? field.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (mount-root-file-system): Take a new #:CHECK? keyword argument. Add it to the docstring. Conditionally call CHECK-FILE-SYSTEM. (boot-system): Adjust its only caller to pass the <file-system>'s CHECK? option through, if available.
2020-12-17linux-boot: Fix noresume argument parsing.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (boot-system): Check for "hibernate=noresume" in addition to "noresume".
2020-11-07linux-boot: Resume from hibernation.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it.
2020-09-07linux-boot: Handle nfs-root device strings.Stefan
* gnu/build/linux-boot.scm (device-string->file-system-device): Support nfs-root "device" strings. * gnu/build/file-systems.scm (canonicalize-device-spec): Support nfs-root "device" strings. * gnu/machine/ssh.scm (machine-check-file-system-availability): Avoid checking of NFS file systems. * gnu/system.scm (read-boot-parameters, device-sexp->device): Support nfs-root "device" strings. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-06-08hurd-boot: Further cleanup of "rc".Jan (janneke) Nieuwenhuizen
* gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ... * gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file. * gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2020-06-08linux-boot: Update 'make-hurd-device-nodes'.Jan (janneke) Nieuwenhuizen
* gnu/build/linux-boot.scm (make-hurd-device-nodes): Avoid de-duplication of device mount points; also create mount points for /servers/.
2020-05-20linux-boot: Refactor boot-system.Maxim Cournoyer
The --root option can now be omitted, and inferred from the root file system declaration instead. * gnu/build/file-systems.scm (canonicalize-device-spec): Extend to support NFS directly, and... * gnu/build/linux-boot.scm (boot-system): ...remove NFS special casing from here. Remove nested definitions for root-fs-type, root-fs-flags and root-fs-options, and bind those inside the let* instead. Make "--root" take precedence over the device field string representation of the root file system. * doc/guix.texi (Initial RAM Disk): Document that "--root" can be left unspecified.
2020-05-02Merge branch 'master' into core-updatesMarius Bakke
2020-05-02linux-boot: Allow the root file system to be mounted via NFS.Stefan
* gnu/build/linux-boot.scm (boot-system) Treat a root option with ":/" as an nfs source and avoid to call 'canonicalize-device-spec' for it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-11linux-boot: Add 'make-hurd-device-nodes'.Ludovic Courtès
* gnu/build/linux-boot.scm (make-hurd-device-nodes): New procedure.
2020-04-11linux-boot: 'make-essential-device-nodes' root parameter is optional.Ludovic Courtès
* gnu/build/linux-boot.scm (make-essential-device-nodes): Change 'root' to an optional parameter. * gnu/build/vm.scm (root-partition-initializer): Adjust accordingly.
2020-03-02linux-boot: Ensure volatile root is mounted read-only.Maxim Cournoyer
* gnu/build/linux-boot.scm (mount-root-file-system): Ensure MS_RDONLY is present among the root file system flags when VOLATILE-ROOT? is #t.
2019-12-12linux-boot: Don't ignore flags when mounting root file system.Guillaume Le Vaillant
* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword argument and use it when mounting the root file system. (boot-system): Pass the root file system flags to 'mount-root-file-system'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-18linux-boot: Don't ignore options when mounting root file system.Guillaume Le Vaillant
Fixes <https://bugs.gnu.org/37977>. * gnu/build/linux-boot.scm (mount-root-file-system): Add the 'options' keyword argument and use it when mounting the root file system. (boot-system): Pass the root file system options to 'mount-root-file-system'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-18linux-boot: Fix indentation.Maxim Cournoyer
* gnu/build/linux-boot.scm (boot-system): Re-indent.
2019-09-25linux-boot: Fix typo.Maxim Cournoyer
* gnu/build/linux-boot.scm (mount-root-file-system): Fix typo.
2019-08-16linux-modules: Add 'load-linux-modules-from-directory'.Ludovic Courtès
* gnu/build/linux-modules.scm (load-linux-modules-from-directory): New procedure. * gnu/build/linux-boot.scm (boot-system)[lookup-module]: Remove. Use 'load-linux-modules-from-directory' instead.
2019-06-03linux-boot: Fix e2fsck warning.Danny Milosavljevic
* gnu/build/linux-boot.scm (boot-system): Fix e2fsck warning.
2019-03-24system: Initialize console keyboard layout in the initrd.Ludovic Courtès
Partially fixes <https://bugs.gnu.org/25453>. * gnu/system.scm (<operating-system>)[keyboard-layout]: New field. (operating-system-initrd-file): Pass #:keyboard-layout to MAKE-INITRD. * gnu/system/linux-initrd.scm (raw-initrd): Add #:keyboard-layout. Pass #:keymap-file to 'boot-system'. (base-initrd): Add #:keyboard-layout. [helper-packages]: Add LOADKEYS-STATIC when KEYBOARD-LAYOUT is true. Pass #:keyboard-layout to 'raw-initrd'. * gnu/build/linux-boot.scm (boot-system): Add #:keymap-file and honor it. * doc/guix.texi (operating-system Reference): Document the 'keyboard-layout' field. (Initial RAM Disk): Update 'raw-initrd' and 'base-initrd' documentation.
2018-05-28file-systems: Remove 'title' field and add <file-system-label>.Ludovic Courtès
The 'title' field was easily overlooked and was an endless source of confusion. Now, the value of the 'device' field is self-contained. * gnu/system/file-systems.scm (<file-system>): Change constructor name to '%file-system'. [title]: Remove. (<file-system-label>): New record type with printer. (report-deprecation, device-expression) (process-file-system-declaration, file-system): New macros. (file-system-title): New procedure. (file-system->spec, spec->file-system): Adjust to handle <file-system-label>. * gnu/system.scm (bootable-kernel-arguments): Add case for 'file-system-label?'. (read-boot-parameters): Likewise. (mapped-device-user): Avoid 'file-system-title'. (fs->boot-device): Remove. (operating-system-boot-parameters): Use 'file-system-device' instead of 'fs->boot-device'. (device->sexp): Add case for 'file-system-label?'. * gnu/bootloader/grub.scm (grub-root-search): Add case for 'file-system-label?'. * gnu/system/examples/bare-bones.tmpl, gnu/system/examples/beaglebone-black.tmpl, gnu/system/examples/lightweight-desktop.tmpl, gnu/system/examples/vm-image.tmpl: Remove uses of 'title'. * gnu/system/vm.scm (virtualized-operating-system): Remove uses of 'file-system-title'. * guix/scripts/system.scm (check-file-system-availability): Likewise, and adjust fix-it hint. (check-initrd-modules)[file-system-/dev]: Likewise. * gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title' parameter. [canonical-title]: Remove. Match on SPEC's type rather than on CANONICAL-TITLE. (mount-file-system): Adjust caller. * gnu/build/linux-boot.scm (boot-system): Interpret ROOT here. * gnu/services/base.scm (file-system->fstab-entry): Remove use of 'file-system-title'. * doc/guix.texi (File Systems): Remove documentation of the 'title' field. Rewrite documentation of 'device' and document 'file-system-label'.
2018-02-06gnu: build: linux-boot: Remove bind-mount export.Christopher Baines
bind-mount is not contained within this module. * gnu/build/linux-boot.scm: Remove bind-mount export.
2018-02-01linux-boot: Add find-long-options.Danny Milosavljevic
* gnu/build/linux/boot.scm (find-long-options): New variable.
2018-01-19gnu: Consistently Write ‘file system(s)’.Tobias Geerinckx-Rice
It is the GNU way. * doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’. * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): Likewise. * gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise. * gnu/packages/check.scm (python-testpath)[description]: Likewise. * gnu/packages/disk.scm (pydf)[description]: Likewise. * gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise. (glusterfs)[description]: Likewise. * gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap) (ghc-system-fileio)[synopsis]: Likewise. (ghc-fsnotify)[description]: Likewise. * gnu/packages/linux.scm (proot)[description]: Likewise. (jmtpfs)[synopsis, description]: Likewise. * gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise. * gnu/packages/storage.scm (ceph)[description]: Likewise. * gnu/packages/sync.scm (lsyncd)[description]: Likewise. * gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise. (go-github-com-zillode-notify)[description]: Likewise. * gnu/services/nfs.scm (pipefs-service-type): Likewise. * guix/scripts/system.scm (perform-action): Likewise.
2018-01-08linux-boot: Add #:on-error for initrd error handling.Ludovic Courtès
Suggested by Danny Milosavljevic <dannym@scratchpost.org> in <https://bugs.gnu.org/29922>. * gnu/build/linux-boot.scm (boot-system): Add #:on-error parameter and pass it to 'call-with-error-handling'. * gnu/system/linux-initrd.scm (raw-initrd): Add #:on-error and pass it. (base-initrd): Likewise.
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.