diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index b8b0274f1fa66d7f9c93573bb9685550d3691d73..b6a777353fe269a57f59a6192b2509838db1ddf2 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -383,7 +383,13 @@ (define (graph-from-file file) (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) diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index 80ce6794960214d1a113d5739aae95ca21f4dbb9..9a8ea0ed4fcf8fa0b373a33da75c9d27977f9b85 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -114,6 +114,14 @@ (define (scope dir) (device-number 4 n)) (loop (+ 1 n))))) + ;; Pseudo ttys. + (mknod (scope "dev/ptmx") 'char-special #o666 + (device-number 5 2)) + + (unless (file-exists? (scope "dev/pts")) + (mkdir (scope "dev/pts"))) + (mount "none" (scope "dev/pts") "devpts") + ;; Rendez-vous point for syslogd. (mknod (scope "dev/log") 'socket #o666 0) (mknod (scope "dev/kmsg") 'char-special #o600 (device-number 1 11))