linux/init
Eric W. Biederman 2bd3a997be init: Open /dev/console from rootfs
To avoid potential problems with an empty /dev open /dev/console
from rootfs instead of waiting to mount our root filesystem and
mounting it there.   This effectively guarantees that there will
be a device node, and it won't be on a filesystem that we will
ever unmount, so there are no issues with leaving /dev/console
open and pinning the filesystem.

This is actually more effective than automatically mounting
devtmpfs on /dev because it removes removes the occasionally
problematic assumption that /dev/console exists from the boot
code.

With this patch I was able to throw busybox on my /boot partition
(which has no /dev directory) and boot into userspace without
problems.

The only possible negative consequence I can think of is that
someone out there deliberately used did not use a character device
that is major 5 minor 2 for /dev/console.  Does anyone know of a
situation in which that could make sense?

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03 14:56:07 -05:00
..
calibrate.c timers, init: Limit the number of per cpu calibration bootup messages 2009-11-26 10:18:42 +01:00
do_mounts.c Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev 2009-09-15 09:50:49 -07:00
do_mounts.h md: move lots of #include lines out of .h files and into .c 2009-03-31 14:33:13 +11:00
do_mounts_initrd.c init: Open /dev/console from rootfs 2010-03-03 14:56:07 -05:00
do_mounts_md.c md: move lots of #include lines out of .h files and into .c 2009-03-31 14:33:13 +11:00
do_mounts_rd.c init: make initrd/initramfs decompression failure a KERN_EMERG event 2009-01-14 11:28:35 -08:00
initramfs.c initramfs: add missing decompressor error check 2009-12-15 14:04:24 -08:00
Kconfig lib: add support for LZO-compressed kernels 2010-01-11 09:34:04 -08:00
main.c init: Open /dev/console from rootfs 2010-03-03 14:56:07 -05:00
Makefile kbuild: move compile.h to include/generated 2009-12-12 13:08:14 +01:00
noinitramfs.c [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
version.c kbuild: move utsrelease.h to include/generated 2009-12-12 13:08:15 +01:00