PlugPBX Forums
May 19, 2012, 04:09:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug in Eth0  (Read 976 times)
mattmc97
Administrator
Full Member
*****
Posts: 144


« on: July 07, 2010, 08:18:24 AM »

Don't know if anyone else has this problem, but when I switch SD cards, on reboot eth0 is not reconfigured, thus effectively locking you out except by USB-serial connection.

After changing SD cards, when you watch the boot status.

You will get:
ADDRCONF(NETDEV_UP): eth0: link is not ready

It will then finish booting, but you will not ever get an ip address.

When you connect serially and login, if I  type 'ifconfig', the only interface that is listed is 'lo'

I googled for a solution and I think the answer is to edit

vi /etc/network/interfaces


Comment out allow-hotplug and add auto eth0
#allow-hotplug eth0
auto eth0

Then: '/etc/init.d/networking restart' which will reload it. I have switched cards again and rebooted and it DOES grab an address with the change.

The solution I found is linked here: http://linux.derkeiler.com/Mailing-Lists/Debian/2007-06/msg01715.html

As to why allow-hotplug is causing the error I am not sure, but changing it to auto eth0 has been what everyone suggests if you search for the error code I was getting.
Logged
mattmc97
Administrator
Full Member
*****
Posts: 144


« Reply #1 on: July 07, 2010, 09:26:08 AM »

The above error I posted was keeping me from getting into the original plugpbx. So I had to redownload and image my card.

I dug around in the original build and I see that you are calling 'K03resetpersistentnic' on shutdown, which then calls '/etc/udev/rules.d/70-persistent-net.rules'

Well, the way I originally fixed my issues was as is described below:

just delete the entries in /etc/udev/rules.d/70-persistent-net.rules.

The next time you start up, udev'll create a new entry with the new
MAC address and link it to eth0.

linky: http://www.debianhelp.org/node/16252

I don't know much about the rules created in the 70-persistent-net.rules file, but I do know that if I delete them or just comment out and change it to 'auto eth0' it fixes the issue.

Is there anything wrong with this approach?

The big problem is right now is that with the original image and a NEW plug, you lose your serial access, which means when your eth0 gets jacked on a switched SD Card, your only solution is to re-image the card.

I am going to reboot between the two cards with the change above and see if it ever hangs. I will post my results.
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #2 on: July 07, 2010, 10:43:22 AM »

I wrote a shutdown script to address this in the first version Wink

Posting is on the website.

Next version I'll address it with a startup script.
Logged

-Greg
mattmc97
Administrator
Full Member
*****
Posts: 144


« Reply #3 on: July 07, 2010, 10:55:19 AM »

Isn't that included in the beta that is in 'downloads'?

Cause I have a K03resetpersistentnic entry and yet it STILL does not clear it out correctly. At least, this only happens when I switch cards. If I stick with one card the whole time there is no issue.

Anyway, I rebooted each card alternating two times, and the fix I describe is working great.

Do you see any problem with it?


Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #4 on: July 07, 2010, 05:56:02 PM »

Yes its what's included in the 3rd beta I first shipped, and it did work since when I shutdown my copy and then image, you all were able to bootup and connect with different MAC addresses Wink

It burned me since My first two releases would not work for other users until I found about that new debian feature burning me.

An rcS0.d script would make more sense once the root file-system is mounted, deleting that file - OR compiling the hotplug stuff to not use persistent parameters. I touched on that in my blog post.

http://www.plugpbx.org/?p=184

Logged

-Greg
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!