[opensuse-autoinstall] Problem going from DHCP to static address during autoinstall
Hi. I'm using autoyast to install SLES9 on a machine. The install itself works. But I have a problem with the network configuration. During the install the machine obtains a dhcp address and performs the install. When the install is applying the static ipadress defined in the autoyast xml configuration file the dhcp address isn't released and I get something looking like this: 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:17:a4:f8:19:7d brd ff:ff:ff:ff:ff:ff inet 10.73.18.249/24 brd 10.255.255.255 scope global eth0 inet 10.73.18.55/24 brd 10.73.18.255 scope global secondary eth0 inet6 fe80::217:a4ff:fef8:197d/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:17:a4:f8:19:7c brd ff:ff:ff:ff:ff:ff The address 10.73.18.249 is provided by the DHCP during install. The address 10.73.18.55 is defined in the autoyast configuration file. This gives problems later on when mounting NFS shares, because the NFS shares is restricted to the address 10.73.18.55 and the machine connects to the NFS server as 10.73.18.249 How is this resolveable? Is this a known bug? -- Kind regards Jacob Emcken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
You need to add a option in your parameter like this label sles10-x86_64 kernel installer/x86_64/sles10/linux append initrd=installer/x86_64/sles10/initrd autoyast=http://192.168.1.1/config/common/sles10-x86_64.xml install=nfs://192.168.1.2/install/x86_64/sles10 Shaohui Best Regards -----Original Message----- From: Jacob Emcken [mailto:je@casalogic.dk] Sent: 2007年4月26日 15:57 To: opensuse-autoinstall@opensuse.org Subject: [opensuse-autoinstall] Problem going from DHCP to static address during autoinstall Hi. I'm using autoyast to install SLES9 on a machine. The install itself works. But I have a problem with the network configuration. During the install the machine obtains a dhcp address and performs the install. When the install is applying the static ipadress defined in the autoyast xml configuration file the dhcp address isn't released and I get something looking like this: 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:17:a4:f8:19:7d brd ff:ff:ff:ff:ff:ff inet 10.73.18.249/24 brd 10.255.255.255 scope global eth0 inet 10.73.18.55/24 brd 10.73.18.255 scope global secondary eth0 inet6 fe80::217:a4ff:fef8:197d/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:17:a4:f8:19:7c brd ff:ff:ff:ff:ff:ff The address 10.73.18.249 is provided by the DHCP during install. The address 10.73.18.55 is defined in the autoyast configuration file. This gives problems later on when mounting NFS shares, because the NFS shares is restricted to the address 10.73.18.55 and the machine connects to the NFS server as 10.73.18.249 How is this resolveable? Is this a known bug? -- Kind regards Jacob Emcken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi. I think you misunderstood what my problem is. I'll try to describe my problem better. ----- "Shaohui Zheng" <shaohui.zheng@intel.com> wrote:
Y ou need to add a option in your parameter like this
... snip ... install=nfs://192.168.1.2/install/x86_64/sles10
I'm not trying to install from nfs. I'm installing from http and the install goes just fine. Within the autoyast xml configuration I have defined several NFS mount points, which the machine should use once installed. Like this: <nfs config:type="list"> <nfs_entry> <mount_point>/opt/lam-6.5.9</mount_point> <nfs_options>bg,soft</nfs_options> <server_path>srv611:/opt/lam-6.5.9</server_path> </nfs_entry> <nfs_entry> <mount_point>/gx01</mount_point> <nfs_options>bg,soft</nfs_options> <server_path>uxfile01:/export/sta/dd1/gf/gx01</server_path> </nfs_entry> <nfs_entry> <mount_point>/home3</mount_point> <nfs_options>bg,soft</nfs_options> <server_path>uxfile01:/export/dyn/ddc/3</server_path> </nfs_entry> </nfs> This is whats happening: * Installations is started with SELS9 CD1 * I point it the the http server where the install will find all the RPM packages etc. * I point it to the autoyast configuration fil * The install completes and the machine reboots * The network settings (from the autoyast configuration file) is applyed BUT the DHCP address isn't released (see my previous mail for details) * The machine tries to mount all the NFS shares defined in the autoyast xml file (see above). The NFS server rejects the newly installed machine because it uses a wrong ipadress (the DHCP address). * I end up on with a login prompt and the NFS mounts failed If I manually reboot the the machine when the install is done, the DCHP address isn't used anymore and the from now on I have my NFS shares with every reboot. But that isn't really a solution for me, because I need the NFS shares while running several post install scripts. -- Cheers Jacob Emcken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Thursday 26 April 2007 09:57, Jacob Emcken wrote:
How is this resolveable? Is this a known bug?
it's not a known bug to me but I have not tried to reproduce it until now. I would like to know, does it help to put a "rcnetwork restart" into the post-script section with "network needed"="true"? -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi. ----- "Uwe Gansert" <ug@suse.de> wrote:
On Thursday 26 April 2007 09:57, Jacob Emcken wrote:
How is this resolveable? Is this a known bug?
I would like to know, does it help to put a "rcnetwork restart" into the post-script section with "network needed"="true"?
Thanks for the quick reply. I just want to point out that I'm using version 9 of Suse Linux Enterprise server. I don't know if the "network needed=true" is SLES 10 specific? I need to install SLES9 but if it would help anything I could use SLES10 as an install server. Anyway I created the post script xml snippet on a sles 10 and copy pasted that to my SLES 9 xml profile: ... <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <filename>reload_network</filename> <interpreter>shell</interpreter> <location></location> <network_needed config:type="boolean">true</network_needed> <source><![CDATA[ip a rcnetwork restart echo echo echo "Network after restart" ip a ]]></source> </script> ... which made the file `/var/adm/autoinstall/logs/reload_network.log` containing: + ip a 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:17:a4:f8:19:7d brd ff:ff:ff:ff:ff:ff inet 10.73.18.249/24 brd 10.255.255.255 scope global eth0 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:17:a4:f8:19:7c brd ff:ff:ff:ff:ff:ff + rcnetwork restart Shutting down network interfaces: eth0 device: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10) eth0 configuration: [1A..done eth1 device: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10) eth1 configuration: [1A..doneShutting down service network . . . . . . . . . . . . . . ...done Setting up network interfaces: lo lo IP address: 127.0.0.1/8 [1A..done eth0 device: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10) eth0 No configuration found for eth0 [1A..unused eth1 device: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10) eth1 No configuration found for eth1 [1A..unusedSetting up service network . . . . . . . . . . . . . . . ...done + echo + echo + echo 'Network after restart' Network after restart + ip a 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:17:a4:f8:19:7d brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:17:a4:f8:19:7c brd ff:ff:ff:ff:ff:ff ----- End of `/var/adm/autoinstall/logs/reload_network.log` content ----- As you can see I have no network at all now until the static address is applyed later on in the install process. I get an error about the install not being able to fetch a specific rpm (dont remember the package name now) and I get an error when the installer try to modify some runlevel scripts. The NFS shares are mounted when the machine comes up but my post scripts aren't executed correctly. Because there is no net when executed. -- Cheers Jacob Emcken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Thu, Apr 26, 2007 at 01:56:11PM +0200, Jacob Emcken wrote:
I just want to point out that I'm using version 9 of Suse Linux Enterprise server.
Are you using any of the SPs or just SLES9 stock? I'm doing something similar in that we dhcp boot, but in the pre-install, I read in config files and write out a /tmp/profile/modified.xml file with new info in it for many things, like network. For net, I go from: <networking> <comment>NET_DEFAULTS</comment> </networking> to values like: <networking> <dhcp_options> <dhclient_additional_options></dhclient_additional_options> <dhclient_client_id></dhclient_client_id> <dhclient_hostname_option>AUTO</dhclient_hostname_option> </dhcp_options> <dns> <dhcp_hostname config:type="boolean">false</dhcp_hostname> <dhcp_resolv config:type="boolean">false</dhcp_resolv> <domain>qualcomm.com</domain> <hostname>$my_hostname</hostname> <nameservers config:type="list"> <nameserver>$dns_server</nameserver> </nameservers> </dns> <interfaces config:type="list"> <interface> <bootproto>static</bootproto> <device>$net_dev</device> <ipaddr>$my_ip</ipaddr> <netmask>$my_netmask</netmask> <startmode>auto</startmode> <usercontrol>no</usercontrol> </interface> </interfaces> <managed config:type="boolean">false</managed> <modules config:type="list"> <module_entry> <device>static-0</device> <module></module> <options></options> </module_entry> </modules> <routing> <ip_forward config:type="boolean">false</ip_forward> <routes config:type="list"> <route> <destination>default</destination> <device>-</device> <gateway>$my_router</gateway> <netmask>-</netmask> </route> </routes> </routing> </networking> The variables up there are obviously replaced by the right values by the script (lines that are multiple like the $dns_server values are done in a loop, I only included one in the sample), but that's the output I use and it works. I based this on a clone file from a sles9-sp3 host. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com "You think it's a conspiracy by the networks to put bad shows on TV. But the shows are bad because that's what people want. It's not like Windows users don't have any power. I think they are happy with Windows, and that's an incredibly depressing thought." -- Steve Jobs -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi. ----- "Mike Marion" <mmarion@qualcomm.com> wrote:
On Thu, Apr 26, 2007 at 01:56:11PM +0200, Jacob Emcken wrote:
I just want to point out that I'm using version 9 of Suse Linux Enterprise server.
Are you using any of the SPs or just SLES9 stock?
I'm using SLES9 service pack 3. And remember it's not like I dont get the static ipaddress. The DHCP address just stay (as primary ipaddress) until I reboot again manually after the install. But Uwe's suggestion helped on that. -- Cheers Jacob Emcken -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Fri, Apr 27, 2007 at 10:56:02AM +0200, Jacob Emcken wrote:
And remember it's not like I dont get the static ipaddress. The DHCP address just stay (as primary ipaddress) until I reboot again manually after the install. But Uwe's suggestion helped on that.
Ooh.. I missed that it went away after another manual reboot. It's possible I am seeing the same thing, but one of the first things my post-install stuff does is reboot before doing really heavy work. Well, it does do some NFS mounts and work, but not too much, though the mounts it hits are open for read-only access to everyone specifically for installs. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com [Lisa and Bart used Gandpa's name on a cartoon script they wrote] Bart - "Didn't you wonder why you were getting checks for doing absolutely nothing?" Grandpa - "I figured 'cause the Democrats are in power again." -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (4)
-
Jacob Emcken
-
Mike Marion
-
Uwe Gansert
-
Zheng, Shaohui