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 1S7Yco-0001OQ-BL for garchives@archives.gentoo.org; Tue, 13 Mar 2012 20:47:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE72BE0B25; Tue, 13 Mar 2012 20:47:03 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.181]) by pigeon.gentoo.org (Postfix) with ESMTP id CE54BE09D6 for ; Tue, 13 Mar 2012 20:46:05 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AicFAKU/KE9MCqv3/2dsb2JhbACBX5x7eacJgx+CegSUToZLhAk X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="167845737" Received: from 76-10-171-247.dsl.teksavvy.com (HELO waltdnes.org) ([76.10.171.247]) by ironport2-out.teksavvy.com with SMTP; 13 Mar 2012 16:46:04 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Tue, 13 Mar 2012 16:45:35 -0400 From: "Walter Dnes" Date: Tue, 13 Mar 2012 16:45:35 -0400 To: Gentoo Users List Subject: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 6 Message-ID: <20120313204535.GB2430@waltdnes.org> References: <20111115062115.GA3262@waltdnes.org> <20111121104724.GC7461@waltdnes.org> <20111201194544.GD4455@waltdnes.org> <20120217234045.GA25390@waltdnes.org> <20120311090912.GA23850@waltdnes.org> <20120311213448.GB25554@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: <20120311213448.GB25554@waltdnes.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: a487a5bc-0b79-445a-b480-94ac6e4868a4 X-Archives-Hash: a3fe91605164522e382bfc016803afed This revision includes some checking to see if your system can run without udev. In general, if you use any of... * GNOME * KDE * XFCE * lvm2 ... you probably need udev, so mdev is not for you. I've also found one situation where I need to take one extra step to run without udev. I have a laptop with a Radeon GPU that requires a binary blob for the video driver. emerging radeon-ucode downloads a whole slew of binary blobs, to support umpteen different models. If I leave all the binary blobs in the library directory, the kernwl needs udev to figure out which one of the many binary blobs to load. If I remove all the other binary blobs, and leave only the correct one in the library directory, it loads automatically. There is one more imperfect sanity check you can run to check for udev dependancy if none of the above apply... a) add the line sys-fs/udev to /etc/portage/package.mask b) execute the 2 commands emerge -pv system emerge -pv world c) if the only errors you get are for not being able to re-install udev as required by virtual/dev-manager-0, you can proceed to the next stage, Otherwise, remove the "sys-fs/udev" line from /etc/portage/package.mask and forget about mdev. Proceed here only if the above stages don't find any udev dependancies. 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. 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 a) Create /sbin/linuxrc containing 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. Remember to "chmod 744 /sbin/linuxrc" to make it executable. 3 b) In the bootloader "append" line, include "init=/sbin/linuxrc". If you're using lilo remember to re-run lilo to implement the changes. If you're using another bootloader, make the equivalant initialization. 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) Remove udev as per the following instructions... * execute the following command at the commandline emerge --unmerge sys-fs/udev * In file /etc/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