Weblog entry #2 for shortpath

udev madness
Posted by shortpath on Wed 13 Dec 2006 at 16:51
Tags: ,
The installation of Etch on the PE2950 was mostly painless. The only trouble is that due to some weird BIOS mapping, the NICs are assigned eth0 and eth1 in reverse order. My udev rule is being overwritten by something, so this morning I'll either have to find where or put my rule last. Everything else has gone well: lvm was set up through the installer, a xen kernel booted without problem, and after the NIC naming issue is sorted, Steve's xen-tools ought to have some guests running in no time.

 

Comments on this Entry

Posted by dkg (216.254.xx.xx) on Thu 14 Dec 2006 at 00:15
[ Send Message | View dkg's Scratchpad | View Weblogs ]
You might want to have a look at /etc/udev/persistent-net.rules and /etc/udev/persistent-net-generator.rules. The latter file is a script for maintaining the former. If you want to change the default names of your NICs, you should tune persistent-net.rules

This apparently supercedes ifrename and all the other similar programs, so you should get rid of those as long as you're running udev.

[ Parent | Reply to this comment ]

Posted by shortpath (139.182.xx.xx) on Thu 14 Dec 2006 at 00:24
[ Send Message | View Weblogs ]
Thanks. I had changed persistent-net.rules after it appeared that my .rules file was being ignored (it probably wasn't, but udev continues to apply rules.) I had some weirdness after that, but it's sorted now. I didn't know about ifrename until I read the article in Previous Headlines, about 4 hours ago. Just as well, udev is pretty handy once you get the hang of it.

[ Parent | Reply to this comment ]

Posted by ajt (204.193.xx.xx) on Thu 14 Dec 2006 at 12:25
[ Send Message | View Weblogs ]
udev is pretty neat, but it's also pretty complex, so it's easy to get things wrong.

Also note that if you are running udev on Sarge and upgrade to Etch, the way the syntax is intepreted changes, so old rules may stop working! It's easy to fix, but it can catch you out when it happens the first time.

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by shortpath (139.182.xx.xx) on Thu 14 Dec 2006 at 19:28
[ Send Message | View Weblogs ]
Can you elaborate on the syntax changes? The udev instructions I used are kind of old, but seem to be pretty complete. Turns out that I'm still having some issues with networking, so I'm interested in finding out if my udev rules are just off. Specifically, there are lines in dmesg that show the NICs being identified in reverse order, but ifconfig reports them correctly. Sometimes after a reboot, networking is fine, sometimes it requires an ifup/ifdown, sometimes that doesn't work either. In any case, I want to get it sorted out so I don't have to worry about having to physically set up networking after a reboot. It puts a damper on doing things remotely if there is a chance that I'll lose communication with the box.

[ Parent | Reply to this comment ]

Posted by ajt (84.12.xx.xx) on Thu 14 Dec 2006 at 20:32
[ Send Message | View Weblogs ]
Basically in Sarge you can say:
BUS="scsi", SYSFS{model}="Camera  KD-25", SYMLINK="konica_camera"
BUS="scsi", SYSFS{vendor}="WDC AC34", SYSFS{model}="000L", SYMLINK="icy_box"
BUS="scsi", SYSFS{vendor}="Easy", SYSFS{model}="Disk", SYMLINK="easy_disk"


But not in Etch, you have to say:
BUS=="scsi", SYSFS{model}=="Camera  KD-25", SYMLINK="konica_camera"
BUS=="scsi", SYSFS{vendor}=="WDC AC34", SYSFS{model}=="000L", SYMLINK="icy_box"
BUS=="scsi", SYSFS{vendor}=="Easy", SYSFS{model}=="Disk", SYMLINK="easy_disk"


Notice the difference in the use of the equals sign "=". On Sarge you use a single "=" for testing and assignment. In Etch you use double-equals "==" for the test and only a single equals for the assignment.

I followed the advice here:

http://www.debian-administration.org/articles/126

which worked okay in Sarge, and then at some point during Etch's development the version of udev jumped up and it stopped working. After a lot of messing about I realised that the syntax has either changed or more likley got stricter.

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search