View previous topic :: View next topic |
Author |
Message |
uuhan n00b
Joined: 26 Aug 2012 Posts: 20
|
Posted: Tue Oct 02, 2012 10:23 am Post subject: Does udev be able to work inside my initrd ? |
|
|
I have an interesting question , that in some case I would just ues my kernel and initramfs without the root . So , naturally , I think that is it possible that the udev tools work directly inside my initrd by modify my initrd ? Or how to install udev tools inside busybox to work as an initrd ? |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2506 Location: Silver City, NM
|
Posted: Tue Oct 02, 2012 7:15 pm Post subject: |
|
|
Busybox has mdev which is a very lightweight replacement for udev. Some people here use mdev instead of udev on their main Gentoo systems. For an initrd, mdev is almost certainly the way to go.
You need to make sure that busybox has the mdev applet enabled. The mdev "program" will be a symlink named "mdev" to the busybox program. Then (assuming mdev is at /sbin/mdev) you just: Code: | echo > /dev/mdev.seq
echo "/sbin/mdev > /proc/sys/kernel/hotplug
mdev -s |
If you want mdev to autoload/unload module then created /etc/mdev.conf that contains: Code: | $MODALIAS=.* root:root 660 @modprobe "$MODALIAS" |
Here are some links for converting your Gentoo system to mdev:
https://wiki.gentoo.org/wiki/Mdev
https://github.com/slashbeast/mdev-like-a-boss
It is perfectly fine to use mdev in your initrd and use udev in your main system. This is what's normally done. |
|
Back to top |
|
|
|