Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89311 - booting up from root on nfs breaks once /etc/init.d/net.eth0 is executed
Summary: booting up from root on nfs breaks once /etc/init.d/net.eth0 is executed
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-16 05:05 UTC by Marek Zachara
Modified: 2005-04-19 08:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Zachara 2005-04-16 05:05:51 UTC
i have a couple of installations with gentoo diskless workstations booting off network server (NFS). They work correctly as long as net.eth0 is not executed during boot-up process. They got their IPs and details from DHCP, load and execute kernel, the init scripts are started and then once /etc/init.d/net.eth0 script (link to net.lo) is executed (with empty config so it shall get details from DHCP), the boot up process breaks - claiming the machine can't access various files. I guess the init script for net screws up the config of the network interface so really the system can't access its root filesystem anymore. If i just delete /etc/init.d/net.eth0 everything works fine and the system boots - but with every upgrade of baselayout it puts net.eth0 back there so i end up needing to find a self-booting machine, log in to the server, remove the file before i can use any workstation. Its a bit frustrating. 

Reproducible: Always
Steps to Reproduce:





there are some other issues with shutting down of diskless machine - looks 
like the setup unmounts the root filesystem when unmounting network 
filesystems - which of course ends in a lot of mess, but more on this later 
on. the bootup issue is much more annoying
Comment 1 SpanKY gentoo-dev 2005-04-16 22:34:18 UTC
you neglected to post `emerge info` like the bug report page told you to so i'm going to assume you're using an outdated version of baselayout because last time i checked, this worked in 1.11.x
Comment 2 Marek Zachara 2005-04-16 22:50:15 UTC
Sorry, i didn't add the info because i have seen this problem for like half a year now so i assumed its not really related to any specific version
anyway, here is one of these i'm using (removed dirs and USE flags):

Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11.2 x86_64)
=================================================================
System uname: 2.6.11.2 x86_64 AMD Athlon(tm) 64 Processor 2800+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 20 2005, 20:52:47)]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O2 -msse -msse2 -mmmx -m3dnow -mfpmath=sse -pipe -funroll-loops -fomit-frame-pointer -frerun-loop-opt -falign-functions=8 -feliminate-unused-debug-types"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -msse -msse2 -mmmx -m3dnow -mfpmath=sse -pipe -funroll-loops -fomit-frame-pointer -frerun-loop-opt -falign-functions=8 -feliminate-unused-debug-types"
DISTDIR="/var/ext/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"

Comment 3 Marek Zachara 2005-04-16 23:15:12 UTC
inspired by 'worksforme', just checked and the setup works - but only if i explicitly specify the IP address of the interface in /etc/conf.d/net - then booting up goes without problems. However leaving this config file empty, which is supposed to use dhcp results in 'network unreachable'. My dhcp server is configured to assign 'static' IPs per MAC address. And the workstation definitely gets the info from it, otherwise it wouldn't be able to load the kernel.
Comment 4 SpanKY gentoo-dev 2005-04-16 23:29:51 UTC
if you put 'config_eth0=( "null" )' does it work ?
Comment 5 Marek Zachara 2005-04-16 23:35:33 UTC
it works when i put config_eth0=( "noop" "10.0.0.7/24" ) - during boot up it says "keeping current configuration for eth0". i'll try the "null" too if you wish during next boot up.
Comment 6 Marek Zachara 2005-04-16 23:49:25 UTC
nope, config_eth0=( "null" ) doesn't work. result exactly the same as with no config ("network unreachable")
Comment 7 Roy Marples (RETIRED) gentoo-dev 2005-04-18 12:51:43 UTC
config_eth0=( "noop" "dhcp" )

How about that?
Comment 8 Marek Zachara 2005-04-19 00:11:09 UTC
well, of course config_eth0=( "noop" "dhcp" ) works, as in this case it just sticks to the "noop", keeping the config it got during first stage (PXE). It newer gets to the dhcp stage.
However, config_eth0=( "dhcp" ) doesn't work - when i put it like this, the boot-up breaks (network unreachable)
Strange thing is, when DHCP takes place during PXE (bootprom), the server logs the following:
Apr 19 08:26:32 gondolin dhcpd: DHCPDISCOVER from 00:0f:ea:3f:33:ff via eth0
Apr 19 08:26:32 gondolin dhcpd: DHCPOFFER on 10.0.0.7 to 00:0f:ea:3f:33:ff via eth0
Apr 19 08:26:32 gondolin dhcpd: DHCPREQUEST for 10.0.0.7 (10.0.0.251) from 00:0f:ea:3f:33:ff via eth0
Apr 19 08:26:32 gondolin dhcpd: DHCPACK on 10.0.0.7 to 00:0f:ea:3f:33:ff via eth0

however during the dhcp in /etc/init.d/net.eth0, the whole request is limited to REQUEST/ACK only 

Apr 19 08:30:05 gondolin dhcpd: DHCPREQUEST for 10.0.0.7 from 00:0f:ea:3f:33:ff via eth0
Apr 19 08:30:05 gondolin dhcpd: DHCPACK on 10.0.0.7 to 00:0f:ea:3f:33:ff via eth0

dunno if this is any hint however.
Comment 9 Roy Marples (RETIRED) gentoo-dev 2005-04-19 02:16:43 UTC
Closing this as this is behaviour by design.

When you start a network script, it drops existing IP and route information before it loads the dhcp client. This means that in an NFS environment when / is NFS mounted the network script cannot be started or stopped.

config_eth0=( "noop" "dhcp" ) is the correct setting for / on NFS when using DHCP.

noop means "No operation if the interface is UP and has an IPv4 address" which is required for / on NFS
Comment 10 Marek Zachara 2005-04-19 08:54:25 UTC
well, i can't argue whether it is a behaviuor by design, but it is definitely not a logical solution from the user point of view. The real question is if the gentoo is aimed to be a reliable and user friendly distribution or something that 'WORKSFORME'? This is something to ponder for the maintainers. Some users will always find a way to patch a broken distribution, but some will give up. I'd suggest at least include some info in the sample config file if you can't make it work properly.