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 1RSRRJ-00063I-IH for garchives@archives.gentoo.org; Mon, 21 Nov 2011 10:49:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D00D721C153; Mon, 21 Nov 2011 10:49:10 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C8BF021C12C for ; Mon, 21 Nov 2011 10:47:35 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAMUryk7O+KXV/2dsb2JhbAA9Bqo8gQaBcgEBBScTHDMLEiISFCUQFBO7O4NZgxWCRmMEiBqMIYVMiA2ESw X-IronPort-AV: E=Sophos;i="4.69,546,1315195200"; d="scan'208";a="148797693" Received: from 206-248-165-213.dsl.teksavvy.com (HELO waltdnes.org) ([206.248.165.213]) by ironport2-out.teksavvy.com with SMTP; 21 Nov 2011 05:47:34 -0500 Received: by waltdnes.org (sSMTP sendmail emulation); Mon, 21 Nov 2011 05:47:24 -0500 From: waltdnes@waltdnes.org Date: Mon, 21 Nov 2011 05:47:24 -0500 To: Gentoo Users List Subject: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 2 Message-ID: <20111121104724.GC7461@waltdnes.org> References: <20111115062115.GA3262@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: <20111115062115.GA3262@waltdnes.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 9259d0f1-9f44-450b-ac9e-0dabdf274aef X-Archives-Hash: 5f0f1ae37b4ef625d0f9e7154c0fcb21 Based on feedback, I've changed step 6, to get a modified ebuild for virtual/dev-manager to properly check for busybox with the "mdev" USE flag. Steps 1-through-5 are unchanged. 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*... #!/sbin/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