public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: udev: what's up with old /dev ?
@ 2004-10-10 22:41 Michael Thonke
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Thonke @ 2004-10-10 22:41 UTC (permalink / raw)
  Cc: linux-kernel

A couple questions:

- Is it possible to boot with an empty /dev, until udev builds it ?

No, it isn't as far as I know.

- If this is not the case, which are the minimal nodes that should be
  present ?
/dev/null and /dev/console is needed to boot into the envoirment

- For any answer to previous question, shouldn't the distro set up minimal
  /dev (empty or with a few nodes) and _delete_ the old /dev tree ?

At least I could do so, but at the moment /dev are also elemental for some distros..I have moved with gentoo and have had no problems along x86 32bit
but x86_64 driving me creazy

I you want more to know have a look at decibiles udev primer
Greets Michael


^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: udev: what's up with old /dev ?
@ 2004-10-11  7:19 Zack Weinberg
  0 siblings, 0 replies; 23+ messages in thread
From: Zack Weinberg @ 2004-10-11  7:19 UTC (permalink / raw)
  To: linux-kernel


Hacksaw writes:
>Zack Weinberg writes:
>>The very first thing init does is open /dev/console, and if it doesn't
>>exist the entire boot hangs.
>
>This raises a question: Would it be a useful thing to make a modified init
>that could run udev before it does anything else?

It wouldn't help.  The opening of /dev/console actually happens inside
the kernel, near the bottom of init/main.c:

        if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
                printk("Warning: unable to open an initial console.\n");

        (void) sys_dup(0);
        (void) sys_dup(0);

That's not a fatal error, but the userspace startup process does get
stuck not very long afterward.  (I'm not sure precisely where.  It
hadn't mounted filesystems read-write yet.)

Control reaches the above code after an initramfs is unpacked, so
including /dev/console in an initramfs will work.  I do not think it
will work to invoke udevstart from an initramfs or initrd *without*
also including a static /dev/console -- I'm pretty darn sure that
control reaches /init in an initramfs after the above code executes.
I'm not sure whether control reaches /linuxrc in an initrd before or
after the above code.

Being inside the kernel at this point, it seems to me there ought to
be some way to open device <5,1> without going through the filesystem,
but I could not find one.

[Tangentially, I thought kernel-side syscalls had been stamped out,
but there's still a __KERNEL_SYSCALLS__ #define at the top of the file
and a bare execve() in run_init_process()... which does in fact get
compiled to int $0x80 on my boring old x86...]

zw

^ permalink raw reply	[flat|nested] 23+ messages in thread
* udev: what's up with old /dev ?
@ 2004-10-10 22:08 J.A. Magallon
  2004-10-10 22:51 ` Zack Weinberg
  2004-10-12  0:19 ` Greg KH
  0 siblings, 2 replies; 23+ messages in thread
From: J.A. Magallon @ 2004-10-10 22:08 UTC (permalink / raw)
  To: Lista Mdk-Cooker; +Cc: Lista Linux-Kernel

Hi all...

I have just remembered that udev mounts /dev as a tmpfs filesystem, _on top_
of the old /dev directory. I have just booted to single user mode,
and checked that the old /dev is wasting around 13000 files (inodes) in my
box. Space is not an issue, that is around 480 Kb.

A couple questions:

- Is it possible to boot with an empty /dev, until udev builds it ?
- If this is not the case, which are the minimal nodes that should be
  present ?
- For any answer to previous question, shouldn't the distro set up minimal
  /dev (empty or with a few nodes) and _delete_ the old /dev tree ?

I don't remember exactly, but there are scripts at initscripts run before
udev. As I understand it, udev should be the very first thing to run, as
anything after it will probably need a /dev/something....

Why my simple logic does not work ?

(As I CC both cooker and LKML, this is a cooker specific question: could anybody
who has installed 10.1 from scratch, ie not an update, boot to runlevel 1 and
list his /dev)

TIA

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandrakelinux release 10.1 (Community) for i586
Linux 2.6.9-rc3-mm3 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #2



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2004-10-13 14:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-10 22:41 udev: what's up with old /dev ? Michael Thonke
  -- strict thread matches above, loose matches on Subject: below --
2004-10-11  7:19 Zack Weinberg
2004-10-10 22:08 J.A. Magallon
2004-10-10 22:51 ` Zack Weinberg
2004-10-10 23:15   ` Hacksaw
2004-10-10 23:25     ` J.A. Magallon
2004-10-11  0:06       ` Hacksaw
2004-10-11 19:13       ` Denis Vlasenko
2004-10-11  9:14     ` Felipe Alfaro Solana
2004-10-11 10:29       ` Arkadiusz Miskiewicz
2004-10-11 12:02         ` Felipe Alfaro Solana
2004-10-11 11:11       ` Hacksaw
2004-10-11 12:04         ` Felipe Alfaro Solana
2004-10-11 20:06           ` Hacksaw
2004-10-11 20:51             ` Bartlomiej Zolnierkiewicz
2004-10-11 21:28               ` Hacksaw
2004-10-12  0:19 ` Greg KH
2004-10-12  8:11   ` Harald Dunkel
2004-10-12 16:58     ` Greg KH
     [not found]       ` <416C26B4.6040408@t-online.de>
     [not found]         ` <20041012185733.GA31222@kroah.com>
     [not found]           ` <416C3BB6.4040200@t-online.de>
     [not found]             ` <20041012203022.GB32139@kroah.com>
2004-10-12 21:35               ` Harald Dunkel
2004-10-13 13:08                 ` Mathieu Segaud
2004-10-13 14:13                   ` Harald Dunkel
2004-10-13 14:33                     ` Mathieu Segaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox