Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RaspberryPi unable to get net.eth0 to start at boot [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Thu Oct 18, 2012 11:15 pm    Post subject: RaspberryPi unable to get net.eth0 to start at boot [SOLVED] Reply with quote

Just got my first Gentoo RaspberryPI up and going. Its booting up fine. However, I have tried both:

rc-update add net.eth0 default
rc-update add net.eth0 boot

and neither works. I will reboot and the nic does not start. However, I can run /etc/init.d/net.eth0 start after logging in and getting the nic to work and passing traffic.


/etc/runlevels/default/net.eth0 symlink is there and is correct.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.


Last edited by njcwotx on Thu Oct 18, 2012 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Thu Oct 18, 2012 11:21 pm    Post subject: Reply with quote

self resolved.

I had symlinked net.lo per wiki and usual instructions. I removed symlink /etc/init.d/net.eth0 > net.lo and copied net.lo to net.eth0 and system came up with the nic.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
Schnitzel
n00b
n00b


Joined: 02 Jan 2004
Posts: 39

PostPosted: Fri Oct 26, 2012 7:36 pm    Post subject: Reply with quote

thanks for hint..got the same problem
Back to top
View user's profile Send private message
52midnight
Apprentice
Apprentice


Joined: 20 Mar 2012
Posts: 176
Location: Brisbane AU

PostPosted: Mon Dec 10, 2012 5:57 am    Post subject: Reply with quote

Thanks for the post - had the same problem. However, the fix did not work for me, and I got errors onscreen during the boot process. Using:

># dmesg|less

and searching for 'eth0' revealed a line saying:

udevd[154]: renamed network interface eth0 to eth1

Not sure why, but reconfiguring using eth1 got things working.
Back to top
View user's profile Send private message
gerrit_hoekstra
n00b
n00b


Joined: 05 Jun 2007
Posts: 9
Location: In a forest in the UK

PostPosted: Sun Feb 10, 2013 10:19 pm    Post subject: Reply with quote

52midnight wrote:
udevd[154]: renamed network interface eth0 to eth1
Not sure why, but reconfiguring using eth1 got things working.


You can check what the eventual device is that was assigned to your ethernet NIC with
Code:
$ cat /proc/net/dev


I get for some reason on one Pi: eth2, and stuff breaks.
On the othe Pi I get eth0 and all goes swimmingly well.

I tried to cheat with:
Code:
$ cd /etc/init.d
$ ln -s net.lo net.eth2
$ rc-update add net.eth2 default


On reboot eth2 comes up with a valid ip address
Code:
$ ifconfig
$ ifconfig eth2


, but now I can't SSH to the Pi any more. Restarting the SSH service fails, so it is fair to say that I have not managed to fix this with my workaround.

Questions:
1. Why on one Pi and not on the other? It is a difference in hardware builds?
2. Is there a fix that will guarantee that the NIC is operational after boot-up, no matter what?
_________________
Ultra5-360 1GB Ram, Ultra5-333 380MB, Ultra10-440 192MB - all Gentoo Linux. And now loads of Raspberry PIs!
Remember Kids, it's always fun until someone gets hurt. Then it's utterly hilarious!
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Mon Feb 11, 2013 10:31 am    Post subject: Reply with quote

Things may have gotten messed up in udev, perhaps this was a stage4 or cross compiled on another machine.

Removing the entry and rebooting should default your interface to eth0.

Code:
rm /etc/udev/rules.d/70-persistent-net.rules
Back to top
View user's profile Send private message
gerrit_hoekstra
n00b
n00b


Joined: 05 Jun 2007
Posts: 9
Location: In a forest in the UK

PostPosted: Sun Feb 17, 2013 5:12 pm    Post subject: Reply with quote

The content of the file /etc/udev/rules.d/70-persistent-net.rules varies on the MAC address of the eth0-device. So lifting-and-shifting an SDCard with this file from one PI (model B) to another causes it to be "non-compatible" on the new device. The UDEV service adds another line to this file for eth1-device, eth2-device and so on every time the SDCard is inserted to new PI.

Is there a way to fix UDEV's behaviour to rather replace the existing line, so that I always have just eth0 when I insert the SDCard into a new PI? Or is the only solution to summarily remove the /etc/udev/rules.d/70-persistent-net.rules file every time the PI boots?
_________________
Ultra5-360 1GB Ram, Ultra5-333 380MB, Ultra10-440 192MB - all Gentoo Linux. And now loads of Raspberry PIs!
Remember Kids, it's always fun until someone gets hurt. Then it's utterly hilarious!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Sun Feb 17, 2013 5:16 pm    Post subject: Reply with quote

gerrit_hoekstra,

You can remove the file with a script in /etc/local.d/
See the readme there.

Hint: you want a file called *.stop, so its run on shutdown.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum