Re: devfs -> udev transition: vcsN are not created

From: Denis Vlasenko
Date: Fri Aug 27 2004 - 04:52:45 EST


Hi Greg,

On Wednesday 25 August 2004 15:17, Denis Vlasenko wrote:
> I am migrating my 2.6 systems from devfs to udev.
> Versions:
>
> # uname -a
> Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown
> # ls -d udev* hotplug*
> hotplug-2004_04_01 udev-030
>
> In early boot, when root fs is readonly yet, I start udev this way:
>
> mount -t ramfs none /dev
> env - udevd & sleep 1
> udevstart
>
> and then continue as normal. Things mostly work.
> However, I noticed that vcsN device nodes are missing
> (I tried to start Midnight Commander and it failed).
> This can be due to the fact that I start agettys very
> late in boot sequence, and thus all ttyN's were not
> open at the time of udevstart, only first one was (tty1).
>
> I logged in and did:
>
> # ls -l /udev >before
> # strace -o us.log udevstart
> # ls -l /udev >after
> # diff -u before after >diff
>
> This worked, vcsN's appeared:
[snip]

As you suggested, I tried 2.6.9-rc1-mm1. Sorry. It does not work.

My hotplug is instrumented a bit
to log invocations to syslog. I did 'cat >/dev/tty13':

hotplug[1196]: cmd: /sbin/hotplug vc
hotplug[1196]: env: DEVPATH=/class/vc/vcs13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=232 _=/sbin/env
hotplug[1198]: cmd: /sbin/hotplug vc
hotplug[1198]: env: DEVPATH=/class/vc/vcsa13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=233 _=/sbin/env
hotplug[1198]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1196]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1196]: run: /etc/hotplug.d/default/udev.hotplug vc
hotplug[1198]: run: /etc/hotplug.d/default/udev.hotplug vc

/dev/vcs[a]13 did NOT appear.
I waited ~15 secs and ^C'ed cat:

hotplug[1233]: cmd: /sbin/hotplug vc
hotplug[1233]: env: DEVPATH=/class/vc/vcs13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=remove PWD=/ SHLVL=1 HOME=/ SEQNUM=234 _=/sbin/env
hotplug[1235]: cmd: /sbin/hotplug vc
hotplug[1235]: env: DEVPATH=/class/vc/vcsa13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=remove PWD=/ SHLVL=1 HOME=/ SEQNUM=235 _=/sbin/env
hotplug[1233]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1235]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1235]: run: /etc/hotplug.d/default/udev.hotplug vc
hotplug[1233]: run: /etc/hotplug.d/default/udev.hotplug vc

I verified that I do run udevsend:

# ls -l /etc/hotplug.d/default/udev.hotplug
lrwxrwxrwx 1 root root 48 Aug 25 10:53 /etc/hotplug.d/default/udev.hotplug -> /app/udev-030/etc/hotplug.d/default/udev.hotplug

# ls -l /app/udev-030/etc/hotplug.d/default/udev.hotplug
lrwxrwxrwx 1 root root 14 Jul 27 15:35 /app/udev-030/etc/hotplug.d/default/udev.hotplug -> /sbin/udevsend

# ls -l /sbin/udevsend
lrwxrwxrwx 1 root root 27 Aug 25 10:53 /sbin/udevsend -> /app/udev-030/sbin/udevsend

# ls -l /app/udev-030/sbin/udevsend
-rwxr-xr-x 1 root root 6696 Aug 25 10:53 /app/udev-030/sbin/udevsend

Symlink forest may look strange to you, but actually works.

I replaced /app/udev-030/sbin/udevsend with sh script doing
'echo "I AM HERE" | logger' and I do see it in syslog.
I conclude udevsend is being run, but doesn't do it's magic.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/