Git Product home page Git Product logo

Comments (5)

ryao avatar ryao commented on July 17, 2024

Does running udevadm trigger correct the permissions?

from eudev.

blueness avatar blueness commented on July 17, 2024

The problem is that you don't udevadm trigger late enough in the boot process. I couldn't pin point a good place to do it, but if you run udevadm trigger after boot is over, all the correct permissions and ownership are set. Note you don't need to mount /dev yourself and you should probably check mountpoint /dev before triggering. Sorry I can't help more, but I'm not familiar with the boot scripts.

from eudev.

blueness avatar blueness commented on July 17, 2024

ryao: it does

from eudev.

bkauler avatar bkauler commented on July 17, 2024

We do have to mount /dev ourselves, in the 'init' script in the initramfs, just before doing the switch_root:

mount -t devtmpfs devtmpfs /pup_new/dev

/pup_new will become / after the switch_root.

This explicit mount is required, we determined after some study of the subject.
A system that does not have an initramfs, that boots straight into the rootfs, does not have to explicitly mount /dev, the kernel does it.

By mounting it explicitly in the initramfs, the kernel will create it with all device nodes discovered so far.

After switch_root, the kernel will continue to populate /dev, as we replay uevents from /sys, by two means, after having started udevd (see /etc/rc.d/rc.sysinit):

```MODALIASES="ls /sys/bus/_/devices/_/modalias"
...
load udevd
...
#replay uevents from /sys...
for ONEMODALIAS in $MODALIASES
do
ONEPATH="`dirname $ONEMODALIAS`"
if [ -e ${ONEPATH}/uevent ];then
echo add > ${ONEPATH}/uevent #generates an 'add' uevent.
sleep 0.02
fi
done

2.
and by calls to 'udevadm trigger <parameters>'

...in other words, all (relevant) events are getting replayed from /sys

Ah, I might have solved it, or rather identified the basic cause.

I just looked in /dev, and /dev/ttyUSB0 does have the correct ownership. This node got created later on, when I plugged in my 3G USB stick after bootup.

Ok, it seems that the "focused" replay of events from /sys, that we do in /etc/rc.d/rc.sysinit, rather than a broad "udevadm trigger" to replay everything -- which we avoided for various reasons -- is the cause of this problem.

This is probably enough of a lead for me to fix it. Thanks for the feedback.

from eudev.

bkauler avatar bkauler commented on July 17, 2024

OK, I have implemented a fix in Puppy Linux.
We can consider this one closed.

from eudev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.