# HG changeset patch # User Aleksej Bobylev # Date 1505755369 -10800 # Node ID 1705daa4b44ab9d3711ca3dd6af4f6c9d2c26d84 # Parent 4f6e22d6c85ef0055eaee73c35ddf8d3a0414e58 tazdev/tazdev: mount /dev to avoid errors with /dev/null, etc. diff -r 4f6e22d6c85e -r 1705daa4b44a tazdev/tazdev --- a/tazdev/tazdev Sun Sep 03 18:03:50 2017 +0200 +++ b/tazdev/tazdev Mon Sep 18 20:22:49 2017 +0300 @@ -117,10 +117,31 @@ if [ ! -d "$rootfs/proc/1" ]; then newline action 'Mounting virtual filesystems...' - mount -t proc proc $rootfs/proc - mount -t sysfs sysfs $rootfs/sys - mount -t devpts devpts $rootfs/dev/pts - mount -t tmpfs shm $rootfs/dev/shm + mount -n -t tmpfs none $rootfs/dev + mknod -m 622 $rootfs/dev/console c 5 1 + mknod -m 666 $rootfs/dev/null c 1 3 + mknod -m 666 $rootfs/dev/zero c 1 5 + mknod -m 666 $rootfs/dev/ptmx c 5 2 + mknod -m 666 $rootfs/dev/tty c 5 0 + mknod -m 444 $rootfs/dev/random c 1 8 + mknod -m 444 $rootfs/dev/urandom c 1 9 + chown root:tty $rootfs/dev/console + chown root:tty $rootfs/dev/ptmx + chown root:tty $rootfs/dev/tty + + ln -s /proc/self/fd $rootfs/dev/fd + ln -s /proc/self/fd/0 $rootfs/dev/stdin + ln -s /proc/self/fd/1 $rootfs/dev/stdout + ln -s /proc/self/fd/2 $rootfs/dev/stderr + ln -s /proc/kcore $rootfs/dev/core + mkdir $rootfs/dev/pts + mkdir $rootfs/dev/shm + + mount -t devpts -o gid=4,mode=620 none $rootfs/dev/pts + mount -t tmpfs none $rootfs/dev/shm + + mount -t proc proc $rootfs/proc + mount -t sysfs sysfs $rootfs/sys status fi # Mount source, so they can be shared between cooking/stable/undigest. @@ -145,6 +166,7 @@ action 'Unmounting virtual filesystems...' umount $rootfs/dev/shm umount $rootfs/dev/pts + umount $rootfs/dev umount $rootfs/sys umount $rootfs/proc if mount | fgrep -q $fs/src; then