Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]net.eth0 problem after setting ip inside initramfs!?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
veritas
n00b
n00b


Joined: 22 May 2010
Posts: 5

PostPosted: Tue Aug 10, 2010 5:38 pm    Post subject: [SOLVED]net.eth0 problem after setting ip inside initramfs!? Reply with quote

Hey hey,

I want to setup a initramfs with busybox & dropbear included to unlock luks over ssh.
Currently my system is running baselayout2 and a genkernel generated initramfs - everything works fine, so far.
After creating initramfs by hand and including busybox with ifconfig, interface is avaiable before booting real root.
But if I setup net.eth0 inside initramfs, I am getting the following errors during init boot:

ERROR: net.eth0 failed to start
SIOCSIFADDR: File exists
SIOCSIFFLAGS: cannot assign requested address
SIOCSIFNETMASK: cannot assign requested address

When setting different IP's @initramfs and "real" system....a virtual interface eth0:1 is created.
How to get things working? Do I have to "release" IP before entering real_root?

Many Thanks. :)


Last edited by veritas on Tue Aug 10, 2010 8:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 10, 2010 6:00 pm    Post subject: Reply with quote

veritas,

You either need to stop the interface before you mount the real root and its init runs, or you need to use the preinit function (currently empty) in /etc/conf.d/net to detect that the interface is up already and not start it again.

The former is probably tidier as openrc keeps PID files to it knows whats started and running and whats not.
You cannot easily pass this file over to the real root.
_________________
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
veritas
n00b
n00b


Joined: 22 May 2010
Posts: 5

PostPosted: Tue Aug 10, 2010 8:14 pm    Post subject: Reply with quote

Hey NeddySeagoon,

thanks for your fast reply! Can you tell me how to "stop" net.eth0 before entering real root? Is it possible to handle this with busybox only?
Or how to use the preinit function?

Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 10, 2010 8:19 pm    Post subject: Reply with quote

veritas,

It will be similar to the way you start eth0 from bb.
I don't know how to do that either.
_________________
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
veritas
n00b
n00b


Joined: 22 May 2010
Posts: 5

PostPosted: Tue Aug 10, 2010 8:29 pm    Post subject: Reply with quote

Hey,

I start eth0 by setting ip with ifconfig. Just "shutting down" eth0 with ifconfig again didn't work. I guess, its not really "stopped", just down!? :?
Back to top
View user's profile Send private message
veritas
n00b
n00b


Joined: 22 May 2010
Posts: 5

PostPosted: Tue Aug 10, 2010 8:42 pm    Post subject: Reply with quote

Problem solved by adding "noop" to the config_eth0 variable in /etc/conf.d/net.

Many Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 10, 2010 8:44 pm    Post subject: Reply with quote

veritas,

Sorry I don't know.
_________________
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 Networking & Security 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