* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
@ 2004-02-19 19:36 ` James Simmons
2004-02-19 19:46 ` Greg KH
2004-02-19 20:21 ` James Simmons
` (4 subsequent siblings)
5 siblings, 1 reply; 26+ messages in thread
From: James Simmons @ 2004-02-19 19:36 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
Here is a question for you. Presently both the serial ttys and VT ttys
share the same major number. Minor number 1 to 63 is allocated to the VTs
and 64 and above to serial ttys. One of the great limitations for my home
system is that I can have only 63 VTs. Can udev work around this
limitation?
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 19:36 ` James Simmons
@ 2004-02-19 19:46 ` Greg KH
0 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2004-02-19 19:46 UTC (permalink / raw)
To: James Simmons; +Cc: linux-hotplug-devel, linux-kernel
On Thu, Feb 19, 2004 at 07:36:07PM +0000, James Simmons wrote:
>
> Here is a question for you. Presently both the serial ttys and VT ttys
> share the same major number. Minor number 1 to 63 is allocated to the VTs
> and 64 and above to serial ttys. One of the great limitations for my home
> system is that I can have only 63 VTs. Can udev work around this
> limitation?
udev can create different /dev nodes for these devices. But as udev
does not modify the kernel code at all, it can not "solve" the
duplication of numbers in the kernel at all. Nor is it meant to.
Hope this helps,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
2004-02-19 19:36 ` James Simmons
@ 2004-02-19 20:21 ` James Simmons
2004-02-19 20:28 ` Greg KH
2004-02-20 0:52 ` Andries Brouwer
2004-02-19 21:35 ` James Simmons
` (3 subsequent siblings)
5 siblings, 2 replies; 26+ messages in thread
From: James Simmons @ 2004-02-19 20:21 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
> udev can create different /dev nodes for these devices. But as udev
> does not modify the kernel code at all, it can not "solve" the
> duplication of numbers in the kernel at all. Nor is it meant to.
Okay. If I change the major number of serial ttys inside the kernel
of course udev would properly handle this. Now the question is would this
break userland applications using the serial port?
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 20:21 ` James Simmons
@ 2004-02-19 20:28 ` Greg KH
2004-02-20 0:52 ` Andries Brouwer
1 sibling, 0 replies; 26+ messages in thread
From: Greg KH @ 2004-02-19 20:28 UTC (permalink / raw)
To: James Simmons; +Cc: linux-hotplug-devel, linux-kernel
On Thu, Feb 19, 2004 at 08:21:25PM +0000, James Simmons wrote:
>
> > udev can create different /dev nodes for these devices. But as udev
> > does not modify the kernel code at all, it can not "solve" the
> > duplication of numbers in the kernel at all. Nor is it meant to.
>
> Okay. If I change the major number of serial ttys inside the kernel
> of course udev would properly handle this. Now the question is would this
> break userland applications using the serial port?
Userland apps use /dev names, not major:minor number pairs, right? So
userspace should be just fine as long as you tell it the proper /dev
name to use.
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 20:21 ` James Simmons
2004-02-19 20:28 ` Greg KH
@ 2004-02-20 0:52 ` Andries Brouwer
2004-02-20 23:57 ` Greg KH
1 sibling, 1 reply; 26+ messages in thread
From: Andries Brouwer @ 2004-02-20 0:52 UTC (permalink / raw)
To: James Simmons; +Cc: Greg KH, linux-hotplug-devel, linux-kernel
On Thu, Feb 19, 2004 at 08:21:25PM +0000, James Simmons wrote:
> Okay. If I change the major number of serial ttys inside the kernel
> of course udev would properly handle this. Now the question is would this
> break userland applications using the serial port?
Yes, a few of them.
Ordinarily, userland software uses pathnames in /dev.
But some software knows too much.
In dietlibc-0.20 one can read:
char *ttyname(int fd) {
...
if (S_ISCHR(s.st_mode)) {
n=minor(s.st_rdev);
switch (major(s.st_rdev)) {
case 4:
...
case 2:
...
case 136:
case 137:
case 138:
case 139:
...
}
This code knows about the actual values of majors.
There are lots of examples like this.
For stable use of Linux one must preserve the 16-bit legacy area.
On the other hand, if the goal is to find and eradicate all such
ugly uses of explicit device numbers, Linus' idea to make it all
random will certainly help.
(But a big grep for st_rdev might be more efficient.)
Andries
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
2004-02-19 19:36 ` James Simmons
2004-02-19 20:21 ` James Simmons
@ 2004-02-19 21:35 ` James Simmons
2004-02-19 22:22 ` Frédéric L. W. Meunier
` (2 subsequent siblings)
5 siblings, 0 replies; 26+ messages in thread
From: James Simmons @ 2004-02-19 21:35 UTC (permalink / raw)
To: Greg KH; +Cc: linux-hotplug-devel, linux-kernel
> > Okay. If I change the major number of serial ttys inside the kernel
> > of course udev would properly handle this. Now the question is would this
> > break userland applications using the serial port?
>
> Userland apps use /dev names, not major:minor number pairs, right? So
> userspace should be just fine as long as you tell it the proper /dev
> name to use.
Just want to make sure.
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
` (2 preceding siblings ...)
2004-02-19 21:35 ` James Simmons
@ 2004-02-19 22:22 ` Frédéric L. W. Meunier
2004-02-19 22:25 ` Frédéric L. W. Meunier
2004-02-19 23:07 ` Greg KH
2004-02-21 17:42 ` Marco d'Itri
2004-02-22 0:30 ` Frédéric L. W. Meunier
5 siblings, 2 replies; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-19 22:22 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Greg KH wrote:
> - modify the rc.sysinit script to call the start_udev script as one of
> the first things that it does, but after /proc and /sys are mounted.
> I did this with the latest Fedora startup scripts with the patch at
> the end of this file.
>
> - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
> It should contain the following line in order to work properly.
> udev_root="/dev/"
>
> - reboot into a 2.6 kernel and watch udev create all of the initial
> device nodes in /dev
>
>
> If anyone has any problems with this, please let me, and the
> linux-hotplug-devel@lists.sourceforge.net mailing list know.
Unless I'm missing something, it doesn't seem to work if you
don't have /dev/null before it gets mounted.
I got
Creating initial udev device nodes:
/etc/rc.d/start_udev: line 90: cannot redirect standard input from /dev/null: No such file or directory.
and it didn't boot.
My first rc.S lines have:
mount -vn -t proc proc /proc # Needed for LABEL= in /etc/fstab
mount -vn -t sysfs sysfs /sys
/etc/rc.d/start_udev
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 22:22 ` Frédéric L. W. Meunier
@ 2004-02-19 22:25 ` Frédéric L. W. Meunier
2004-02-19 23:07 ` Greg KH
1 sibling, 0 replies; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-19 22:25 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Frédéric L. W. Meunier wrote:
> Unless I'm missing something, it doesn't seem to work if you
> don't have /dev/null before it gets mounted.
>
> I got
>
> Creating initial udev device nodes:
> /etc/rc.d/start_udev: line 90: cannot redirect standard input from /dev/null: No such file or directory.
>
> and it didn't boot.
>
> My first rc.S lines have:
>
> mount -vn -t proc proc /proc # Needed for LABEL= in /etc/fstab
>
> mount -vn -t sysfs sysfs /sys
>
> /etc/rc.d/start_udev
Sorry, forgot to mention that line 90 is
$udevd &
since I added a
mknod /dev/fb0 c 29 0
just before
run_udev
Is it the right procedure until udev created the frame buffer
devices ?
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 22:22 ` Frédéric L. W. Meunier
2004-02-19 22:25 ` Frédéric L. W. Meunier
@ 2004-02-19 23:07 ` Greg KH
2004-02-19 23:46 ` Frédéric L. W. Meunier
1 sibling, 1 reply; 26+ messages in thread
From: Greg KH @ 2004-02-19 23:07 UTC (permalink / raw)
To: Frédéric L. W. Meunier; +Cc: linux-kernel, linux-hotplug-devel
On Thu, Feb 19, 2004 at 07:22:30PM -0300, Frédéric L. W. Meunier wrote:
> On Thu, 19 Feb 2004, Greg KH wrote:
>
> > - modify the rc.sysinit script to call the start_udev script as one of
> > the first things that it does, but after /proc and /sys are mounted.
> > I did this with the latest Fedora startup scripts with the patch at
> > the end of this file.
> >
> > - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
> > It should contain the following line in order to work properly.
> > udev_root="/dev/"
> >
> > - reboot into a 2.6 kernel and watch udev create all of the initial
> > device nodes in /dev
> >
> >
> > If anyone has any problems with this, please let me, and the
> > linux-hotplug-devel@lists.sourceforge.net mailing list know.
>
> Unless I'm missing something, it doesn't seem to work if you
> don't have /dev/null before it gets mounted.
Did you build udev using glibc or klibc? I used klibc and it worked
just fine, as udev and udevd does not need /dev/null to work, unlike
programs built against glibc.
As for needing the fb nodes, you should probably just add them to the
start_udev script in the section that we add the other needed symlinks
to /dev until the kernel starts exporting those sysfs entries (hopefully
any day now...)
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 23:07 ` Greg KH
@ 2004-02-19 23:46 ` Frédéric L. W. Meunier
2004-02-19 23:56 ` Greg KH
0 siblings, 1 reply; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-19 23:46 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Greg KH wrote:
> On Thu, Feb 19, 2004 at 07:22:30PM -0300, Frédéric L. W. Meunier wrote:
> > On Thu, 19 Feb 2004, Greg KH wrote:
> >
> > > - modify the rc.sysinit script to call the start_udev script as one of
> > > the first things that it does, but after /proc and /sys are mounted.
> > > I did this with the latest Fedora startup scripts with the patch at
> > > the end of this file.
> > >
> > > - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
> > > It should contain the following line in order to work properly.
> > > udev_root="/dev/"
> > >
> > > - reboot into a 2.6 kernel and watch udev create all of the initial
> > > device nodes in /dev
> > >
> > >
> > > If anyone has any problems with this, please let me, and the
> > > linux-hotplug-devel@lists.sourceforge.net mailing list know.
> >
> > Unless I'm missing something, it doesn't seem to work if you
> > don't have /dev/null before it gets mounted.
>
> Did you build udev using glibc or klibc? I used klibc and it worked
> just fine, as udev and udevd does not need /dev/null to work, unlike
> programs built against glibc.
I used your instructions, so klibc.
# ldd /sbin/udev*
/sbin/udev:
not a dynamic executable
/sbin/udevd:
not a dynamic executable
/sbin/udevinfo:
not a dynamic executable
/sbin/udevsend:
not a dynamic executable
/sbin/udevtest:
not a dynamic executable
It doesn't complain if I mount in /udev after I boot with
devfs, probably because it can find /dev/null etc. But I want
to boot with devfs=nomount and use it in /dev.
I changed /etc/rc.d/rc.S to:
[ -e /dev/.devfsd -a -x /sbin/devfsd ] && devfsd /dev
mount -vn -t proc proc /proc # Needed for LABEL= in /etc/fstab
mount -vn -t sysfs sysfs /sys
[ ! -e /dev/.devfsd -a -d /sys/block ] && /etc/rc.d/start_udev
but it shouldn't make any difference. It's just to not use both
at the same time or try to run the script in 2.4.
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 23:46 ` Frédéric L. W. Meunier
@ 2004-02-19 23:56 ` Greg KH
2004-02-20 0:51 ` Frédéric L. W. Meunier
0 siblings, 1 reply; 26+ messages in thread
From: Greg KH @ 2004-02-19 23:56 UTC (permalink / raw)
To: Frédéric L. W. Meunier; +Cc: linux-kernel, linux-hotplug-devel
On Thu, Feb 19, 2004 at 08:46:42PM -0300, Frédéric L. W. Meunier wrote:
> On Thu, 19 Feb 2004, Greg KH wrote:
>
> > On Thu, Feb 19, 2004 at 07:22:30PM -0300, Frédéric L. W. Meunier wrote:
> > > On Thu, 19 Feb 2004, Greg KH wrote:
> > >
> > > > - modify the rc.sysinit script to call the start_udev script as one of
> > > > the first things that it does, but after /proc and /sys are mounted.
> > > > I did this with the latest Fedora startup scripts with the patch at
> > > > the end of this file.
> > > >
> > > > - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
> > > > It should contain the following line in order to work properly.
> > > > udev_root="/dev/"
> > > >
> > > > - reboot into a 2.6 kernel and watch udev create all of the initial
> > > > device nodes in /dev
> > > >
> > > >
> > > > If anyone has any problems with this, please let me, and the
> > > > linux-hotplug-devel@lists.sourceforge.net mailing list know.
> > >
> > > Unless I'm missing something, it doesn't seem to work if you
> > > don't have /dev/null before it gets mounted.
> >
> > Did you build udev using glibc or klibc? I used klibc and it worked
> > just fine, as udev and udevd does not need /dev/null to work, unlike
> > programs built against glibc.
>
> I used your instructions, so klibc.
>
> # ldd /sbin/udev*
>
> /sbin/udev:
> not a dynamic executable
> /sbin/udevd:
> not a dynamic executable
> /sbin/udevinfo:
> not a dynamic executable
> /sbin/udevsend:
> not a dynamic executable
> /sbin/udevtest:
> not a dynamic executable
>
> It doesn't complain if I mount in /udev after I boot with
> devfs, probably because it can find /dev/null etc. But I want
> to boot with devfs=nomount and use it in /dev.
I agree, that would be the best.
So if you take out the line about starting udevd, does it work for you?
How about changing the #!/bin/bash to #!/bin/sash in the first line for
the start_udev script?
What distro is this?
Can you run strace on the start_udev script after boot to see who is
needing access to /dev/null?
Oh, and if you create the /dev/null node as the first thing in the
start_udev script does that work?
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 23:56 ` Greg KH
@ 2004-02-20 0:51 ` Frédéric L. W. Meunier
2004-02-20 1:09 ` Frédéric L. W. Meunier
2004-02-20 1:54 ` Greg KH
0 siblings, 2 replies; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-20 0:51 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Greg KH wrote:
> So if you take out the line about starting udevd, does it
> work for you?
No.
> How about changing the #!/bin/bash to #!/bin/sash in the
> first line for the start_udev script?
I didn't have it, but compiled and changed. Yes, it works.
> What distro is this?
Slackware, with a cute rc.S. /bin/bash was also recompiled, shared:
$ ldd /bin/bash
libreadline.so.4 => /usr/lib/libreadline.so.4 (0x4001c000)
libhistory.so.4 => /usr/lib/libhistory.so.4 (0x40049000)
libncurses.so.5 => /lib/libncurses.so.5 (0x40050000)
libdl.so.2 => /lib/libdl.so.2 (0x4008f000)
libc.so.6 => /lib/libc.so.6 (0x40092000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Maybe the problem ? Does yours differ ?
bash from Slackware:
libtermcap.so.2 => /lib/libtermcap.so.2 (0x4001c000)
libdl.so.2 => /lib/libdl.so.2 (0x4005c000)
libc.so.6 => /lib/libc.so.6 (0x4005f000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
OK, I'll later boot with it and see if it works. If it does,
I'll run strace with the other.
> Can you run strace on the start_udev script after boot to see who is
> needing access to /dev/null?
I forgot to run it, but noticed there was a /dev/null, but a
text file (0644). And I didn't create it anywhere.
> Oh, and if you create the /dev/null node as the first thing in the
> start_udev script does that work?
No.
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-20 0:51 ` Frédéric L. W. Meunier
@ 2004-02-20 1:09 ` Frédéric L. W. Meunier
2004-02-20 1:54 ` Greg KH
1 sibling, 0 replies; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-20 1:09 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Frédéric L. W. Meunier wrote:
> On Thu, 19 Feb 2004, Greg KH wrote:
>
> > What distro is this?
>
> Slackware, with a cute rc.S. /bin/bash was also recompiled, shared:
>
> $ ldd /bin/bash
> libreadline.so.4 => /usr/lib/libreadline.so.4 (0x4001c000)
> libhistory.so.4 => /usr/lib/libhistory.so.4 (0x40049000)
> libncurses.so.5 => /lib/libncurses.so.5 (0x40050000)
> libdl.so.2 => /lib/libdl.so.2 (0x4008f000)
> libc.so.6 => /lib/libc.so.6 (0x40092000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> Maybe the problem ? Does yours differ ?
>
> bash from Slackware:
>
> libtermcap.so.2 => /lib/libtermcap.so.2 (0x4001c000)
> libdl.so.2 => /lib/libdl.so.2 (0x4005c000)
> libc.so.6 => /lib/libc.so.6 (0x4005f000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> OK, I'll later boot with it and see if it works. If it does,
> I'll run strace with the other.
No, it also fails. Does it only work with a static bash ?
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-20 0:51 ` Frédéric L. W. Meunier
2004-02-20 1:09 ` Frédéric L. W. Meunier
@ 2004-02-20 1:54 ` Greg KH
2004-02-20 2:28 ` Frédéric L. W. Meunier
1 sibling, 1 reply; 26+ messages in thread
From: Greg KH @ 2004-02-20 1:54 UTC (permalink / raw)
To: Frédéric L. W. Meunier; +Cc: linux-kernel, linux-hotplug-devel
On Thu, Feb 19, 2004 at 09:51:52PM -0300, Frédéric L. W. Meunier wrote:
> On Thu, 19 Feb 2004, Greg KH wrote:
>
> > So if you take out the line about starting udevd, does it
> > work for you?
>
> No.
>
> > How about changing the #!/bin/bash to #!/bin/sash in the
> > first line for the start_udev script?
>
> I didn't have it, but compiled and changed. Yes, it works.
>
> > What distro is this?
>
> Slackware, with a cute rc.S. /bin/bash was also recompiled, shared:
>
> $ ldd /bin/bash
> libreadline.so.4 => /usr/lib/libreadline.so.4 (0x4001c000)
> libhistory.so.4 => /usr/lib/libhistory.so.4 (0x40049000)
> libncurses.so.5 => /lib/libncurses.so.5 (0x40050000)
> libdl.so.2 => /lib/libdl.so.2 (0x4008f000)
> libc.so.6 => /lib/libc.so.6 (0x40092000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> Maybe the problem ? Does yours differ ?
Mine does differ, but it is dynamic:
$ ldd /bin/bash
linux-gate.so.1 => (0xffffe000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x4d5b5000)
libdl.so.2 => /lib/libdl.so.2 (0x4d3b4000)
libc.so.6 => /lib/tls/libc.so.6 (0x4d254000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4d238000)
> bash from Slackware:
>
> libtermcap.so.2 => /lib/libtermcap.so.2 (0x4001c000)
> libdl.so.2 => /lib/libdl.so.2 (0x4005c000)
> libc.so.6 => /lib/libc.so.6 (0x4005f000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> OK, I'll later boot with it and see if it works. If it does,
> I'll run strace with the other.
How about using sash? That is statically linked.
> > Can you run strace on the start_udev script after boot to see who is
> > needing access to /dev/null?
>
> I forgot to run it, but noticed there was a /dev/null, but a
> text file (0644). And I didn't create it anywhere.
That sounds like some program is trying to write to it.
Hm, there is a patch in the Red Hat version of udev that basically makes
udev do the start_udev logic, in the .c file because they do not have a
shell in their initrd. If you can dig it out of there, that might be a
solution for you to use.
Other than that, how about running strace on start_udev when your rc.S
script calls it? That might help out.
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-20 1:54 ` Greg KH
@ 2004-02-20 2:28 ` Frédéric L. W. Meunier
2004-02-20 7:44 ` Frédéric L. W. Meunier
0 siblings, 1 reply; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-20 2:28 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, linux-hotplug-devel
On Thu, 19 Feb 2004, Greg KH wrote:
> On Thu, Feb 19, 2004 at 09:51:52PM -0300, Frédéric L. W. Meunier wrote:
> > On Thu, 19 Feb 2004, Greg KH wrote:
> >
> > > How about changing the #!/bin/bash to #!/bin/sash in the
> > > first line for the start_udev script?
> >
> > I didn't have it, but compiled and changed. Yes, it works.
>
> > OK, I'll later boot with it and see if it works. If it does,
> > I'll run strace with the other.
>
> How about using sash? That is statically linked.
As I reported, it works with it.
> > I forgot to run it, but noticed there was a /dev/null, but
> > a text file (0644). And I didn't create it anywhere.
> That sounds like some program is trying to write to it.
I bet it was fsck. It was the last to run before sulogin.
> Hm, there is a patch in the Red Hat version of udev that basically makes
> udev do the start_udev logic, in the .c file because they do not have a
> shell in their initrd. If you can dig it out of there, that might be a
> solution for you to use.
Sounds good to get rid of the script. I'll see.
> Other than that, how about running strace on start_udev when your rc.S
> script calls it? That might help out.
I did it, and guess what, it worked.
-[ ! -e /dev/.devfsd -a -d /sys/block ] && /etc/rc.d/start_udev
+[ ! -e /dev/.devfsd -a -d /sys/block ] && strace -o /tmp/udev.txt /etc/rc.d/start_udev
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
` (3 preceding siblings ...)
2004-02-19 22:22 ` Frédéric L. W. Meunier
@ 2004-02-21 17:42 ` Marco d'Itri
2004-02-22 0:30 ` Frédéric L. W. Meunier
5 siblings, 0 replies; 26+ messages in thread
From: Marco d'Itri @ 2004-02-21 17:42 UTC (permalink / raw)
To: linux-hotplug
On Feb 20, Greg KH <greg@kroah.com> wrote:
>> I forgot to run it, but noticed there was a /dev/null, but a
>> text file (0644). And I didn't create it anywhere.
>That sounds like some program is trying to write to it.
It's the shell (both bash and dash), when "&" is used.
For the debian package I choose to create /dev/null with mknod before
starting udevd.
>Hm, there is a patch in the Red Hat version of udev that basically makes
BTW, where can I find this red hat SRPMS?
--
ciao, |
Marco | [4692 giUNXjrsFD.2k]
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: HOWTO use udev to manage /dev
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
` (4 preceding siblings ...)
2004-02-21 17:42 ` Marco d'Itri
@ 2004-02-22 0:30 ` Frédéric L. W. Meunier
5 siblings, 0 replies; 26+ messages in thread
From: Frédéric L. W. Meunier @ 2004-02-22 0:30 UTC (permalink / raw)
To: linux-hotplug
On Sat, 21 Feb 2004, Marco d'Itri wrote:
> On Feb 20, Greg KH <greg@kroah.com> wrote:
>
> >> I forgot to run it, but noticed there was a /dev/null, but a
> >> text file (0644). And I didn't create it anywhere.
> >That sounds like some program is trying to write to it.
> It's the shell (both bash and dash), when "&" is used.
> For the debian package I choose to create /dev/null with mknod before
> starting udevd.
dash ? If it's sash, it worked fine here. The same with bash
when I used
[ ! -e /dev/.devfsd -a -d /sys/block ] && strace -o /tmp/udev.txt /etc/rc.d/start_udev
instead of
[ ! -e /dev/.devfsd -a -d /sys/block ] && /etc/rc.d/start_udev
> >Hm, there is a patch in the Red Hat version of udev that basically makes
> BTW, where can I find this red hat SRPMS?
I too can't find it.
http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/udev-016-2.src.rpm
doesn't contain any such changes.
--
http://www.pervalidus.net/contact.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 26+ messages in thread