Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does udev be able to work inside my initrd ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
uuhan
n00b
n00b


Joined: 26 Aug 2012
Posts: 20

PostPosted: Tue Oct 02, 2012 10:23 am    Post subject: Does udev be able to work inside my initrd ? Reply with quote

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
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Tue Oct 02, 2012 7:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum