From cacd608c37dd0253eb6ef5cda2190e47e9e0717b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 19 Jun 2012 15:15:40 -0400 Subject: [PATCH] Mount devtmpfs in the initrd It seems that udev now requires devtmpfs, so enable it. --- modules/system/boot/stage-1-init.sh | 13 +------------ modules/system/boot/stage-1.nix | 1 - modules/system/boot/stage-2-init.sh | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index 278c68fce992..aeb6a5189065 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -66,17 +66,10 @@ mkdir -p /proc mount -t proc none /proc mkdir -p /sys mount -t sysfs none /sys -mount -t tmpfs -o "mode=0755,size=@devSize@" none /dev +mount -t devtmpfs -o "size=@devSize@" none /dev mkdir -p /run mount -t tmpfs -o "mode=0755,size=@runSize@" none /run -# Some console devices, for the interactivity -mknod /dev/console c 5 1 -mknod /dev/tty c 5 0 -mknod /dev/tty1 c 4 1 -mknod /dev/ttyS0 c 4 64 -mknod /dev/ttyS1 c 4 65 - # Process the kernel command line. export stage2Init=/init for o in $(cat /proc/cmdline); do @@ -127,10 +120,6 @@ for i in @kernelModules@; do done -# Create /dev/null. -mknod /dev/null c 1 3 - - # Create device nodes in /dev. echo "running udev..." export UDEV_CONFIG_FILE=@udevConf@ diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 75f83a27db9d..355f88cf3857 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -154,7 +154,6 @@ let # Copy some coreutils. cp -v ${pkgs.coreutils}/bin/basename $out/bin cp -v ${pkgs.coreutils}/bin/mkdir $out/bin - cp -v ${pkgs.coreutils}/bin/mknod $out/bin cp -v ${pkgs.coreutils}/bin/chmod $out/bin cp -v ${pkgs.coreutils}/bin/cat $out/bin cp -v ${pkgs.coreutils}/bin/chroot $out/bin diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 8238fc1537ea..a4b966081d64 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -39,7 +39,7 @@ if [ ! -e /proc/1 ]; then mkdir -m 0755 -p /sys mount -t sysfs none /sys mkdir -m 0755 -p /dev - mount -t tmpfs -o "mode=0755" none /dev + mount -t devtmpfs none /dev # Create the minimal device nodes needed for the activation scripts # and Upstart.