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, &lt;<a href=3D"mailto:waltdnes@waltdnes.org">waltd=
nes@waltdnes.org</a>&gt; wrote:<br>
&gt;<br>
&gt; =C2=A0After a recent thread, about udev developers wanting /usr on the=
 same<br>
&gt; partition as / (or else requiring initramfs), it was pretty obvious<br=
>
&gt; that 90%+ of the users here strongly disliked the idea. =C2=A0I went a=
round<br>
&gt; asking on various lists if it was possible to run Gentoo without udev.=
<br>
&gt; After some research, and various unrelated delays, I&#39;ve come up wi=
th a<br>
&gt; working Gentoo without udev. =C2=A0It turns out that busybox&#39;s mde=
v<br>
&gt; implementation is sufficient for my needs. =C2=A0I do the usual email,=
 web<br>
&gt; surfing, including Youtube. =C2=A0I&#39;m listening to Live365.com as =
I type this<br>
&gt; email, so Flash works just fine. =C2=A0Contrary to the FUD I&#39;ve he=
ard, X<br>
&gt; works just fine, thank you, without an xorg.conf. =C2=A0Modern flatscr=
eens<br>
&gt; with EDID info are set up automatically. =C2=A0I suppose that old CRT<=
br>
&gt; monitors without EDID info might require xorg.conf, but that&#39;s &qu=
ot;exotic<br>
&gt; hardware&quot; nowadays. =C2=A0The only change I notice is somewhat fa=
ster bootup.<br>
&gt;<br>
&gt; =C2=A0The purpose of this email is to ask adventurous people here to b=
eta<br>
&gt; test my approach to a udev-less Gentoo. =C2=A0If we don&#39;t find any=
<br>
&gt; showstopper problems, we can think about requesting Gentoo developers =
to<br>
&gt; support an mdev-based profile. =C2=A0It would help the cause if a larg=
e<br>
&gt; number of testers can report that it works for them. =C2=A0The instruc=
tions<br>
&gt; for a udev-ectomy follow below. =C2=A0Thanks to Zac Medico and others =
on the<br>
&gt; Gentoo developers&#39; list for their helpful hints and pointers on ho=
w to<br>
&gt; do this. =C2=A0I couldn&#39;t have figured this out by myself.<br>
&gt;<br>
&gt; =C2=A0The usual warnings apply...<br>
&gt; * this is a beta<br>
&gt; * use a spare test machine<br>
&gt; * if you don&#39;t follow the instructions correctly, the result might=
 be<br>
&gt; =C2=A0an unbootable linux<br>
&gt; * even if you do follow instructions, the result might be an unbootabl=
e<br>
&gt; =C2=A0linux<br>
&gt;<br>
&gt;<br>
&gt; 1) Set up your kernel to support and automount a devtmpfs filesystem a=
t<br>
&gt; =C2=A0 /dev<br>
&gt;<br>
&gt; * If you prefer to edit .config directly, set<br>
&gt; =C2=A0CONFIG_DEVTMPFS=3Dy and CONFIG_DEVTMPFS_MOUNT=3Dy<br>
&gt;<br>
&gt; * If you prefer &quot;make menuconfig&quot;, the route is as shown bel=
ow. =C2=A0Note<br>
&gt; =C2=A0that the &quot;Autount devtmpfs...&quot; option won&#39;t appear=
 until you enable<br>
&gt; =C2=A0&quot;Maintain a devtmpf...&quot; option.<br>
&gt;<br>
&gt; make menuconfig<br>
&gt; =C2=A0Device Drivers =C2=A0---&gt;<br>
&gt; =C2=A0 =C2=A0Generic Driver Options =C2=A0---&gt;<br>
&gt; =C2=A0 =C2=A0 =C2=A0[*] Maintain a devtmpfs filesystem to mount at /de=
v<br>
&gt; =C2=A0 =C2=A0 =C2=A0[*] =C2=A0 Automount devtmpfs at /dev, after the k=
ernel mounted the rootfs<br>
&gt;<br>
&gt; =C2=A0Once you&#39;ve made the changes, rebuild the kernel.<br>
&gt;<br>
&gt;<br>
&gt; 2) Set up for emerging busybox, there are 2 items to change<br>
&gt;<br>
&gt; A) It appears that there may be an mdev bug in older versions of<br>
&gt; =C2=A0 busybox. =C2=A0To avoid that bug, keyword busybox-1.19.2 in<br>
&gt; =C2=A0 /etc/portage/package.keywords =C2=A0E.g. if you&#39;re using 32=
-bit Gentoo on<br>
&gt; =C2=A0 Intel, the incantation is...<br>
&gt;<br>
&gt; =3Dsys-apps/busybox-1.19.2 ~x86<br>
&gt;<br>
&gt; =C2=A0 Change the &quot;~x86&quot; to reflect your architecture, etc.<=
br>
&gt;<br>
&gt; B) busybox requires the &quot;mdev&quot; flag in this situation. =C2=
=A0The &quot;static&quot;<br>
&gt; flag is probably also a good idea. =C2=A0In file /etc/portage/package.=
use<br>
&gt; add the line<br>
&gt;<br>
&gt; sys-apps/busybox static mdev<br>
&gt;<br>
&gt; =C2=A0 Now, &quot;emerge busybox&quot;<br>
&gt;<br>
&gt;<br>
&gt; 3) In the bootloader append line, include &quot;init=3D/sbin/linuxrc&q=
uot; where<br>
&gt; =C2=A0 the file /sbin/linuxrc consists of *AT LEAST*...<br>
&gt;<br>
&gt; #!/sbin/busybox ash<br>
&gt; mount -t proc proc /proc<br>
&gt; mount -t sysfs sysfs /sys<br>
&gt; exec /sbin/init<br>
&gt;<br>
&gt; =C2=A0 This should be enough for most users. =C2=A0If you have an unus=
ual setup,<br>
&gt; =C2=A0 you may need additional stuff in there. =C2=A0If you&#39;re usi=
ng lilo remember<br>
&gt; =C2=A0 to re-run lilo to implement the changes.<br>
&gt;<br>
&gt; 4) Remove udev from the services list, and replace it with mdev. =C2=
=A0Type<br>
&gt; =C2=A0 the following 2 commands at the command line<br>
&gt; rc-update del udev sysinit<br>
&gt; rc-update add mdev sysinit<br>
&gt;<br>
&gt;<br>
&gt; 5) reboot to your new kernel. =C2=A0You&#39;re now running without usi=
ng udev.<br>
&gt;<br>
&gt;<br>
&gt; 6) ***THIS STEP IS OPTIONAL*** =C2=A0This is only to alay any suspicio=
n that<br>
&gt; =C2=A0 udev is still in use. =C2=A0udev is pulled in by virtual/dev-ma=
nager,<br>
&gt; =C2=A0 which in turn is pulled in by the kernel.<br>
&gt; * cd /usr/portage/virtual/dev-manager<br>
&gt; * Make a backup copy of dev-manager-0.ebuild<br>
&gt; * Edit dev-manager-0.ebuild to include &quot;sys-apps/busybox&quot; as=
 one option<br>
&gt; =C2=A0in RDEPEND, like so...<br>
&gt;<br>
&gt; RDEPEND=3D&quot;|| ( sys-fs/udev<br>
&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-fs/devfsd<b=
r>
&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-apps/busybo=
x<br>
&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-fs/static-d=
ev<br>
&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sys-freebsd/fre=
ebsd-sbin )&quot;<br>
&gt;<br>
&gt; =C2=A0I had really wanted to use &quot;sys-apps/busybox[mdev]&quot;, b=
ut an EAPI-0<br>
&gt; =C2=A0ebuild can&#39;t handle that syntax.<br>
&gt;<br>
&gt; * execute the following 3 commands at the commandline<br>
&gt; ebuild dev-manager-0.ebuild digest<br>
&gt; emerge -1 dev-manager<br>
&gt; emerge --unmerge sys-fs/udev<br>
&gt;<br>
&gt; * In file /atc/portage/package.mask, append the line<br>
&gt; sys-fs/udev<br>
&gt; =C2=A0Create the file if it doesn&#39;t already exist. =C2=A0You now h=
ave a totally<br>
&gt; =C2=A0udev-free machine<br>
&gt;</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&#39;t find any guide/pointers yet.</p>
<p>(Apologies if my email is OOT)</p>
<p>Rgds,<br>
</p>

--0015174783ec013a4d04b1c12a32--