From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RWCbW-0004hN-1s for garchives@archives.gentoo.org; Thu, 01 Dec 2011 19:47:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC19521C172; Thu, 1 Dec 2011 19:47:20 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AA89121C163 for ; Thu, 1 Dec 2011 19:46:09 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAPnX105MCqTq/2dsb2JhbAA+Bqp7gQaBcgEBBScTHDMLEiISFCUQFBPAEoNshAuCRmMEiCiERCcBh0KFU4gPhE8 X-IronPort-AV: E=Sophos;i="4.71,280,1320642000"; d="scan'208";a="150426275" Received: from 76-10-164-234.dsl.teksavvy.com (HELO waltdnes.org) ([76.10.164.234]) by ironport2-out.teksavvy.com with SMTP; 01 Dec 2011 14:46:06 -0500 Received: by waltdnes.org (sSMTP sendmail emulation); Thu, 01 Dec 2011 14:45:45 -0500 From: "Walter Dnes" Date: Thu, 1 Dec 2011 14:45:45 -0500 To: Gentoo Users List Subject: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 3 Message-ID: <20111201194544.GD4455@waltdnes.org> References: <20111115062115.GA3262@waltdnes.org> <20111121104724.GC7461@waltdnes.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111121104724.GC7461@waltdnes.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 65125324-727c-4ad8-884b-022941cb2e2f X-Archives-Hash: bc91b392ee0f76376104591cdf7dc5f0 Corrected "#!/sbin/busybox ash" to "#!/bin/busybox ash" in step 3. The weird part is that my system actually booted and ran fine even with this typo in the script. The usual warnings apply... * this is a beta * use a spare test machine * if you don't follow the instructions correctly, the result might be an unbootable linux * even if you do follow instructions, the result might be an unbootable linux 1) Set up your kernel to support and automount a devtmpfs filesystem at /dev * If you prefer to edit .config directly, set CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y * If you prefer "make menuconfig", the route is as shown below. Note that the "Autount devtmpfs..." option won't appear until you enable "Maintain a devtmpf..." option. make menuconfig Device Drivers ---> Generic Driver Options ---> [*] Maintain a devtmpfs filesystem to mount at /dev [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs Once you've made the changes, rebuild the kernel. 2) Set up for emerging busybox, there are 2 items to change A) It appears that there may be an mdev bug in older versions of busybox. To avoid that bug, keyword busybox-1.19.2 in /etc/portage/package.keywords E.g. if you're using 32-bit Gentoo on Intel, the incantation is... =sys-apps/busybox-1.19.2 ~x86 Change the "~x86" to reflect your architecture, etc. B) busybox requires the "mdev" flag in this situation. The "static" flag is probably also a good idea. In file /etc/portage/package.use add the line sys-apps/busybox static mdev Now, "emerge busybox" 3) In the bootloader append line, include "init=/sbin/linuxrc" where the file /sbin/linuxrc consists of *AT LEAST*... #!/bin/busybox ash mount -t proc proc /proc mount -t sysfs sysfs /sys exec /sbin/init This should be enough for most users. If you have an unusual setup, you may need additional stuff in there. If you're using lilo remember to re-run lilo to implement the changes. 4) Remove udev from the services list, and replace it with mdev. Type the following 2 commands at the command line rc-update del udev sysinit rc-update add mdev sysinit 5) reboot to your new kernel. You're now running without using udev. 6) ***THIS STEP IS OPTIONAL*** This is only to alay any suspicion that udev is still in use. udev is pulled in by virtual/dev-manager, which in turn is pulled in by the kernel. * If you don't already have an overlay, create one, and implement it in /etc/make.conf. In the following example, I'll use my setup, which has the overlay in /usr/local/portage * copy the contents of /usr/portage/virtual/dev-manager/ to /usr/local/portage/virtual/dev-manager/ * cd /usr/local/portage/virtual/dev-manager/ * Edit the dev-manager-0.ebuild in the overlay to include "sys-apps/busybox[mdev]" as one option in RDEPEND. And also include "EAPI=2" at the top of the ebuild, which is required for this syntax. The revised ebuild is shown below. ############################################ EAPI=2 DESCRIPTION="Virtual for the device filesystem manager" HOMEPAGE="" SRC_URI="" LICENSE="" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~spar c-fbsd ~x86-fbsd" IUSE="" DEPEND="" RDEPEND="|| ( sys-fs/udev sys-apps/busybox[mdev] sys-fs/devfsd sys-fs/static-dev sys-freebsd/freebsd-sbin )" ############################################ * execute the following 3 commands at the commandline ebuild dev-manager-0.ebuild digest emerge -1 dev-manager emerge --unmerge sys-fs/udev * In file /atc/portage/package.mask, append the line sys-fs/udev Create the file if it doesn't already exist. You now have a totally udev-free machine -- Walter Dnes