Problems with /dev/console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 21, 2009 at 2:18 PM, Christoffer Dall <cd2436 at columbia.edu> wrote:
>>> - Is /dev/console supposed to be created in the initrd, by the init
>>> process, by the kernel or a combination thereof?
>>
>> A combination. The actual device is created by the kernel. The device node
>> on your initrd fs is just a device node. /linuxrc should create that one.
>
> So the sys_open(..., "/dev/console",...) call in main/init.c: init()
> should succeed even though there is nothing creating the fs device
> node in the initrd, or? (sorry, I find this somewhat confusing)

Inside kernel_init():
* linuxrc is executed first, via prepare_namespace() -> initrd_load()
-> handle_initrd()
* init_post() happens second, by which time /dev/console must exist

So linuxrc gets a chance to create /dev/console even if one doesn't
exist in the ramdisk. (I actually didn't know that until right now. :)

-Hollis


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux