summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-06-10 19:12:47 +0200
committerThomas Bächler <thomas@archlinux.org>2010-06-10 19:12:47 +0200
commit96a4abdbbf8f490e97e72435627938a2577c613e (patch)
treec5dc212699dbd7ba14fc3326f2edc3655521774c /init
parent88d6c54aa0e820a8df2bedf9a3da6a56aa6d01ae (diff)
downloadmkinitcpio-96a4abdbbf8f490e97e72435627938a2577c613e.tar.gz
mkinitcpio-96a4abdbbf8f490e97e72435627938a2577c613e.tar.xz
Create /dev/{null,zero,mem,console} devices when devtmpfs is missing
These devices used to be present because they were added in the image. Since we now mount {dev,}tmpfs early in initramfs, the devices from the image will be invisible. In the tmpfs-case, create the devices manually so everything will be in order until udev is started, or if udev isn't used at all.
Diffstat (limited to 'init')
-rw-r--r--init6
1 files changed, 6 insertions, 0 deletions
diff --git a/init b/init
index e58a587..27f43f2 100644
--- a/init
+++ b/init
@@ -11,6 +11,12 @@ if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
/bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
else
/bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
+ # We don't have devtmpfs, so add the most important standard devices
+ /bin/mknod /dev/null c 1 3
+ /bin/mknod /dev/zero c 1 5
+ /bin/mknod /dev/console c 5 1
+ # /dev/mem is needed if we want to load uvesafb before triggering uevents
+ /bin/mknod /dev/mem c 1 1
fi
read CMDLINE </proc/cmdline