Re: udev notes
"Andreas V. Meier" <avmeier-S0/[email protected]> Mon, 6 Feb 2006 09:36:46 +0100
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Feb 05, 2006 at 10:21:37PM +0100, Benjamin Schieder wrote:
> Alan J. Wylie wrote:
> > 1) udevstart is no longer in udev 084
> >
> 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.
With my changes to the rockinitrd it does. Unfortunately I had massive
problems creating a patch due to submaster :(
I hope I will have time for this this week.
If you want to do it, my changes (iirc) were:
1. add to included dirs: /etc/udev, /etc/hotplug{,.d}, /lib/udev
2. change in linuxrc: where there is the call to udevstart: put
'echo "" > /proc/sys/kernel/hotplug; /sbin/udevd --daemon' before it.
3. replace udevstart with something like
while read uevent; do echo 1 > $uevent; done < <(find /sys -name uevent)
and maybe some udev-queue waiting, but I just put there a sleep 2.
The main point of udevstart was to synthesize events for devices
already present in kernel, so the started udevd can receive them and
create device nodes. Your missing permissions are probably caused by
missing udev rules on the initrd.
>
> > 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.
I agree. /etc/initscript is used to start processeses listed in
inittab. So these setup steps would be run at least for all virtual
consoles ... nonsense :)
> > 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.
I think this device is created when the events are synthesized. My
kernels also print this warning, but running linuxrc works.
>
> > 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.
But please in the linuxrc, not in initscript :)
>
> > 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.
It's the chicken-egg problem. If we change it in microcode, it will
not work with plain /dev anymore. I think a rule would be best
solution, as it is caused by udev.
Ciao
Andreas
_______________________________________________
rock-devel mailing list
[email protected]
http://www.rocklinux.net/mailman/listinfo/rock-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFD5wqe2A9/vRi9PS4RAp66AJ0T41V1m0DuW5u7nx1yF2T8Y++tGQCfYwg0 b9ELLqUYAPefc5JrIVsIJwQ= =9o98 -----END PGP SIGNATURE-----