summary refs log tree commit diff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-10 23:16:02 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-10 23:43:31 +0100
commitc9c88118a12b0e22b7369b1dc6b0e2f9db894986 (patch)
tree9117f528281381bfad9053f8e78644bc3d054188 /gnu/system/vm.scm
parent58cbbe4b5562ed8be5c7c6fbdf2b2d8384a5dc8a (diff)
downloadguix-c9c88118a12b0e22b7369b1dc6b0e2f9db894986.tar.gz
gnu: linux-initrd: Make the pseudo-tty device nodes.
* 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.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index b8b0274f1f..b6a777353f 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -383,7 +383,13 @@ such as /etc files."
                              (system* grub "--no-floppy"
                                       "--boot-directory" "/fs/boot"
                                       "/dev/sda"))
-                            (zero? (system* umount "/fs"))
+                            (begin
+                              (when (file-exists? "/fs/dev/pts")
+                                ;; Unmount devpts so /fs itself can be
+                                ;; unmounted (failing to do that leads to
+                                ;; EBUSY.)
+                                (system* umount "/fs/dev/pts"))
+                              (zero? (system* umount "/fs")))
                             (reboot))))))))
     #:system system
     #:inputs `(("parted" ,parted)