<p><br> On Nov 15, 2011 1:24 PM, <<a href="mailto:waltdnes@waltdnes.org">waltdnes@waltdnes.org</a>> wrote:<br> ><br> > After a recent thread, about udev developers wanting /usr on the same<br> > partition as / (or else requiring initramfs), it was pretty obvious<br> > that 90%+ of the users here strongly disliked the idea. I went around<br> > asking on various lists if it was possible to run Gentoo without udev.<br> > After some research, and various unrelated delays, I've come up with a<br> > working Gentoo without udev. It turns out that busybox's mdev<br> > implementation is sufficient for my needs. I do the usual email, web<br> > surfing, including Youtube. I'm listening to Live365.com as I type this<br> > email, so Flash works just fine. Contrary to the FUD I've heard, X<br> > works just fine, thank you, without an xorg.conf. Modern flatscreens<br> > with EDID info are set up automatically. I suppose that old CRT<br> > monitors without EDID info might require xorg.conf, but that's "exotic<br> > hardware" nowadays. The only change I notice is somewhat faster bootup.<br> ><br> > The purpose of this email is to ask adventurous people here to beta<br> > test my approach to a udev-less Gentoo. If we don't find any<br> > showstopper problems, we can think about requesting Gentoo developers to<br> > support an mdev-based profile. It would help the cause if a large<br> > number of testers can report that it works for them. The instructions<br> > for a udev-ectomy follow below. Thanks to Zac Medico and others on the<br> > Gentoo developers' list for their helpful hints and pointers on how to<br> > do this. I couldn't have figured this out by myself.<br> ><br> > The usual warnings apply...<br> > * this is a beta<br> > * use a spare test machine<br> > * if you don't follow the instructions correctly, the result might be<br> > an unbootable linux<br> > * even if you do follow instructions, the result might be an unbootable<br> > linux<br> ><br> ><br> > 1) Set up your kernel to support and automount a devtmpfs filesystem at<br> > /dev<br> ><br> > * If you prefer to edit .config directly, set<br> > CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y<br> ><br> > * If you prefer "make menuconfig", the route is as shown below. Note<br> > that the "Autount devtmpfs..." option won't appear until you enable<br> > "Maintain a devtmpf..." option.<br> ><br> > make menuconfig<br> > Device Drivers ---><br> > Generic Driver Options ---><br> > [*] Maintain a devtmpfs filesystem to mount at /dev<br> > [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs<br> ><br> > Once you've made the changes, rebuild the kernel.<br> ><br> ><br> > 2) Set up for emerging busybox, there are 2 items to change<br> ><br> > A) It appears that there may be an mdev bug in older versions of<br> > busybox. To avoid that bug, keyword busybox-1.19.2 in<br> > /etc/portage/package.keywords E.g. if you're using 32-bit Gentoo on<br> > Intel, the incantation is...<br> ><br> > =sys-apps/busybox-1.19.2 ~x86<br> ><br> > Change the "~x86" to reflect your architecture, etc.<br> ><br> > B) busybox requires the "mdev" flag in this situation. The "static"<br> > flag is probably also a good idea. In file /etc/portage/package.use<br> > add the line<br> ><br> > sys-apps/busybox static mdev<br> ><br> > Now, "emerge busybox"<br> ><br> ><br> > 3) In the bootloader append line, include "init=/sbin/linuxrc" where<br> > the file /sbin/linuxrc consists of *AT LEAST*...<br> ><br> > #!/sbin/busybox ash<br> > mount -t proc proc /proc<br> > mount -t sysfs sysfs /sys<br> > exec /sbin/init<br> ><br> > This should be enough for most users. If you have an unusual setup,<br> > you may need additional stuff in there. If you're using lilo remember<br> > to re-run lilo to implement the changes.<br> ><br> > 4) Remove udev from the services list, and replace it with mdev. Type<br> > the following 2 commands at the command line<br> > rc-update del udev sysinit<br> > rc-update add mdev sysinit<br> ><br> ><br> > 5) reboot to your new kernel. You're now running without using udev.<br> ><br> ><br> > 6) ***THIS STEP IS OPTIONAL*** This is only to alay any suspicion that<br> > udev is still in use. udev is pulled in by virtual/dev-manager,<br> > which in turn is pulled in by the kernel.<br> > * cd /usr/portage/virtual/dev-manager<br> > * Make a backup copy of dev-manager-0.ebuild<br> > * Edit dev-manager-0.ebuild to include "sys-apps/busybox" as one option<br> > in RDEPEND, like so...<br> ><br> > RDEPEND="|| ( sys-fs/udev<br> > sys-fs/devfsd<br> > sys-apps/busybox<br> > sys-fs/static-dev<br> > sys-freebsd/freebsd-sbin )"<br> ><br> > I had really wanted to use "sys-apps/busybox[mdev]", but an EAPI-0<br> > ebuild can't handle that syntax.<br> ><br> > * execute the following 3 commands at the commandline<br> > ebuild dev-manager-0.ebuild digest<br> > emerge -1 dev-manager<br> > emerge --unmerge sys-fs/udev<br> ><br> > * In file /atc/portage/package.mask, append the line<br> > sys-fs/udev<br> > Create the file if it doesn't already exist. You now have a totally<br> > udev-free machine<br> ></p> <p>Sounds nice!</p> <p>However, my Gentoo systems are all virtual servers (DomU VMs on XenServer). So, the hardware devices are static. Will switching over to mdev give any benefits?</p> <p>I even am toying around with the idea of having a completely static /dev, but still can't find any guide/pointers yet.</p> <p>(Apologies if my email is OOT)</p> <p>Rgds,<br> </p>