View previous topic :: View next topic |
Author |
Message |
veritas n00b
Joined: 22 May 2010 Posts: 5
|
Posted: Tue Aug 10, 2010 5:38 pm Post subject: [SOLVED]net.eth0 problem after setting ip inside initramfs!? |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54821 Location: 56N 3W
|
Posted: Tue Aug 10, 2010 6:00 pm Post subject: |
|
|
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 |
|
|
veritas n00b
Joined: 22 May 2010 Posts: 5
|
Posted: Tue Aug 10, 2010 8:14 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54821 Location: 56N 3W
|
Posted: Tue Aug 10, 2010 8:19 pm Post subject: |
|
|
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 |
|
|
veritas n00b
Joined: 22 May 2010 Posts: 5
|
Posted: Tue Aug 10, 2010 8:29 pm Post subject: |
|
|
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 |
|
|
veritas n00b
Joined: 22 May 2010 Posts: 5
|
Posted: Tue Aug 10, 2010 8:42 pm Post subject: |
|
|
Problem solved by adding "noop" to the config_eth0 variable in /etc/conf.d/net.
Many Thanks. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54821 Location: 56N 3W
|
Posted: Tue Aug 10, 2010 8:44 pm Post subject: |
|
|
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 |
|
|
|