aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
Commit message (Collapse)AuthorAge
* linux-boot: Resume from hibernation after pre-boot.Jack Hill2022-09-04
| | | | | | | * gnu/build/linux-boot.scm (boot-system): Call resume-if-hibernated after pre-mount. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* initrd: Honor rootfstype and rootflags command-line parameters.Maxim Cournoyer2022-03-01
| | | | | | | | | * 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.
* initrd: Use non-hyphenated kernel command-line parameter names.Maxim Cournoyer2022-03-01
| | | | | | | | | | | | | | | | | | | | | | 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.
* build: linux-boot: Expound docstring of the 'boot-system' procedure.Maxim Cournoyer2022-02-17
| | | | | * gnu/build/linux-boot.scm (boot-system): Document the Linux command-line parameters it understands and split a long string over two lines.
* syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | | * 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.
* linux-boot: Honour fsck.mode & fsck.repair.Tobias Geerinckx-Rice2021-09-23
| | | | | | * 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.
* file-systems: Support forced checks & repairs.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | | | | | | * 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.
* linux-boot: Remove mummified comment.Tobias Geerinckx-Rice2021-09-12
| | | | | * gnu/build/linux-boot.scm (configure-qemu-networking): Delete 2014 comment about not doing something here.
* gnu: Respect ‘rootdelay’ kernel command-line argument.Tobias Geerinckx-Rice2021-06-16
| | | | | * gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS" when specified on the kernel command line.
* gnu: Respect the root file-system's CHECK? field.Tobias Geerinckx-Rice2021-05-23
| | | | | | | | * 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.
* linux-boot: Fix noresume argument parsing.Tobias Geerinckx-Rice2020-12-17
| | | | | * gnu/build/linux-boot.scm (boot-system): Check for "hibernate=noresume" in addition to "noresume".
* linux-boot: Resume from hibernation.Tobias Geerinckx-Rice2020-11-07
| | | | | * gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it.
* linux-boot: Handle nfs-root device strings.Stefan2020-09-07
| | | | | | | | | | | | | * 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>
* hurd-boot: Further cleanup of "rc".Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | | | * 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.
* linux-boot: Update 'make-hurd-device-nodes'.Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | * gnu/build/linux-boot.scm (make-hurd-device-nodes): Avoid de-duplication of device mount points; also create mount points for /servers/.
* linux-boot: Refactor boot-system.Maxim Cournoyer2020-05-20
| | | | | | | | | | | | | | | 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.
* Merge branch 'master' into core-updatesMarius Bakke2020-05-02
|\
| * linux-boot: Allow the root file system to be mounted via NFS.Stefan2020-05-02
| | | | | | | | | | | | | | * 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>
* | linux-boot: Add 'make-hurd-device-nodes'.Ludovic Courtès2020-04-11
| | | | | | | | * gnu/build/linux-boot.scm (make-hurd-device-nodes): New procedure.
* | linux-boot: 'make-essential-device-nodes' root parameter is optional.Ludovic Courtès2020-04-11
|/ | | | | | * gnu/build/linux-boot.scm (make-essential-device-nodes): Change 'root' to an optional parameter. * gnu/build/vm.scm (root-partition-initializer): Adjust accordingly.
* linux-boot: Ensure volatile root is mounted read-only.Maxim Cournoyer2020-03-02
| | | | | * 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.
* linux-boot: Don't ignore flags when mounting root file system.Guillaume Le Vaillant2019-12-12
| | | | | | | | * 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>
* linux-boot: Don't ignore options when mounting root file system.Guillaume Le Vaillant2019-11-18
| | | | | | | | | | | 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>
* linux-boot: Fix indentation.Maxim Cournoyer2019-11-18
| | | | * gnu/build/linux-boot.scm (boot-system): Re-indent.
* linux-boot: Fix typo.Maxim Cournoyer2019-09-25
| | | | * gnu/build/linux-boot.scm (mount-root-file-system): Fix typo.
* linux-modules: Add 'load-linux-modules-from-directory'.Ludovic Courtès2019-08-16
| | | | | | | * 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.
* linux-boot: Fix e2fsck warning.Danny Milosavljevic2019-06-03
| | | | * gnu/build/linux-boot.scm (boot-system): Fix e2fsck warning.
* system: Initialize console keyboard layout in the initrd.Ludovic Courtès2019-03-24
| | | | | | | | | | | | | | | | | 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.
* file-systems: Remove 'title' field and add <file-system-label>.Ludovic Courtès2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* gnu: build: linux-boot: Remove bind-mount export.Christopher Baines2018-02-06
| | | | | | bind-mount is not contained within this module. * gnu/build/linux-boot.scm: Remove bind-mount export.
* linux-boot: Add find-long-options.Danny Milosavljevic2018-02-01
| | | | * gnu/build/linux/boot.scm (find-long-options): New variable.
* gnu: Consistently Write ‘file system(s)’.Tobias Geerinckx-Rice2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* linux-boot: Add #:on-error for initrd error handling.Ludovic Courtès2018-01-08
| | | | | | | | | | 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.
* linux-boot: Add make-static-device-nodes.Danny Milosavljevic2017-12-16
| | | | | | | | | | | | * 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>
* linux-boot: Remove unneeded import.Ludovic Courtès2017-12-02
| | | | | * gnu/build/linux-boot.scm: Remove unnecessary autoload of (system base compile).
* linux-boot: Ensure /etc exists on the root file system.Ludovic Courtès2017-11-29
| | | | | | | | | | | | | | | 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.
* build: Use overlayfs instead of unionfs.Hartmut Goebel2017-11-08
| | | | | | | | | | | | | | 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".
* file-systems: 'mount-file-system' now takes a <file-system> object.Ludovic Courtès2017-10-11
| | | | | | | | | | | | | * 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.
* build: Fix compilation warnings.Mathieu Othacehe2017-04-11
| | | | | | | | | | | * 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>
* Rename '/root/etc/dmd' directory and 'do-not-kill' file.Alex Kost2016-01-29
| | | | | | | * 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".
* linux-boot: Remove verbose output for module loads.Ludovic Courtès2016-01-05
| | | | | | | * 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'.
* linux-boot: Mount /dev as a devtmpfs from the start.Ludovic Courtès2015-09-20
| | | | | | | | | | | | | | | | | | 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.
* gnu: linux-boot: Remove outdated and misleading comment.Ludovic Courtès2015-05-24
| | | | * gnu/build/linux-boot.scm (boot-system): Remove outdated comment.
* linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.Ludovic Courtès2015-01-28
| | | | | | | | | 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.
* linux-boot: Make /etc/mtab a symlink to /proc/self/mounts.宋文武2015-01-05
| | | | | | | | | | 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.
* linux-boot: Load modules and their dependencies, à la 'modprobe'.Ludovic Courtès2014-11-28
| | | | | | | | | | | | | * 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.
* linux-boot: Call 'pre-mount' before 'mount-root-file-system'.Ludovic Courtès2014-11-26
| | | | | | | | 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.
* linux-boot: Error out when 'pre-mount' returns #f.Ludovic Courtès2014-11-26
| | | | | * gnu/build/linux-boot.scm (boot-system): Call 'error' when PRE-MOUNT returns #f.
* linux-boot: Don't catch exceptions thrown by 'mount-root-file-system'.Ludovic Courtès2014-11-20
| | | | | | * 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.
* linux-boot: Make more disk partition block devices.Ludovic Courtès2014-11-13
| | | | | | | Reported by nebuli on #guix. * gnu/build/linux-boot.scm (make-disk-device-nodes): Make 16 block devices for disk partitions.