[lfs-support] 70-persistent rules

Michael E. Maher michael at maheronline.co.uk
Wed Jan 9 13:41:13 PST 2013



On Wed, 2013-01-09 at 13:30 -0800, Mike Johnston wrote:
> 
> 
> 
> ----- Original Message -----
> From: Michael E. Maher <michael at maheronline.co.uk>
> To: Mike Johnston <mkejohnston at yahoo.com>
> Cc: LFS Support List <lfs-support at linuxfromscratch.org>
> Sent: Wednesday, January 9, 2013 4:28 PM
> Subject: Re: [lfs-support] 70-persistent rules
> 
> On Wed, 2013-01-09 at 13:13 -0800, Mike Johnston wrote:
> > 
> > 
> > 
> > ----- Original Message -----
> > From: Geoff Swan <gswan3 at bigpond.net.au>
> > To: LFS Support List <lfs-support at linuxfromscratch.org>
> > Cc: 
> > Sent: Wednesday, January 9, 2013 3:53 PM
> > Subject: Re: [lfs-support] 70-persistent rules
> > 
> > 
> > On 10/01/2013 12:27 AM, Mike Johnston wrote:
> > > ----- Original Message -----
> > >
> > > From: Thomas de Roo <thomas at de-roo.org>
> > > To: Mike Johnston <mkejohnston at yahoo.com>; LFS Support List <lfs-support at linuxfromscratch.org>
> > > Cc: 
> > > Sent: Wednesday, January 9, 2013 8:14 AM
> > > Subject: Re: [lfs-support] 70-persistent rules
> > >
> > > On 01/09/13 13:32, Mike Johnston wrote:
> > >> From: Michael E. Maher <michael at maheronline.co.uk>
> > >> To: Mike Johnston <mkejohnston at yahoo.com>
> > >> Cc: LFS Support List <lfs-support at linuxfromscratch.org>
> > >> Sent: Wednesday, January 9, 2013 3:55 AM
> > >> Subject: Re: [lfs-support] 70-persistent rules
> > >>
> > >>
> > >> On Tue, 2013-01-08 at 11:03 -0800, Mike Johnston wrote:
> > >>> I'm using LFS 7.2 all built and is running almost fine.
> > >>>
> > >>>
> > >>> I'm trying to get multiple nics with stable names.  I have the
> > >>> 70-persistent-net.rules file set matching on mac addresses.  The
> > >>> problem is the file never seems to take effect.
> > >>>
> > >>>
> > >>> Any ideas what might cause this?  Anything in the kernel need to
> > >>> configured specifically?
> > >>>
> > >>>
> > >>> I had this working beautifully on LFS 6.3
> > >>>
> > >>>
> > >>> Thanks in advance,
> > >>>
> > >>>
> > >>> Could be any number of things
> > >>> What permissions do you have set for the file?
> > >>> Are you sure it is located in the correct directory?
> > >> I>s there anything in the output of dmesg?
> > >>
> > >>> Could you share the contents of the file so we can see if there is
> > >>> something wrong with the formatting?
> > >>> Thanks,
> > >>> Michael
> > >> Here you go:
> > >>
> > >> Permissions are 644 root ownership located in /etc/udev/rules.d  I'd really prefer to bus address ("KERNELS==") but that doesn't work, so I switched to MAC and still can't get it to work.
> > >> Nothing shows up in dmesg about renaming or anything like that.  It shows the driver finding the NICs and assigning them the names without any respect to my rules.
> > >>
> > >> Here's the contents of the file:
> > >>
> > >> # This file was automatically generated by the /lib/udev/write_net_rules
> > >> # program, run by the persistent-net-generator.rules rules file.
> > >> #
> > >> # You can modify it, as long as you keep each rule on a single
> > >> # line, and change only the value of the NAME= key.
> > >>
> > >> # net device e1000e
> > >> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:a4:9d:4f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
> > >>
> > >> # net device e1000e
> > >> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:a4:9d:4e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
> > >>
> > >>
> > >>
> > >> Thanks again
> > >>
> > >> Have you tried to put the rule for eth0 first, and the rule for eth1 second?
> > >> Groet,
> > >> Thomas
> > >
> > > I have tried same result.  It seems like it's not even reading the file at all.  Any other configs that I might be missing either in the kernel or elsewhere?  Any chance udev is not running the scripts in /lib/udev?
> > >
> > >
> > >
> > >Try removing ATTR{dev_id} from the rule, as it's probably not necessary.
> > 
> > 
> > 
> > I have done that no effect.  Really baffled here.  Anything that would stop this from being processed on boot up?
> > 
> 
> >If you delete the file is it recreated? That should test if the scripts
> >are running.
> 
> >I know it's obvious, but are you sure you have the correct MAC address
> >for each interface. One thing to try if the file is recreated is to
> >change the name to something like "eth7" to avoid any confusion between
> >1 and 2.
> 
> >Thanks,
> >Michael
> 
> 
> It is not re-created.  If i run the script manually to init the file (lfs instructions) it create that file.  I just changed swapped eth0 and eth1.
> 
> Does that offer any clues?|
> 
> Thanks again
> 

Hmmmm...

Lets check the permissions on the udev lib directory:
     $ ls -lh /lib/udev/*
Lets also check that udev is running:
     $ ps -ef | grep udev
And the udev version:
     $ udevd --version
And the startup scripts:
     $ ls -lh /etc/rc.d/init.d/






More information about the lfs-support mailing list