* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
@ 2015-05-05 21:34 ` Greg KH
2015-05-06 0:43 ` linuxcbon linuxcbon
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2015-05-05 21:34 UTC (permalink / raw)
To: linux-hotplug
On Tue, May 05, 2015 at 09:27:38PM +0000, linuxcbon linuxcbon wrote:
> Hi,
>
> my kernel boots ok and gives the hand to init which runs rc.sysinit.
> I am writing a minimal rc.sysinit.
> It creates /dev with devtmpfs and now all works except udev.
> I need 1 or 2 or 3 lines with udev commands to make it work
> and detect and modprobe needed modules.
> I don't know the minimal and shortest commands to do this ?
> Can you please help me ?
Try using mdev.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
2015-05-05 21:34 ` Greg KH
@ 2015-05-06 0:43 ` linuxcbon linuxcbon
2015-05-06 6:01 ` Tom Gundersen
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linuxcbon linuxcbon @ 2015-05-06 0:43 UTC (permalink / raw)
To: linux-hotplug
On Tue, May 5, 2015 at 10:34 PM, Greg KH <greg@kroah.com> wrote:
> On Tue, May 05, 2015 at 09:27:38PM +0000, linuxcbon linuxcbon wrote:
>> Hi,
>>
>> my kernel boots ok and gives the hand to init which runs rc.sysinit.
>> I am writing a minimal rc.sysinit.
>> It creates /dev with devtmpfs and now all works except udev.
>> I need 1 or 2 or 3 lines with udev commands to make it work
>> and detect and modprobe needed modules.
>> I don't know the minimal and shortest commands to do this ?
>> Can you please help me ?
>
> Try using mdev.
Hi Greg,
I already do this "mount -t devtmpfs dev /dev" which automagically
creates /dev files
When I do a "mdev -s" , it will recreate /dev, so what's the point of
using devtmpfs
I am also not sure if mdev triggers modprobes like udev does ?
If you have some working mdev or udev examples, I will try.
Until now, this problem has been a real pain for me...
Thanks.
linuxcbon
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
2015-05-05 21:34 ` Greg KH
2015-05-06 0:43 ` linuxcbon linuxcbon
@ 2015-05-06 6:01 ` Tom Gundersen
2015-05-06 6:46 ` Robert Milasan
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Tom Gundersen @ 2015-05-06 6:01 UTC (permalink / raw)
To: linux-hotplug
On Tue, May 5, 2015 at 11:27 PM, linuxcbon linuxcbon
<linuxcbon@gmail.com> wrote:
> my kernel boots ok and gives the hand to init which runs rc.sysinit.
> I am writing a minimal rc.sysinit.
> It creates /dev with devtmpfs and now all works except udev.
> I need 1 or 2 or 3 lines with udev commands to make it work
> and detect and modprobe needed modules.
> I don't know the minimal and shortest commands to do this ?
> Can you please help me ?
A good starting point is to look at the ExecStart lines in the udev
service files used by systemd. You'll likely want to pass --daemon to
the main daemon though so that it will fork to the background:
http://cgit.freedesktop.org/systemd/systemd/tree/units/systemd-udevd.service.in
http://cgit.freedesktop.org/systemd/systemd/tree/units/systemd-udev-trigger.service.in
http://cgit.freedesktop.org/systemd/systemd/tree/units/systemd-udev-settle.service.in
(note that the order matters).
Apart from that I don't think anyone is using/testing/developing for
this setup any longer, so you are mostly on your own, sorry.
HTH,
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (2 preceding siblings ...)
2015-05-06 6:01 ` Tom Gundersen
@ 2015-05-06 6:46 ` Robert Milasan
2015-05-06 17:16 ` linuxcbon linuxcbon
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Robert Milasan @ 2015-05-06 6:46 UTC (permalink / raw)
To: linux-hotplug
On Tue, 5 May 2015 21:27:38 +0000
"linuxcbon linuxcbon" <linuxcbon@gmail.com> wrote:
> Hi,
>
> my kernel boots ok and gives the hand to init which runs rc.sysinit.
> I am writing a minimal rc.sysinit.
> It creates /dev with devtmpfs and now all works except udev.
> I need 1 or 2 or 3 lines with udev commands to make it work
> and detect and modprobe needed modules.
> I don't know the minimal and shortest commands to do this ?
> Can you please help me ?
>
> Thanks in advance.
> Linuxcbon
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-hotplug" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
This might help:
# start udev daemon (udevd might be called systemd-udevd)
/path/to/udevd --daemon || echo "udev error" >&2
# trigger events
/path/to/udevadm trigger --actiond || echo "udev trigger error" >&2
/path/to/udevadm trigger --type=subsystems --actiond || echo "udev trigger error" >&2
# wait for events to finish
/path/to/udevadm settle || echo "udev settle error" >&2
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (3 preceding siblings ...)
2015-05-06 6:46 ` Robert Milasan
@ 2015-05-06 17:16 ` linuxcbon linuxcbon
2015-05-06 17:20 ` linuxcbon linuxcbon
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linuxcbon linuxcbon @ 2015-05-06 17:16 UTC (permalink / raw)
To: linux-hotplug
On Wed, May 6, 2015 at 7:01 AM, Tom Gundersen <teg@jklm.no> wrote:
> A good starting point is to look at the ExecStart lines in the udev
> Tom
Hi Tom,
I don't have systemd, I have udev or mdev only.
Thanks.
linuxcbon
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (4 preceding siblings ...)
2015-05-06 17:16 ` linuxcbon linuxcbon
@ 2015-05-06 17:20 ` linuxcbon linuxcbon
2015-05-06 17:33 ` Robert Milasan
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linuxcbon linuxcbon @ 2015-05-06 17:20 UTC (permalink / raw)
To: linux-hotplug
On Wed, May 6, 2015 at 7:46 AM, Robert Milasan <rmilasan@suse.com> wrote:
>
> This might help:
>
> # start udev daemon (udevd might be called systemd-udevd)
> /path/to/udevd --daemon || echo "udev error" >&2
>
> # trigger events
> /path/to/udevadm trigger --action≠d || echo "udev trigger error" >&2
> /path/to/udevadm trigger --type=subsystems --action≠d || echo "udev trigger error" >&2
>
> # wait for events to finish
> /path/to/udevadm settle || echo "udev settle error" >&2
>
> --
> Robert Milasan
Hi Robert,
thanks, actually, I am testing things like that.
Do you know if I need to add a line for --typefivices and what it is for ?
Do you also know the minimal rules to have inside /lib/udev ?
I don't need to add rules inside /etc/udev ?
I also noticed udev mandatorely needs /run/udev, otherwise it doesnt start ?
thanks linuxcbon
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (5 preceding siblings ...)
2015-05-06 17:20 ` linuxcbon linuxcbon
@ 2015-05-06 17:33 ` Robert Milasan
2015-05-07 1:15 ` linuxcbon linuxcbon
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Robert Milasan @ 2015-05-06 17:33 UTC (permalink / raw)
To: linux-hotplug
On Wed, 6 May 2015 18:20:56 +0100
"linuxcbon linuxcbon" <linuxcbon@gmail.com> wrote:
>
> Hi Robert,
> thanks, actually, I am testing things like that.
> Do you know if I need to add a line for --typeÞvices and what it is
No, because --typeÞvices is the default
> for ? Do you also know the minimal rules to have inside /lib/udev ?
Depends on your hardware and what you'll in the future
> I don't need to add rules inside /etc/udev ?
No
> I also noticed udev mandatorely needs /run/udev, otherwise it doesnt
> start ? thanks linuxcbon
/run/udev is required and hardcoded in udev.
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (6 preceding siblings ...)
2015-05-06 17:33 ` Robert Milasan
@ 2015-05-07 1:15 ` linuxcbon linuxcbon
2015-05-07 6:25 ` Robert Milasan
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linuxcbon linuxcbon @ 2015-05-07 1:15 UTC (permalink / raw)
To: linux-hotplug
On Wed, May 6, 2015 at 6:33 PM, Robert Milasan <rmilasan@suse.com> wrote:
> Depends on your hardware and what you'll in the future
> Robert Milasan
Hi Robert,
I have added your lines to sysinit.
For testing, I don't have any /etc/udev and I have an empty /lib/udev/
I get many errors with --debug , for example :
[ 4.304862] udevd[77]: seq 2397 queued, 'add' 'module'
[ 4.304878] udevd[81]: seq 2397 running
[ 4.304890] udevd[81]: no db file to read
/run/udev/data/+module:pata_rz1000: No such file or directory
[ 4.304901] udevd[81]: passed -1 bytes to netlink monitor 0x63dc00
[ 4.304903] udevd[81]: seq 2397 processed with 0
[ 4.304908] udevd[77]: passed 144 bytes to netlink monitor 0x62d3a0
If I understand, for each error, there must be a rule for a modprobe ? sigh...
Cheers.
linuxcbon
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (7 preceding siblings ...)
2015-05-07 1:15 ` linuxcbon linuxcbon
@ 2015-05-07 6:25 ` Robert Milasan
2015-05-07 9:33 ` Tom Gundersen
2015-05-07 9:34 ` Tom Gundersen
10 siblings, 0 replies; 12+ messages in thread
From: Robert Milasan @ 2015-05-07 6:25 UTC (permalink / raw)
To: linux-hotplug
On Thu, 7 May 2015 02:15:51 +0100
"linuxcbon linuxcbon" <linuxcbon@gmail.com> wrote:
> Hi Robert,
> I have added your lines to sysinit.
> For testing, I don't have any /etc/udev and I have an empty /lib/udev/
> I get many errors with --debug , for example :
> [ 4.304862] udevd[77]: seq 2397 queued, 'add' 'module'
> [ 4.304878] udevd[81]: seq 2397 running
> [ 4.304890] udevd[81]: no db file to read
> /run/udev/data/+module:pata_rz1000: No such file or directory
> [ 4.304901] udevd[81]: passed -1 bytes to netlink monitor 0x63dc00
> [ 4.304903] udevd[81]: seq 2397 processed with 0
> [ 4.304908] udevd[77]: passed 144 bytes to netlink monitor 0x62d3a0
> If I understand, for each error, there must be a rule for a
> modprobe ? sigh... Cheers.
> linuxcbon
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-hotplug" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Yes, of course. You don't need udev if you don't have any rules.
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (8 preceding siblings ...)
2015-05-07 6:25 ` Robert Milasan
@ 2015-05-07 9:33 ` Tom Gundersen
2015-05-07 9:34 ` Tom Gundersen
10 siblings, 0 replies; 12+ messages in thread
From: Tom Gundersen @ 2015-05-07 9:33 UTC (permalink / raw)
To: linux-hotplug
On Thu, May 7, 2015 at 3:15 AM, linuxcbon linuxcbon <linuxcbon@gmail.com> wrote:
> On Wed, May 6, 2015 at 6:33 PM, Robert Milasan <rmilasan@suse.com> wrote:
>> Depends on your hardware and what you'll in the future
>> Robert Milasan
>
> Hi Robert,
> I have added your lines to sysinit.
> For testing, I don't have any /etc/udev and I have an empty /lib/udev/
> I get many errors with --debug , for example :
Debug messages are not necessarily errors, these are just information
for developers, so can be safely ignored by a user.
> [ 4.304862] udevd[77]: seq 2397 queued, 'add' 'module'
> [ 4.304878] udevd[81]: seq 2397 running
> [ 4.304890] udevd[81]: no db file to read
> /run/udev/data/+module:pata_rz1000: No such file or directory
> [ 4.304901] udevd[81]: passed -1 bytes to netlink monitor 0x63dc00
> [ 4.304903] udevd[81]: seq 2397 processed with 0
> [ 4.304908] udevd[77]: passed 144 bytes to netlink monitor 0x62d3a0
> If I understand, for each error, there must be a rule for a modprobe ? sigh...
> Cheers.
> linuxcbon
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: how to do ? minimal udev script for my rc.sysinit ?
2015-05-05 21:27 how to do ? minimal udev script for my rc.sysinit ? linuxcbon linuxcbon
` (9 preceding siblings ...)
2015-05-07 9:33 ` Tom Gundersen
@ 2015-05-07 9:34 ` Tom Gundersen
10 siblings, 0 replies; 12+ messages in thread
From: Tom Gundersen @ 2015-05-07 9:34 UTC (permalink / raw)
To: linux-hotplug
On Wed, May 6, 2015 at 7:16 PM, linuxcbon linuxcbon <linuxcbon@gmail.com> wrote:
> On Wed, May 6, 2015 at 7:01 AM, Tom Gundersen <teg@jklm.no> wrote:
>> A good starting point is to look at the ExecStart lines in the udev
>> Tom
>
> Hi Tom,
> I don't have systemd, I have udev or mdev only.
Sure, but you'll want to do the equivalent on your system as what the
systemd service files describe, which is why I suggest that as a
starting point.
-t
^ permalink raw reply [flat|nested] 12+ messages in thread