public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] mdev + xorg + Gnome up and running.  :-)
@ 2012-03-15  4:17 Alan Mackenzie
  2012-03-15  5:44 ` Pandu Poluan
  2012-03-16  0:55 ` Walter Dnes
  0 siblings, 2 replies; 9+ messages in thread
From: Alan Mackenzie @ 2012-03-15  4:17 UTC (permalink / raw
  To: gentoo-user

Hi, Gentoo.

Yes, I've got Gnome going under mdev.  Thanks to Mike Edenfield for the
tip about needing to configure things in xorg.conf.

Here's how I did it:

(i) Rebuild xorg-server without udev.
  * Insert this line into /etc/package.use:

    x11-base/xorg-server -udev
    
  * build the program with:

    emerge xorg-server

(ii) Configure the keyboard and mouse explicitly in /etc/X11/xorg.conf
(or wherever else you keep your xorg.conf).
  * Edit the two "InputDevice" sections to look like this.  The critical
    lines are emphasised:

    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "evdev"                       <--------------
            Option      "Device" "/dev/input/event3"  <--------------
    EndSection

    Section "InputDevice"
            Identifier  "Mouse0"
            Driver      "evdev"                       <--------------
            Option      "Protocol" "auto"
            Option      "Device" "/dev/input/event4"  <--------------
            Option      "ZAxisMapping" "4 5 6 7"
    EndSection

Here's another section for your instructions, Walter.  :-)

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-15  4:17 [gentoo-user] mdev + xorg + Gnome up and running. :-) Alan Mackenzie
@ 2012-03-15  5:44 ` Pandu Poluan
  2012-03-16  0:55 ` Walter Dnes
  1 sibling, 0 replies; 9+ messages in thread
From: Pandu Poluan @ 2012-03-15  5:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

On Mar 15, 2012 11:22 AM, "Alan Mackenzie" <acm@muc.de> wrote:
>
> Hi, Gentoo.
>
> Yes, I've got Gnome going under mdev.  Thanks to Mike Edenfield for the
> tip about needing to configure things in xorg.conf.
>
> Here's how I did it:
>
> (i) Rebuild xorg-server without udev.
>  * Insert this line into /etc/package.use:
>
>    x11-base/xorg-server -udev
>
>  * build the program with:
>
>    emerge xorg-server
>
> (ii) Configure the keyboard and mouse explicitly in /etc/X11/xorg.conf
> (or wherever else you keep your xorg.conf).
>  * Edit the two "InputDevice" sections to look like this.  The critical
>    lines are emphasised:
>
>    Section "InputDevice"
>            Identifier  "Keyboard0"
>            Driver      "evdev"                       <--------------
>            Option      "Device" "/dev/input/event3"  <--------------
>    EndSection
>
>    Section "InputDevice"
>            Identifier  "Mouse0"
>            Driver      "evdev"                       <--------------
>            Option      "Protocol" "auto"
>            Option      "Device" "/dev/input/event4"  <--------------
>            Option      "ZAxisMapping" "4 5 6 7"
>    EndSection
>
> Here's another section for your instructions, Walter.  :-)
>

Great news! :-D

What about LVM2 automounting?

Rgds,

[-- Attachment #2: Type: text/html, Size: 1974 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running.  :-)
  2012-03-15  4:17 [gentoo-user] mdev + xorg + Gnome up and running. :-) Alan Mackenzie
  2012-03-15  5:44 ` Pandu Poluan
@ 2012-03-16  0:55 ` Walter Dnes
  2012-03-16  1:41   ` Pandu Poluan
  2012-03-16  9:33   ` Alan Mackenzie
  1 sibling, 2 replies; 9+ messages in thread
From: Walter Dnes @ 2012-03-16  0:55 UTC (permalink / raw
  To: gentoo-user

On Thu, Mar 15, 2012 at 04:17:14AM +0000, Alan Mackenzie wrote
> Hi, Gentoo.
> 
> Yes, I've got Gnome going under mdev.  Thanks to Mike Edenfield for the
> tip about needing to configure things in xorg.conf.
> 
> Here's how I did it:

  Great.  Is that GNOME version 2 or version 3?  I'm working on getting
a simple webpage set up.  The instructions and special cases are getting
to be a bit much for an email.  I hope to have the webhosting account set
up on Friday, and DNS for the webpage propagated over the weekend.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-16  0:55 ` Walter Dnes
@ 2012-03-16  1:41   ` Pandu Poluan
  2012-03-16  7:32     ` Walter Dnes
  2012-03-16  9:33   ` Alan Mackenzie
  1 sibling, 1 reply; 9+ messages in thread
From: Pandu Poluan @ 2012-03-16  1:41 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

On Mar 16, 2012 7:59 AM, "Walter Dnes" <waltdnes@waltdnes.org> wrote:
>
> On Thu, Mar 15, 2012 at 04:17:14AM +0000, Alan Mackenzie wrote
> > Hi, Gentoo.
> >
> > Yes, I've got Gnome going under mdev.  Thanks to Mike Edenfield for the
> > tip about needing to configure things in xorg.conf.
> >
> > Here's how I did it:
>
>  Great.  Is that GNOME version 2 or version 3?  I'm working on getting
> a simple webpage set up.  The instructions and special cases are getting
> to be a bit much for an email.  I hope to have the webhosting account set
> up on Friday, and DNS for the webpage propagated over the weekend.
>

Hmmm... are you planning to host an overlay?

If so, I'll be willing to donate some of my time to provide some patched
ebuilds for packages that can function without udev but lazily specify
DEPEND=sys-fs/udev...

... and while at it, let's see if I can make a package containing scripts
to ease transitioning from udev to mdev. Maybe call it,
sys-utils/mdev-helper?

Rgds,

[-- Attachment #2: Type: text/html, Size: 1252 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-16  1:41   ` Pandu Poluan
@ 2012-03-16  7:32     ` Walter Dnes
  2012-03-16  7:54       ` Pandu Poluan
  0 siblings, 1 reply; 9+ messages in thread
From: Walter Dnes @ 2012-03-16  7:32 UTC (permalink / raw
  To: gentoo-user

On Fri, Mar 16, 2012 at 08:41:48AM +0700, Pandu Poluan wrote

> Hmmm... are you planning to host an overlay?
> 
> If so, I'll be willing to donate some of my time to provide some patched
> ebuilds for packages that can function without udev but lazily specify
> DEPEND=sys-fs/udev...

  I wouldn't call it "lazy".  Before the hulabaloo about udev/initramfs,
I don't think anybody was running mdev on Gentoo.  So there was no need
for mdev in the ebuilds.  The only non-embedded distro to use mdev was
Alpine linux.  And they also use uclibc.

  I'm not familiar with the server side of things.  I can follow
instructions if supplied.  I don't know if the hosting provider I'm
thinking of does rsync.  I never theought to ask.

  I'll check on the dev list about the etiquitte regarding contacting
upstream.  Even if a package works today with mdev, there's no guarantee
about tomorrow.  It'll help if upstream knows that people are using
their packages with mdev, and they take that into account when updating
the software.

  Note that my request for updating virtual/dev-manager went through OK.
Once we test a "udev-required" package with mdev, and confirm it works,
we should post a request on the Gentoo bugzilla to update Gentoo's
ebuild.

> ... and while at it, let's see if I can make a package containing
> scripts to ease transitioning from udev to mdev. Maybe call it,
> sys-utils/mdev-helper?

  The kernel reconfig and rebuild, and sticking "init=/sbin/linuxrc"
into the append line are user-specific.  I dual-boot 2 kernels
("production" and "experimental"), and I run lilo.  Somebody with only
one kernel, and/or running GRUB will need to do things differently.  So
a script won't help.  This is simple enough to copy+paste from docs
to your terminal.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-16  7:32     ` Walter Dnes
@ 2012-03-16  7:54       ` Pandu Poluan
  2012-03-16  8:41         ` Joost Roeleveld
  0 siblings, 1 reply; 9+ messages in thread
From: Pandu Poluan @ 2012-03-16  7:54 UTC (permalink / raw
  To: gentoo-user

On Fri, Mar 16, 2012 at 14:32, Walter Dnes <waltdnes@waltdnes.org> wrote:
>
> On Fri, Mar 16, 2012 at 08:41:48AM +0700, Pandu Poluan wrote
>
> > Hmmm... are you planning to host an overlay?
> >
> > If so, I'll be willing to donate some of my time to provide some patched
> > ebuilds for packages that can function without udev but lazily specify
> > DEPEND=sys-fs/udev...
>
>  I wouldn't call it "lazy".  Before the hulabaloo about udev/initramfs,
> I don't think anybody was running mdev on Gentoo.  So there was no need
> for mdev in the ebuilds.  The only non-embedded distro to use mdev was
> Alpine linux.  And they also use uclibc.
>

Ah yes, sorry. That was originally tongue-in-cheek, but I now see it
may be too disparaging. My bad.

>  I'm not familiar with the server side of things.  I can follow
> instructions if supplied.  I don't know if the hosting provider I'm
> thinking of does rsync.  I never theought to ask.
>
>  I'll check on the dev list about the etiquitte regarding contacting
> upstream.  Even if a package works today with mdev, there's no guarantee
> about tomorrow.  It'll help if upstream knows that people are using
> their packages with mdev, and they take that into account when updating
> the software.
>
>  Note that my request for updating virtual/dev-manager went through OK.
> Once we test a "udev-required" package with mdev, and confirm it works,
> we should post a request on the Gentoo bugzilla to update Gentoo's
> ebuild.
>

Good idea.

> > ... and while at it, let's see if I can make a package containing
> > scripts to ease transitioning from udev to mdev. Maybe call it,
> > sys-utils/mdev-helper?
>
>  The kernel reconfig and rebuild, and sticking "init=/sbin/linuxrc"
> into the append line are user-specific.  I dual-boot 2 kernels
> ("production" and "experimental"), and I run lilo.  Somebody with only
> one kernel, and/or running GRUB will need to do things differently.  So
> a script won't help.  This is simple enough to copy+paste from docs
> to your terminal.
>

Well... as to the kernel requirement... nothing's stopping one from
emerging sys-fs/reiserfsprogs even when the kernel doesn't support
reiserfs ;)

The "init=/sbin/linuxrc" can be automated using script (and sed),
which we can imbue with the intelligence necessary to edit LILO/GRUB
conf. I do have a collection of my own scripts to make it easier to
install new Gentoo systems; one of them I whup up to automatically add
a new kernel into menu.lst and (optionally) modify the default kernel
[1].

What I have in mind for "helper scripts" would be (for example) a
script to ensure that, on boot, ethernet devices will maintain their
relative order. This needs to be stuck into /etc/mdev.conf (already
part of stage3).

(And if someone's well-versed enough in Linux, maybe he/she will
convert the shellscript into a simple -- and faster -- binary with
exact same functionality).

[1] https://bitbucket.org/pepoluan/gentoo-admin-kit/src/4ed95722b38f/grub-add-kernel.sh

Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~

 • LOPSA Member #15248
 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-16  7:54       ` Pandu Poluan
@ 2012-03-16  8:41         ` Joost Roeleveld
  2012-03-16  9:06           ` Pandu Poluan
  0 siblings, 1 reply; 9+ messages in thread
From: Joost Roeleveld @ 2012-03-16  8:41 UTC (permalink / raw
  To: gentoo-user

On Friday, March 16, 2012 02:54:16 PM Pandu Poluan wrote:
> On Fri, Mar 16, 2012 at 14:32, Walter Dnes <waltdnes@waltdnes.org> wrote:
> > On Fri, Mar 16, 2012 at 08:41:48AM +0700, Pandu Poluan wrote
> > 
> > > Hmmm... are you planning to host an overlay?
> > > 
> > > If so, I'll be willing to donate some of my time to provide some
> > > patched ebuilds for packages that can function without udev but
> > > lazily specify DEPEND=sys-fs/udev...
> > 
> >  I wouldn't call it "lazy".  Before the hulabaloo about udev/initramfs,
> > I don't think anybody was running mdev on Gentoo.  So there was no need
> > for mdev in the ebuilds.  The only non-embedded distro to use mdev was
> > Alpine linux.  And they also use uclibc.
> 
> Ah yes, sorry. That was originally tongue-in-cheek, but I now see it
> may be too disparaging. My bad.
> 
> >  I'm not familiar with the server side of things.  I can follow
> > instructions if supplied.  I don't know if the hosting provider I'm
> > thinking of does rsync.  I never theought to ask.
> > 
> >  I'll check on the dev list about the etiquitte regarding contacting
> > upstream.  Even if a package works today with mdev, there's no guarantee
> > about tomorrow.  It'll help if upstream knows that people are using
> > their packages with mdev, and they take that into account when updating
> > the software.
> > 
> >  Note that my request for updating virtual/dev-manager went through OK.
> > Once we test a "udev-required" package with mdev, and confirm it works,
> > we should post a request on the Gentoo bugzilla to update Gentoo's
> > ebuild.
> 
> Good idea.
> 
> > > ... and while at it, let's see if I can make a package containing
> > > scripts to ease transitioning from udev to mdev. Maybe call it,
> > > sys-utils/mdev-helper?
> > 
> >  The kernel reconfig and rebuild, and sticking "init=/sbin/linuxrc"
> > into the append line are user-specific.  I dual-boot 2 kernels
> > ("production" and "experimental"), and I run lilo.  Somebody with only
> > one kernel, and/or running GRUB will need to do things differently.  So
> > a script won't help.  This is simple enough to copy+paste from docs
> > to your terminal.
> 
> Well... as to the kernel requirement... nothing's stopping one from
> emerging sys-fs/reiserfsprogs even when the kernel doesn't support
> reiserfs ;)
> 
> The "init=/sbin/linuxrc" can be automated using script (and sed),
> which we can imbue with the intelligence necessary to edit LILO/GRUB
> conf. I do have a collection of my own scripts to make it easier to
> install new Gentoo systems; one of them I whup up to automatically add
> a new kernel into menu.lst and (optionally) modify the default kernel
> [1].
> 
> What I have in mind for "helper scripts" would be (for example) a
> script to ensure that, on boot, ethernet devices will maintain their
> relative order. This needs to be stuck into /etc/mdev.conf (already
> part of stage3).
> 
> (And if someone's well-versed enough in Linux, maybe he/she will
> convert the shellscript into a simple -- and faster -- binary with
> exact same functionality).

I think you are talking about a script that handles a more "dynamic" database 
to force renames/softlinks for devices keeping names identical?
I haven't played with mdev yet, but isn't that already in mdev?
Or does mdev require it to be set manually?

Btw, the "keep same devicename" is rather annoying when having to replace the 
network card and the network then doesn't come back up...

--
Joost



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running. :-)
  2012-03-16  8:41         ` Joost Roeleveld
@ 2012-03-16  9:06           ` Pandu Poluan
  0 siblings, 0 replies; 9+ messages in thread
From: Pandu Poluan @ 2012-03-16  9:06 UTC (permalink / raw
  To: gentoo-user

On Fri, Mar 16, 2012 at 15:41, Joost Roeleveld <joost@antarean.org> wrote:
> On Friday, March 16, 2012 02:54:16 PM Pandu Poluan wrote:
>> What I have in mind for "helper scripts" would be (for example) a
>> script to ensure that, on boot, ethernet devices will maintain their
>> relative order. This needs to be stuck into /etc/mdev.conf (already
>> part of stage3).
>>
>> (And if someone's well-versed enough in Linux, maybe he/she will
>> convert the shellscript into a simple -- and faster -- binary with
>> exact same functionality).
>
> I think you are talking about a script that handles a more "dynamic" database
> to force renames/softlinks for devices keeping names identical?
> I haven't played with mdev yet, but isn't that already in mdev?
> Or does mdev require it to be set manually?
>

Well, to make mdev simple enough for embedded devices (whose devices
always come up in the same order), busybox devs do not include any
database of devices.

However, mdev is perfectly able to execute a program (script or
binary) when it detects a device coming up, and it can choose which
program to execute based on the device name.

Let's say you have two NICs, one will get eth0, the other will get
eth1, depending on the order that the kernel initializes the device
name. For that, you don't have to do a thing.

However, if the devices somehow gets initialized at the same time
(e.g., hotplug events), it's a toss which dev will get which name.

That is why, the busybox devs recommended the "linuxrc" file to
contain the line "mdev -s", which will handle dev initializations
during boot in a sequential fashion, ensuring exact same device names.

> Btw, the "keep same devicename" is rather annoying when having to replace the
> network card and the network then doesn't come back up...
>

There are several scenarios:

Scenario 1: eth1 is replaced, eth0 stays -- if the new card is
initialized after eth0, it will automatically assume eth1. If the new
card is initialized before eth0, it will become the new eth0, and the
previous eth0 will become eth1 automatically.

Scenario 2: eth0 is replaced, eth1 stays -- if the new card is
initialized before eth1, it will automatically assume eth0. If the new
card is initialized after eth1, the previous eth1 gets eth0, while the
new card gets eth1.

The program (script) I'm planning will have a simple 'database'
(actually, a text file) containing pairs of MAC address and devname.
This should ensure that devices with a certain MAC address will
*always* get the same devname, while devices not listed in the
database will get the first available devname.

Thus, in the case where devname swapping would happen (see the second
situation in Scenarios 1 & 2), *at least* the non-replaced device will
get the exact devname as before replacement happens.

Rgds,
-- 
FdS Pandu E Poluan
~ IT Optimizer ~

 • LOPSA Member #15248
 • Blog : http://pepoluan.tumblr.com
 • Linked-In : http://id.linkedin.com/in/pepoluan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] mdev + xorg + Gnome up and running.  :-)
  2012-03-16  0:55 ` Walter Dnes
  2012-03-16  1:41   ` Pandu Poluan
@ 2012-03-16  9:33   ` Alan Mackenzie
  1 sibling, 0 replies; 9+ messages in thread
From: Alan Mackenzie @ 2012-03-16  9:33 UTC (permalink / raw
  To: gentoo-user

Hello, Walter.

On Thu, Mar 15, 2012 at 08:55:53PM -0400, Walter Dnes wrote:
> On Thu, Mar 15, 2012 at 04:17:14AM +0000, Alan Mackenzie wrote
> > Hi, Gentoo.

> > Yes, I've got Gnome going under mdev.  Thanks to Mike Edenfield for
> > the tip about needing to configure things in xorg.conf.

> > Here's how I did it:

>   Great.  Is that GNOME version 2 or version 3?  I'm working on getting
> a simple webpage set up.  The instructions and special cases are getting
> to be a bit much for an email.  I hope to have the webhosting account set
> up on Friday, and DNS for the webpage propagated over the weekend.

I'm still on Gnome 2.  But I have a feeling it might not matter -
couldn't it be that all the <x>dev related code is in xorg-server?

> -- 
> Walter Dnes <waltdnes@waltdnes.org>

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-16 12:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15  4:17 [gentoo-user] mdev + xorg + Gnome up and running. :-) Alan Mackenzie
2012-03-15  5:44 ` Pandu Poluan
2012-03-16  0:55 ` Walter Dnes
2012-03-16  1:41   ` Pandu Poluan
2012-03-16  7:32     ` Walter Dnes
2012-03-16  7:54       ` Pandu Poluan
2012-03-16  8:41         ` Joost Roeleveld
2012-03-16  9:06           ` Pandu Poluan
2012-03-16  9:33   ` Alan Mackenzie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox