mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
58cbbe4b55
commit
c9c88118a1
2 changed files with 15 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue