summaryrefslogtreecommitdiff
path: root/guix/build/linux-initrd.scm
Commit message (Collapse)AuthorAge
* system: File system sources can be marked as labels or devices.Ludovic Courtès2014-06-03
| | | | | | | | | | | | | | | | | * 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'.
* linux-initrd: Wait for devices to appear when resolving a label.Ludovic Courtès2014-06-02
| | | | | | * 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.
* linux-initrd: Actually create /dev/console.Ludovic Courtès2014-06-01
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Add "dev/console".
* linux-initrd: Make more device nodes for SCSI disks and CD-ROM devices.Ludovic Courtès2014-06-01
| | | | | | * 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.
* linux-initrd: Gracefully handle missing /dev nodes.Ludovic Courtès2014-06-01
| | | | | * guix/build/linux-initrd.scm (partition-label-predicate): Catch 'system-error' around 'read-ext2-superblock'; return #f upon ENOENT.
* linux-initrd: Gracefully deal with partitions with no label.Ludovic Courtès2014-05-31
| | | | | * guix/build/linux-initrd.scm (partition-label-predicate): Check whether 'ext2-superblock-volume-name' returns #f, and return #f if it does.
* linux-initrd: Allow use of volume labels in 'file-system' declarations.Ludovic Courtès2014-05-30
| | | | | | | | | | | | | | * 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.
* linux-initrd: Build /dev/loop* nodes.Ludovic Courtès2014-05-22
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Build /dev/loop[0-7].
* linux-initrd: Display a backtrace when the initial program fails.Ludovic Courtès2014-05-20
| | | | | | * 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.
* linux-initrd: Factorize kernel command-line option parsing.Ludovic Courtès2014-05-16
| | | | | * guix/build/linux-initrd.scm (find-long-option): New procedure. (boot-system): Use it instead of the local 'option'.
* linux-initrd: Make /dev/ttyS0, for debugging.Ludovic Courtès2014-05-14
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/ttyS0.
* system: When unionfs-fuse is used for /, don't kill it when halting.Ludovic Courtès2014-05-14
| | | | | | | | * 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.
* services: Add 'file-system-service'.Ludovic Courtès2014-05-10
| | | | | | | | | | * 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.
* linux-initrd: Append to /etc/mtab.Ludovic Courtès2014-05-10
| | | | | * guix/build/linux-initrd.scm (mount-file-system): Open /etc/mtab in append mode.
* linux-initrd: Don't leak /dev/console file descriptors.Ludovic Courtès2014-05-08
| | | | | | * 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.
* linux-initrd: Update /etc/mtab.Ludovic Courtès2014-05-08
| | | | | | * guix/build/linux-initrd.scm (mount-root-file-system): Populate /root/etc/mtab. (mount-file-system): Update ROOT/etc/mtab.
* linux-initrd: Delete files from the initrd ramfs when switching roots.Ludovic Courtès2014-05-06
| | | | | | | | | * 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'.
* linux-initrd: Improve root file system switching.Ludovic Courtès2014-05-04
| | | | | | | | * 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.
* linux-initrd: Check the root and other early file systems.Ludovic Courtès2014-05-04
| | | | | | | | | | | | | | | | | | | | * 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 "/".
* vm: Make root file system type a parameter, and default to ext4.Ludovic Courtès2014-05-03
| | | | | | | | | | | | * 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.
* system: Add first-class file system declarations.Ludovic Courtès2014-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* linux-initrd: Allow setuid binaries from the unionfs to run.Ludovic Courtès2014-04-30
| | | | | * guix/build/linux-initrd.scm (boot-system): Pass the 'suid' option to UNIONFS.
* linux-initrd: Mount / as a unionfs when asking for a volatile root.Ludovic Courtès2014-04-14
| | | | | | | | | | | | | | * 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'.
* gnu: linux-initrd: Mount /dev/pts at boot time.Ludovic Courtès2014-04-09
| | | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Remove 'mount' call for /dev/pts. (boot-system): Add it here, after 'chroot' call.
* gnu: linux-initrd: Better populate /dev.Ludovic Courtès2014-04-09
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/{ptmx,tty} world-writable. Build additional character devices.
* gnu: linux-initrd: Make the pseudo-tty device nodes.Ludovic Courtès2014-03-10
| | | | | | * 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.
* gnu: linux-initrd: When booting, chdir to the new root before calling 'chroot'.Ludovic Courtès2014-02-09
| | | | | * guix/build/linux-initrd.scm (boot-system): Add 'chdir' call right before 'chroot'.
* gnu: linux-initrd: Build /dev/input devices.Ludovic Courtès2014-02-01
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/input devices.
* gnu: linux-initrd: Make /dev/{mem,kmem}.Ludovic Courtès2014-02-01
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/{mem,kmem}.
* gnu: linux-initrd: Allow the root file system to be volatile.Ludovic Courtès2014-01-31
| | | | | | * gnu/system/linux-initrd.scm (qemu-initrd): Add 'volatile-root?' parameter. * guix/build/linux-initrd.scm (boot-system): Likewise. Honor it.
* gnu: linux-initrd: Recognize 9p file systems.Ludovic Courtès2014-01-31
| | | | | | | | | * 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'.
* gnu: linux-initrd: Properly distinguish between /dev/sda* and /dev/vda*.Ludovic Courtès2014-01-31
| | | | | | | * 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.
* gnu: linux-initrd: Start a REPL when the root could not be mounted.Ludovic Courtès2014-01-31
| | | | | * guix/build/linux-initrd.scm (boot-system): Catch errors when mounting ROOT and call 'start-repl' upon error.
* gnu: linux-initrd: Factorize boot code.Ludovic Courtès2014-01-29
| | | | | | | | | | * 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?.
* linux-initrd: Make /dev/{null,zero} world-writable.Ludovic Courtès2014-01-18
| | | | | | | Reported by zerwas on #guix. * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/null and /dev/zero world-writable.
* linux-initrd: Create /dev/klog and /dev/kmsg.Ludovic Courtès2013-09-11
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/klog and /dev/kmsg.
* gnu: linux-initrd: Fix creation of /dev/tty nodes.Ludovic Courtès2013-09-05
| | | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/tty. Change from 'block-special' to 'char-special' for /dev/tty* nodes.
* gnu: linux-initrd: Factorize device node creation.Ludovic Courtès2013-09-02
| | | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): New procedure. * gnu/packages/linux-initrd.scm (qemu-initrd): Use it.
* gnu: linux-initrd: Make Guile modules accessible in the chroot.Ludovic Courtès2013-08-31
| | | | | | * 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.
* gnu: linux-initrd: Add (guix build linux-initrd) and use it.Ludovic Courtès2013-08-29
* 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.