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 <gentoo-user+bounces-131086-garchives=archives.gentoo.org@lists.gentoo.org>) id 1RQDiY-0006MC-0G for garchives@archives.gentoo.org; Tue, 15 Nov 2011 07:46:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D45821C0A5; Tue, 15 Nov 2011 07:45:52 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 6F73421C027 for <gentoo-user@lists.gentoo.org>; Tue, 15 Nov 2011 07:45:03 +0000 (UTC) Received: from mail-bw0-f53.google.com ([209.85.214.53]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from <pandu@poluan.info>) id 1RQDhX-00158A-Uh for gentoo-user@lists.gentoo.org; Tue, 15 Nov 2011 14:45:04 +0700 Received: by bkaq10 with SMTP id q10so8662629bka.40 for <gentoo-user@lists.gentoo.org>; Mon, 14 Nov 2011 23:44:58 -0800 (PST) Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.205.133.148 with SMTP id hy20mr15177140bkc.132.1321343098370; Mon, 14 Nov 2011 23:44:58 -0800 (PST) Received: by 10.223.74.16 with HTTP; Mon, 14 Nov 2011 23:44:58 -0800 (PST) Received: by 10.223.74.16 with HTTP; Mon, 14 Nov 2011 23:44:58 -0800 (PST) In-Reply-To: <20111115062115.GA3262@waltdnes.org> References: <20111115062115.GA3262@waltdnes.org> Date: Tue, 15 Nov 2011 14:44:58 +0700 Message-ID: <CAA2qdGUggtEW4Hc18GHDTTU7-XqVgEGfAws8YJwnaiHTmz4Ojg@mail.gmail.com> Subject: Re: [gentoo-user] Anybody want to beta test Gentoo with mdev instead of udev? From: Pandu Poluan <pandu@poluan.info> To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=0015174783ec013a4d04b1c12a32 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: 3cd0abbf-72f9-452c-863d-0ca4915808c5 X-Archives-Hash: 3cc96852d36e5bee7a67637d3a8c1a91 --0015174783ec013a4d04b1c12a32 Content-Type: text/plain; charset=UTF-8 On Nov 15, 2011 1:24 PM, <waltdnes@waltdnes.org> wrote: > > After a recent thread, about udev developers wanting /usr on the same > partition as / (or else requiring initramfs), it was pretty obvious > that 90%+ of the users here strongly disliked the idea. I went around > asking on various lists if it was possible to run Gentoo without udev. > After some research, and various unrelated delays, I've come up with a > working Gentoo without udev. It turns out that busybox's mdev > implementation is sufficient for my needs. I do the usual email, web > surfing, including Youtube. I'm listening to Live365.com as I type this > email, so Flash works just fine. Contrary to the FUD I've heard, X > works just fine, thank you, without an xorg.conf. Modern flatscreens > with EDID info are set up automatically. I suppose that old CRT > monitors without EDID info might require xorg.conf, but that's "exotic > hardware" nowadays. The only change I notice is somewhat faster bootup. > > The purpose of this email is to ask adventurous people here to beta > test my approach to a udev-less Gentoo. If we don't find any > showstopper problems, we can think about requesting Gentoo developers to > support an mdev-based profile. It would help the cause if a large > number of testers can report that it works for them. The instructions > for a udev-ectomy follow below. Thanks to Zac Medico and others on the > Gentoo developers' list for their helpful hints and pointers on how to > do this. I couldn't have figured this out by myself. > > 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. > * cd /usr/portage/virtual/dev-manager > * Make a backup copy of dev-manager-0.ebuild > * Edit dev-manager-0.ebuild to include "sys-apps/busybox" as one option > in RDEPEND, like so... > > RDEPEND="|| ( sys-fs/udev > sys-fs/devfsd > sys-apps/busybox > sys-fs/static-dev > sys-freebsd/freebsd-sbin )" > > I had really wanted to use "sys-apps/busybox[mdev]", but an EAPI-0 > ebuild can't handle that syntax. > > * 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 > Sounds nice! 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? I even am toying around with the idea of having a completely static /dev, but still can't find any guide/pointers yet. (Apologies if my email is OOT) Rgds, --0015174783ec013a4d04b1c12a32 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p><br> On Nov 15, 2011 1:24 PM, <<a href=3D"mailto:waltdnes@waltdnes.org">waltd= nes@waltdnes.org</a>> wrote:<br> ><br> > =C2=A0After 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. =C2=A0I went a= round<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 wi= th a<br> > working Gentoo without udev. =C2=A0It turns out that busybox's mde= v<br> > implementation is sufficient for my needs. =C2=A0I do the usual email,= web<br> > surfing, including Youtube. =C2=A0I'm listening to Live365.com as = I type this<br> > email, so Flash works just fine. =C2=A0Contrary to the FUD I've he= ard, X<br> > works just fine, thank you, without an xorg.conf. =C2=A0Modern flatscr= eens<br> > with EDID info are set up automatically. =C2=A0I suppose that old CRT<= br> > monitors without EDID info might require xorg.conf, but that's &qu= ot;exotic<br> > hardware" nowadays. =C2=A0The only change I notice is somewhat fa= ster bootup.<br> ><br> > =C2=A0The purpose of this email is to ask adventurous people here to b= eta<br> > test my approach to a udev-less Gentoo. =C2=A0If we don't find any= <br> > showstopper problems, we can think about requesting Gentoo developers = to<br> > support an mdev-based profile. =C2=A0It would help the cause if a larg= e<br> > number of testers can report that it works for them. =C2=A0The instruc= tions<br> > for a udev-ectomy follow below. =C2=A0Thanks to Zac Medico and others = on the<br> > Gentoo developers' list for their helpful hints and pointers on ho= w to<br> > do this. =C2=A0I couldn't have figured this out by myself.<br> ><br> > =C2=A0The 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> > =C2=A0an unbootable linux<br> > * even if you do follow instructions, the result might be an unbootabl= e<br> > =C2=A0linux<br> ><br> ><br> > 1) Set up your kernel to support and automount a devtmpfs filesystem a= t<br> > =C2=A0 /dev<br> ><br> > * If you prefer to edit .config directly, set<br> > =C2=A0CONFIG_DEVTMPFS=3Dy and CONFIG_DEVTMPFS_MOUNT=3Dy<br> ><br> > * If you prefer "make menuconfig", the route is as shown bel= ow. =C2=A0Note<br> > =C2=A0that the "Autount devtmpfs..." option won't appear= until you enable<br> > =C2=A0"Maintain a devtmpf..." option.<br> ><br> > make menuconfig<br> > =C2=A0Device Drivers =C2=A0---><br> > =C2=A0 =C2=A0Generic Driver Options =C2=A0---><br> > =C2=A0 =C2=A0 =C2=A0[*] Maintain a devtmpfs filesystem to mount at /de= v<br> > =C2=A0 =C2=A0 =C2=A0[*] =C2=A0 Automount devtmpfs at /dev, after the k= ernel mounted the rootfs<br> ><br> > =C2=A0Once 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> > =C2=A0 busybox. =C2=A0To avoid that bug, keyword busybox-1.19.2 in<br> > =C2=A0 /etc/portage/package.keywords =C2=A0E.g. if you're using 32= -bit Gentoo on<br> > =C2=A0 Intel, the incantation is...<br> ><br> > =3Dsys-apps/busybox-1.19.2 ~x86<br> ><br> > =C2=A0 Change the "~x86" to reflect your architecture, etc.<= br> ><br> > B) busybox requires the "mdev" flag in this situation. =C2= =A0The "static"<br> > flag is probably also a good idea. =C2=A0In file /etc/portage/package.= use<br> > add the line<br> ><br> > sys-apps/busybox static mdev<br> ><br> > =C2=A0 Now, "emerge busybox"<br> ><br> ><br> > 3) In the bootloader append line, include "init=3D/sbin/linuxrc&q= uot; where<br> > =C2=A0 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> > =C2=A0 This should be enough for most users. =C2=A0If you have an unus= ual setup,<br> > =C2=A0 you may need additional stuff in there. =C2=A0If you're usi= ng lilo remember<br> > =C2=A0 to re-run lilo to implement the changes.<br> ><br> > 4) Remove udev from the services list, and replace it with mdev. =C2= =A0Type<br> > =C2=A0 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. =C2=A0You're now running without usi= ng udev.<br> ><br> ><br> > 6) ***THIS STEP IS OPTIONAL*** =C2=A0This is only to alay any suspicio= n that<br> > =C2=A0 udev is still in use. =C2=A0udev is pulled in by virtual/dev-ma= nager,<br> > =C2=A0 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> > =C2=A0in RDEPEND, like so...<br> ><br> > RDEPEND=3D"|| ( sys-fs/udev<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-fs/devfsd<b= r> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-apps/busybo= x<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-fs/static-d= ev<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-freebsd/fre= ebsd-sbin )"<br> ><br> > =C2=A0I had really wanted to use "sys-apps/busybox[mdev]", b= ut an EAPI-0<br> > =C2=A0ebuild 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> > =C2=A0Create the file if it doesn't already exist. =C2=A0You now h= ave a totally<br> > =C2=A0udev-free machine<br> ></p> <p>Sounds nice!</p> <p>However, my Gentoo systems are all virtual servers (DomU VMs on XenServe= r). So, the hardware devices are static. Will switching over to mdev give a= ny 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> --0015174783ec013a4d04b1c12a32--