/etc/dev.d/net/hotplug.dev
Hi,
I am not happy with the way hotplug does the naming of my ethernet cards. It gives eth0 to my wireless pcmcia card, and eth1 to my normal onboard ethernet pci card. However, I want them the other way around, eth0 for my pci card and eth1 for my wifi one, because I don't like all the confusion of my main card becoming eth0 when my wifi card is not in the pcmcia slot.
So, what I did is this, as supported by latest udev.rules, to try and force the system:
KERNEL="eth*", SYSFS{address}="00:09:5b:c2:ce:01", NAME="eth1" # wifi KERNEL="eth*", SYSFS{address}="00:a0:cc:de:27:0c", NAME="eth0" # ethernet
But hotplug and your /etc/dev.d/net/hotplug.dev script completely ignores this and again names them the other way around... Is there any way around it?
I am using udev 0.42, latest hotplug, kernel 2.6.8.1 on Arch Linux 0.7+.
thank you,
Eugenia
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · Eugenia Loli-Queru
Hi,
I am not happy with the way hotplug does the naming of my ethernet cards. It gives eth0 to my wireless pcmcia card, and eth1 to my normal onboard ethernet pci card. However, I want them the other way around, eth0 for my pci card and eth1 for my wifi one, because I don't like all the confusion of my main card becoming eth0 when my wifi card is not in the pcmcia slot.So, what I did is this, as supported by latest udev.rules, to try and force the system:
KERNEL="eth*", SYSFS{address}="00:09:5b:c2:ce:01", NAME="eth1" # wifi KERNEL="eth*", SYSFS{address}="00:a0:cc:de:27:0c", NAME="eth0" # ethernet
Quoted 5 lines
But hotplug and your
/etc/dev.d/net/hotplug.devscript completely ignores this and again names them the other way around... Is there any way around it?I am using udev 0.42, latest hotplug, kernel 2.6.8.1 on Arch Linux 0.7+.
Your distributions network scripts may bring the interface up, before udev is able to rename it?
Kay
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines
Your distributions network scripts may bring the interface up, before udev is able to rename it?
I don't think so. Udev is the first thing that runs when the OS gets into multiuser mode. Then, it's syslog, then hotplug, then pcmcia, then network & netfs services.
Any other ideas?
thx,
Eugenia
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Eugenia Loli-Queru
Quoted 2 lines
Your distributions network scripts may bring the interface up, before udev is able to rename it?
I don't think so. Udev is the first thing that runs when the OS gets into multiuser mode. Then, it's syslog, then hotplug, then pcmcia, then network & netfs services.
Any other ideas?
Yeah, your network scripts may be fired up by hotplug? Please make sure that this is not the reason.
You may ifdown the interfaces, run /sbin/udevstart and check if the rename works.
Kay
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines
Yeah, your network scripts may be fired up by hotplug? Please make sure that this is not the reason.
You may ifdown the interfaces, run/sbin/udevstartand check if the rename works.
I just did so. Renaming was still not working.
thx,
Eugenia
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Eugenia Loli-Queru
Quoted 4 lines
Yeah, your network scripts may be fired up by hotplug? Please make sure that this is not the reason.
You may ifdown the interfaces, run/sbin/udevstartand check if the rename works.I just did so. Renaming was still not working.
Of course. How should renaming of eth1 to eth0 work as long as there is another interface named eth0?
Use other names like net0, net1 or cable, wlan.
Signature · 14 lines
ciao, christian 睡眠不足はいい仕事の敵だ。 ------------------------------------------------------- This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines
Of course. How should renaming of eth1 to eth0 work as long as there is another interface named eth0?
Use other names like net0, net1 or cable, wlan.
But I don't want other names. I just want my wifi pcmcia removable card to be eth1 and my onboard card to be eth0. But hotplug and/or udev names them the other way around, and so when my pcmcia is not in the slot, the ethernet one becomes eth0, creating some confusion to some apps.
So, how do I exchange their names?
thx,
Eugenia
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Eugenia Loli-Queru
So, how do I exchange their names?
put the drivers in the initrd or enforce module loading order.
Signature · 14 lines
USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op�k _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines
Quoted 1 line
So, how do I exchange their names?
put the drivers in the initrd or enforce module loading order.
Easy to say than to do. :)
How do I do the second one? Any links for a tutorial or docs?
thx,
Eugenia
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Eugenia Loli-Queru
Quoted 3 lines
Quoted 1 line
So, how do I exchange their names?
put the drivers in the initrd or enforce module loading order.
Easy to say than to do. :)
How do I do the second one? Any links for a tutorial or docs?
echo 'modprobe -v driver1; modprobe -v driver2' >> /etc/init.d/boot.local Or read the docu of your distribution.
Signature · 14 lines
USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op�k _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Olaf Hering
Quoted 1 line
So, how do I exchange their names?
put the drivers in the initrd or enforce module loading order.
This is not an useful answer, if user have to manually load drivers then we may as well forget about autodetection.
Signature · 13 lines
ciao, | Marco | [8808 igZvS.a6SOcQU] ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Eugenia Loli-Queru
Quoted 2 lines
It looks like others have answered your questions sufficiently, and it did not need an answer from me, correct?
Not really. No one was able to give me an aswer for something that works the way it is supposed to.
Udev renames the devices, but hotplug renames them back. That's a bug IMHO, at best.
Where did anyone say that hotplug renamed the devices back?
<dragging the topic back to the list...>
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line
Where did anyone say that hotplug renamed the devices back?
I say it. Do you have another explanation? My udev.rules is correct AFAIK, but then I end up with the different ethernet names anyway. I have contacted my distro maker (who actually has the same problem with his Thinkpad), and he said that it's a hotplug problem. That's why I emailed you guys.
So, as a user, what am I supposed to do? I need an automatic solution for this, because it's inconvenient to get my onboard card to change names depending if the pcmcia wifi card is in or not. The removable devices should be named with higher names, so their naming don't affect the permanent devices if they are not plugged.
Eugenia
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Eugenia Loli-Queru
Quoted 1 line
Where did anyone say that hotplug renamed the devices back?
I say it. Do you have another explanation? My udev.rules is correct AFAIK, but then I end up with the different ethernet names anyway. I have contacted my distro maker (who actually has the same problem with his Thinkpad), and he said that it's a hotplug problem. That's why I emailed you guys.
What distro are you using?
Quoted 1 line
So, as a user, what am I supposed to do?
Blame your distro :)
Good luck,
greg k-h
/me hopes you aren't using gentoo...
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
"Eugenia Loli-Queru" <[email protected]> disait dernièrement que :
Quoted 6 lines
Quoted 1 line
Where did anyone say that hotplug renamed the devices back?
I say it. Do you have another explanation? My udev.rules is correct AFAIK, but then I end up with the different ethernet names anyway. I have contacted my distro maker (who actually has the same problem with his Thinkpad), and he said that it's a hotplug problem. That's why I emailed you guys.
I am using Gentoo Linux, and initramfs to boot my dm-crypt'd /. To prevent some bad interaction between hotplug and initramfs stuff (oopsen when call_usermodhelper is issued), I explicitly disables hotplug during initramfs phase with "echo > /proc/sys/kernel/hotplug"
But /sbin/rc (Gentoo main initscript) does not set it back to /sbin/hotplug (and I forgot to do so in my initramfs_data.cpio.gz :)), and sets it to /sbin/udev (normal behaviour). With this setup, ethernet cards are not named as stated in udev.rules. The workaround for me is to add an "echo /sbin/hotplug > /proc/sys/kernel/hotplug" before udev/hotplug configuration.
So my suggestion is: verify that /proc/sys/kernel/hotplug is set to hotplug and not udev binary, by your distro initscripts.
By the way, Greg, shouldn't /sbin/rc in Gentoo test if /sbin/hotplug exists and set /proc/sys/kernel/hotplug to /sbin/hotplug if so, instead of verifying that /proc/sys/kernel/hotplug is executable and then if /sbin/hotplug exists ?
I thought about filing a bug at bugs.gentoo.org, but this looks to me asif it were a chicken/egg problem, and you know more about hotplug and udev interaction than me :)
Best regards,
Signature · 15 lines
"Oh, well. Not everybody can be as goodlooking as me. It's a curse." - Linus Torvalds ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&opÌk _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line
What distro are you using?
I am using Arch Linux btw.
Rgds,
Eugenia
----- Original Message -----
From: "Mathieu Segaud" <>
To: "Eugenia Loli-Queru" <>
Cc: "Greg KH" < "Hotplug Devel" <[email protected]>
Sent: Monday, November 01, 2004 4:01 PM
Subject: Re: /etc/dev.d/net/hotplug.dev
"Eugenia Loli-Queru" <> disait dernièrement que :
Quoted 7 lines
Quoted 1 line
Where did anyone say that hotplug renamed the devices back?
I say it. Do you have another explanation? My udev.rules is correct AFAIK, but then I end up with the different ethernet names anyway. I have contacted
my distro maker (who actually has the same problem with his Thinkpad), and he said that it's a hotplug problem. That's why I emailed you guys.
I am using Gentoo Linux, and initramfs to boot my dm-crypt'd /. To prevent some bad interaction between hotplug and initramfs stuff (oopsen when call_usermodhelper is issued), I explicitly disables hotplug during initramfs phase with "echo > /proc/sys/kernel/hotplug"
But /sbin/rc (Gentoo main initscript) does not set it back to /sbin/hotplug (and I forgot to do so in my initramfs_data.cpio.gz :)), and sets it to /sbin/udev (normal behaviour). With this setup, ethernet cards are not named as stated in udev.rules. The workaround for me is to add an "echo /sbin/hotplug > /proc/sys/kernel/hotplug" before udev/hotplug configuration.
So my suggestion is: verify that /proc/sys/kernel/hotplug is set to hotplug and not udev binary, by your distro initscripts.
By the way, Greg, shouldn't /sbin/rc in Gentoo test if /sbin/hotplug exists and set /proc/sys/kernel/hotplug to /sbin/hotplug if so, instead of verifying
that /proc/sys/kernel/hotplug is executable and then if /sbin/hotplug exists ?
I thought about filing a bug at bugs.gentoo.org, but this looks to me asif it
were a chicken/egg problem, and you know more about hotplug and udev interaction than me :)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel