summaryrefslogtreecommitdiff
path: root/guix/build/linux-initrd.scm
AgeCommit message (Collapse)Author
2014-09-03Move operating system helpers from (guix build …) to (gnu build …).Ludovic Courtès
* guix/build/activation.scm, guix/build/install.scm, guix/build/linux-initrd.scm, guix/build/vm.scm: Move to... * gnu/build: ... here. * Makefile.am (MODULES): Remove the above guix/build/ files. * gnu-system.am (GNU_SYSTEM_MODULES): Add the above gnu/build/ files here. * gnu/services/base.scm, gnu/services/dmd.scm, gnu/system.scm, gnu/system/linux-initrd.scm, gnu/system/vm.scm, guix/scripts/system.scm: Adjust to the new module names.
2014-08-28linux-initrd: Wait a bit longer for partitions to appear.Ludovic Courtès
Reported by Sveltana on #guix. * guix/build/linux-initrd.scm (canonicalize-device-spec): Increase MAX-TRIALS. Add "waiting for partition" 'format' call.
2014-08-15linux-initrd: Do not create /etc/resolv.conf.Ludovic Courtès
* guix/build/linux-initrd.scm (configure-qemu-networking): Don't create /etc/resolv.conf.
2014-07-23system: Recognize more file system flags.Ludovic Courtès
* guix/build/linux-initrd.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC): New variables. (mount-flags->bit-mask): New procedure. (mount-file-system)[flags->bit-mask]: Remove. Use 'mount-flags->bit-mask' instead. In /etc/mtab, use the empty string when OPTIONS is false. * gnu/services/base.scm (file-system-service): Add #:flags parameter and honor it. * gnu/system.scm (other-file-system-services): Pass FLAGS to 'file-system-service'.
2014-07-23system: Add 'file-system' decl. for /dev/pts, and use the right options.Ludovic Courtès
Fixes <http://bugs.gnu.org/18081>. * gnu/system/file-systems.scm (%devtmpfs-file-system): Add 'needed-for-boot?' field. (%tty-gid, %pseudo-terminal-file-system): New variables. (%base-file-systems): Add %PSEUDO-TERMINAL-FILE-SYSTEM. * gnu/services/base.scm (udev-service): Remove dependency on 'file-system-/dev'. * gnu/system/shadow.scm (%base-groups): Add 'id' field for group 'tty'. * guix/build/linux-initrd.scm (boot-system): Remove 'mount' call for /dev/pts. * doc/guix.texi (File Systems): Add %pseudo-terminal-file-system.
2014-07-03linux-initrd: Use 'call-with-error-handling' when booting.Ludovic Courtès
* guix/build/linux-initrd.scm (canonicalize-device-spec): When label resolution fails, call 'error' instead of 'format' + 'start-repl'. (boot-system): Wrap most of body in 'call-with-error-handling'. Remove 'catch' around 'primitive-load' call.
2014-07-03linux-initrd: Remove unused local procedure.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system)[resolve]: Remove.
2014-07-02linux-initrd: Gracefully handle lack of or invalid ext2 superblocks.Ludovic Courtès
Reported by David Thompson <dthompson2@worcester.edu>. * guix/build/linux-initrd.scm (read-ext2-superblock): Add 'superblock-size' variable. Read with 'get-bytevector-n!' instead of 'getbytevector-n', and make sure we read exactly SUPERBLOCK-SIZE bytes.
2014-06-21linux-initrd: Allow unionfs to have a large number of open files.Ludovic Courtès
Fixes <http://bugs.gnu.org/17827>. * guix/build/linux-initrd.scm (mount-root-file-system) [volatile-root?]: Pass unionfs '-o max_file=65536'.
2014-06-03system: File system sources can be marked as labels or devices.Ludovic Courtès
* gnu/system/file-systems.scm (<file-system>)[title]: New field. * gnu/services/base.scm (file-system-service): Add #:title parameter. In 'start' gexp, use 'canonicalize-device-spec' and honor TITLE. * gnu/system.scm (other-file-system-services, operating-system-root-file-system, operating-system-initrd-file): Adjust accordingly. * gnu/system/linux-initrd.scm (file-system->spec): Likewise. * gnu/system/vm.scm (system-disk-image): Add 'title' field for the root file system. * guix/build/linux-initrd.scm (mount-file-system): Expect the second element of SPEC to be the title. (boot-system)[root-mount-point?, root-fs-type]: Likewise. * gnu/services/dmd.scm (dmd-configuration-file): Select 'canonicalize-device-spec'.
2014-06-02linux-initrd: Wait for devices to appear when resolving a label.Ludovic Courtès
* guix/build/linux-initrd.scm (canonicalize-device-spec): Add #:title parameter. When resolving a label, wait a little and try several times before bailing out.
2014-06-01linux-initrd: Actually create /dev/console.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Add "dev/console".
2014-06-01linux-initrd: Make more device nodes for SCSI disks and CD-ROM devices.Ludovic Courtès
* guix/build/linux-initrd.scm (make-disk-device-nodes): New procedure. (make-essential-device-nodes): Use it. Make more devices nodes for SCSI disks and CD-ROM devices.
2014-06-01linux-initrd: Gracefully handle missing /dev nodes.Ludovic Courtès
* guix/build/linux-initrd.scm (partition-label-predicate): Catch 'system-error' around 'read-ext2-superblock'; return #f upon ENOENT.
2014-05-31linux-initrd: Gracefully deal with partitions with no label.Ludovic Courtès
* guix/build/linux-initrd.scm (partition-label-predicate): Check whether 'ext2-superblock-volume-name' returns #f, and return #f if it does.
2014-05-30linux-initrd: Allow use of volume labels in 'file-system' declarations.Ludovic Courtès
* guix/build/linux-initrd.scm (%ext2-endianness, %ext2-sblock-magic, %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name): New macros. (read-ext2-superblock, ext2-superblock-uuid, ext2-superblock-volume-name, disk-partitions, partition-label-predicate, find-partition-by-label, canonicalize-device-spec): New procedures. (mount-file-system): Use 'canonicalize-device-spec' on SOURCE. (boot-system): Likewise for ROOT. * doc/guix.texi (Using the Configuration System): Adjust 'file-system' declaration accordingly.
2014-05-22linux-initrd: Build /dev/loop* nodes.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Build /dev/loop[0-7].
2014-05-20linux-initrd: Display a backtrace when the initial program fails.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Add pre-unwind handler in 'catch' form around 'primitive-load', and call 'format' and 'display-backtrace' from there.
2014-05-16linux-initrd: Factorize kernel command-line option parsing.Ludovic Courtès
* guix/build/linux-initrd.scm (find-long-option): New procedure. (boot-system): Use it instead of the local 'option'.
2014-05-14linux-initrd: Make /dev/ttyS0, for debugging.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/ttyS0.
2014-05-14system: When unionfs-fuse is used for /, don't kill it when halting.Ludovic Courtès
* guix/build/linux-initrd.scm (pidof): New procedure. (mount-root-file-system)[mark-as-not-killable]: New procedure. Use it for unionfs when VOLATILE-ROOT?. * gnu/services/base.scm (%do-not-kill-file): New variable. (user-processes-service)[stop]: Honor it.
2014-05-10services: Add 'file-system-service'.Ludovic Courtès
* gnu/services/base.scm (file-system-service): New procedure. (user-processes-service): Add 'requirements' parameter. * gnu/services/dmd.scm (dmd-configuration-file): Use (guix build linux-initrd). * guix/build/linux-initrd.scm (guix): Export 'check-file-system'. * gnu/system.scm (file-union): New procedure. (essential-services): Use it. Add that to the returned list.
2014-05-10linux-initrd: Append to /etc/mtab.Ludovic Courtès
* guix/build/linux-initrd.scm (mount-file-system): Open /etc/mtab in append mode.
2014-05-08linux-initrd: Don't leak /dev/console file descriptors.Ludovic Courtès
* guix/build/linux-initrd.scm (switch-root): Simplify /dev/console code. This fixes a bug where we would leak the IN and OUT file descriptors.
2014-05-08linux-initrd: Update /etc/mtab.Ludovic Courtès
* guix/build/linux-initrd.scm (mount-root-file-system): Populate /root/etc/mtab. (mount-file-system): Update ROOT/etc/mtab.
2014-05-06linux-initrd: Delete files from the initrd ramfs when switching roots.Ludovic Courtès
* guix/build/linux-initrd.scm (switch-root): Delete file from the old root. Chdir to / after 'chroot' call. Re-open file descriptors 0, 1, and 2. (boot-system): Move 'loading' message after the 'switch-root' call. * gnu/system.scm (operating-system-boot-script): Add loop that closes file descriptor before calling 'execl'.
2014-05-04linux-initrd: Improve root file system switching.Ludovic Courtès
* guix/build/linux-initrd.scm (move-essential-file-systems, switch-root): New procedures. (MS_MOVE): New variable. (boot-system): Remove 'mount-essential-file-systems' call for ROOT. Use 'switch-root' instead of chdir + chroot.
2014-05-04linux-initrd: Check the root and other early file systems.Ludovic Courtès
* gnu/system.scm (operating-system-derivation)[boot-file-systems]: Keep "/". * gnu/system/linux-initrd.scm (file-system->spec): Keep the 'check?' flag. (qemu-initrd)[helper-packages]: New variable. Pass it as #:to-copy. <gexp>: Add 'set-path-environment-variable' call. Remove #:unionfs argument for 'boot-system'. * gnu/system/vm.scm (%linux-vm-file-systems): Add 'check?' field/ (virtualized-operating-system): Likewise for the "9p" file system. * guix/build/linux-initrd.scm (mount-root-file-system): Change #:unionfs default. Call 'check-file-system' before mounting ROOT, when VOLATILE-ROOT? is false. (check-file-system): New procedure. (mount-file-system): Honor 'check?' element in list; add 'check-file-system' call. (boot-system): Remove #:root-fs-type and #:unionfs parameters. [root-mount-point?, root-fs-type]: New variables. Call 'mount-file-system' on all MOUNTS but "/".
2014-05-03vm: Make root file system type a parameter, and default to ext4.Ludovic Courtès
* gnu/system/vm.scm (qemu-image): Add #:file-system-type parameter. Pass it to 'initialize-hard-disk'. * guix/build/linux-initrd.scm (mount-root-file-system): Always honor TYPE. (boot-system): Change #:root-fs-type to default to "ext4". Update docstring. * guix/build/vm.scm (initialize-hard-disk): Remove #:mkfs parameter; add #:file-system-type. Adjust 'mkfs' invocation and 'mount' call to honor #:file-system-type.
2014-05-03system: Add first-class file system declarations.Ludovic Courtès
* gnu/system.scm (<operating-system>)[initrd]: Default to 'qemu-initrd'. (<file-system>): New record type. (operating-system-root-file-system): New procedure. (operating-system-derivation): Take the device name for GRUB from 'operating-system-root-file-system'. Pass the 'operating-system-initrd' procedure the list of boot file systems. * gnu/system/linux-initrd.scm (file-system->spec): New procedure. (qemu-initrd): Add 'file-systems' parameter, and remove #:mounts parameter. [file-system-type-predicate]: New procedure. [linux-modules]: Use it. Adjust #:mounts argument in 'boot-system' call. (gnu-system-initrd): Remove. * gnu/system/vm.scm (%linux-vm-file-systems): New variable. (expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'. (virtualized-operating-system): New procedure. (system-qemu-image/shared-store-script)[initrd]: Remove. Use 'virtualized-operating-system'. Get the 'initrd' file from OS-DRV. * guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p): Remove. (MS_RDONLY, MS_BIND): New global variables. (bind-mount): Remove local 'MS_BIND' definition. (mount-root-file-system): New procedure, with code formerly in 'boot-system'. (mount-file-system): New procedure. (boot-system): Add #:root-fs-type parameter. Remove 'MS_RDONLY' local variable. Use 'mount-root-file-system' and 'mount-file-system'. * doc/guix.texi (Using the Configuration System): Add 'file-system' declaration.
2014-04-30linux-initrd: Allow setuid binaries from the unionfs to run.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Pass the 'suid' option to UNIONFS.
2014-04-14linux-initrd: Mount / as a unionfs when asking for a volatile root.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/fuse. (boot-system): Add #:unionfs parameter. Invoke UNIONFS instead of copying files over when VOLATILE-ROOT? is true. * gnu/system/linux-initrd.scm (expression->initrd): Add #:inputs parameter. [files-to-copy]: New procedure. [builder]: Add 'to-copy' parameter; honor it. (qemu-initrd)[linux-modules]: Add 'fuse.ko' when VOLATILE-ROOT?. Pass UNIONFS-FUSE/STATIC as #:inputs; change builder to pass #:unionfs to 'boot-system'.
2014-04-09gnu: linux-initrd: Mount /dev/pts at boot time.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Remove 'mount' call for /dev/pts. (boot-system): Add it here, after 'chroot' call.
2014-04-09gnu: linux-initrd: Better populate /dev.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/{ptmx,tty} world-writable. Build additional character devices.
2014-03-10gnu: linux-initrd: Make the pseudo-tty device nodes.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Create /dev/ptmx and /dev/pts. * gnu/system/vm.scm (qemu-image): Umount /fs/dev/pts before /fs.
2014-02-09gnu: linux-initrd: When booting, chdir to the new root before calling 'chroot'.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Add 'chdir' call right before 'chroot'.
2014-02-01gnu: linux-initrd: Build /dev/input devices.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/input devices.
2014-02-01gnu: linux-initrd: Make /dev/{mem,kmem}.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/{mem,kmem}.
2014-01-31gnu: linux-initrd: Allow the root file system to be volatile.Ludovic Courtès
* gnu/system/linux-initrd.scm (qemu-initrd): Add 'volatile-root?' parameter. * guix/build/linux-initrd.scm (boot-system): Likewise. Honor it.
2014-01-31gnu: linux-initrd: Recognize 9p file systems.Ludovic Courtès
* gnu/system/linux-initrd.scm (qemu-initrd)[virtio-9p-modules]: New variable. [linux-modules]: Append VIRTIO-9P-MODULES when a 9p file system is in MOUNTS. * guix/build/linux-initrd.scm (mount-qemu-9p): New procedure. (boot-system): Recognize '9p' in MOUNTS, and use 'mount-qemu-9p'.
2014-01-31gnu: linux-initrd: Properly distinguish between /dev/sda* and /dev/vda*.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Rename devices with major = 8 to /dev/sda*. Make /dev/vda* devices. * gnu/system/vm.scm (qemu-image): Change '/dev/vda' to '/dev/sda'. * gnu/system.scm (operating-system-derivation): Likewise.
2014-01-31gnu: linux-initrd: Start a REPL when the root could not be mounted.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Catch errors when mounting ROOT and call 'start-repl' upon error.
2014-01-29gnu: linux-initrd: Factorize boot code.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): New procedure. * gnu/system/linux-initrd.scm (qemu-initrd): Add keyword parameters 'guile-modules-in-chroot?' and 'mounts'. Change builder to simply call 'boot-system'. (gnu-system-initrd): Change to a simple call to 'qemu-initrd'. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Call 'qemu-initrd' with #:guile-modules-in-chroot?.
2014-01-18linux-initrd: Make /dev/{null,zero} world-writable.Ludovic Courtès
Reported by zerwas on #guix. * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/null and /dev/zero world-writable.
2013-09-11linux-initrd: Create /dev/klog and /dev/kmsg.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/klog and /dev/kmsg.
2013-09-05gnu: linux-initrd: Fix creation of /dev/tty nodes.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/tty. Change from 'block-special' to 'char-special' for /dev/tty* nodes.
2013-09-02gnu: linux-initrd: Factorize device node creation.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): New procedure. * gnu/packages/linux-initrd.scm (qemu-initrd): Use it.
2013-08-31gnu: linux-initrd: Make Guile modules accessible in the chroot.Ludovic Courtès
* gnu/packages/linux-initrd.scm (qemu-initrd): Add (guix build utils) to #:modules, and use it. Copy .scm and .go files to /root. * guix/build/linux-initrd.scm (bind-mount): New procedure.
2013-08-29gnu: linux-initrd: Add (guix build linux-initrd) and use it.Ludovic Courtès
* gnu/packages/linux-initrd.scm (qemu-initrd): Add #:modules argument. Factorize and move some of the code to... * guix/build/linux-initrd.scm: ... here. New file. * Makefile.am (MODULES): Add it.