Re: udev notes
Benjamin Schieder <blindcoder-1k+CIuW/[email protected]> Sun, 05 Feb 2006 22:21:37 +0100
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alan J. Wylie wrote:
> 1) udevstart is no longer in udev 084
>
> <http://lwn.net/Articles/154268/>
> <http://article.gmane.org/gmane.linux.hotplug.devel/9251>
>
> the recommended way of setting up the device nodes from kernel
> 2.6.15 on is now something like:
>
> --------------------------------------------------------------------------
> for i in /sys/block/*/uevent; do echo 1 > $i; done
> for i in /sys/block/*/*/uevent; do echo 1 > $i; done
> for i in /sys/class/*/*/uevent; do echo 1 > $i; done
> for i in /sys/class/*/*/*/uevent; do echo 1 > $i; done
> for i in /sys/bus/*/devices/*/uevent; do echo 1 > $i; done
>
> # wait until udevd has finished before using devices, e.g. swap
> loop=0
> while test -d /dev/.udev/queue; do
> sleep 0.1;
> if test "$loop" -gt 300
> then
> echo "udev queue timed out"
> status=1
> break
> fi
>
> loop=$(($loop + 1))
> done
> --------------------------------------------------------------------------
What about creating a script called 'udevstart' that does exactly this? I would
need this because currently udev doesn't set users and group permissions from
within the initrd, no idea why. /etc/{passwd,group} are there.
> 2) If /etc/initscript is going to do all the setup, we no longer need
> to mount /proc, /sys, /dev/shm and /dev/pts in /etc/init.d/system,
> or for /etc/init.d/udev to exist
Should be done from the initrd.
> 3) It seems that you need to have a console char device in the /dev
> directory on the root file system, otherwise the kernel gives an
> error message "Warning: unable to open an initial console".
> See linux/init/main.c before it tries to exec init.
> Without this, adding "init=/bin/sh" to the grub line won't work.
Without it, _nothing_ will ever boot, because the moment the kernel gives
control to a userspace program it will die with:
PANIC: Can't open initial console.
> 4) "kill -USR1 1" in /etc/initscript after /dev is mounted will cause
> init to close and reopen its control fifo /dev/initctl which will
> otherwise be hidden.
Good, let's do that.
> 5) With udev, /dev/misc/microcode is instead at /dev/cpu/microcode.
>
> The patch file package/x86/microcode_ctl/devfs.patch is not
> applicable to udev based systems.
>
> Create a compatibility symlink in a udev rule perhaps?
Do other programs but microcode_ctl depend on /dev/misc/microcode? Otherwise
change that package to use /dev/cpu/microcode and be done with it.
Greetings,
Benjamin
- --
Today, memory either forgets things when you don't want it to,
or remembers things long after they're better forgotten.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFD5mxhr0OTeImXvg8RAibeAJwNcoIADT95yi4pvoYvvdSo2O2u9ACg26vo
LA5kZ38VE+4cjJFqm4jsvFs=
=7JAG
-----END PGP SIGNATURE-----