# [SOLVED]net.eth0 problem after setting ip inside initramfs!?

## veritas

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.   :Smile: Last edited by veritas on Tue Aug 10, 2010 8:44 pm; edited 1 time in total

----------

## NeddySeagoon

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.

----------

## veritas

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.

----------

## NeddySeagoon

veritas, 

It will be similar to the way you start eth0 from bb.

I don't know how to do that either.

----------

## veritas

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!?   :Confused: 

----------

## veritas

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

Many Thanks.

----------

## NeddySeagoon

veritas,

Sorry I don't know.

----------

