Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Whenever I PXE boot a CentOS 6.5 server, I have some grief with the server using different network ports between installation and the booted operating system.

I've seen this with multiple servers now. The behavior is as follows:

  1. I plug a network cable into the first onboard ethernet port (PXE boot fails on any other port).
  2. I power on the server, press F12, and it begins the PXE boot installation.
  3. When installation is complete, I reboot the server.
  4. When the server comes up, networking is dead.
  5. I unplug the ethernet cable from the onboard port and replug it into the first network card port.
  6. Networking is alive again.

Is there a way to prevent this port change from happening in the first place, rather than having to do an awkward cable swap or network reconfiguration every time?

I've looked at the BIOS and various CentOS articles online, but my Google-fu has failed me.

EDIT: As requested, here is some additional information.

The PXE boot server mentioned is a Cobbler server. It automates the installation with a kickstart template, and currently only configures the network via DHCP.

Also, the motherboard in use is a SuperMicro H8DGU-F.

The kickstart template is as follows:

# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Firewall configuration
firewall --enabled
# System keyboard
keyboard us
# System language
lang en_US
# Use network installation
url --url=$tree
# If any cobbler repo definitions were referenced in the kickstart profile, include them here.
$yum_repo_stanza
# Network information
$SNIPPET('network_config') # This becomes: 'network --bootproto=dhcp --device=eth0 --onboot=on'
# Reboot after installation
reboot

#Root password
rootpw --iscrypted $default_password_crypted
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone  America/Denver
# Install OS instead of upgrade
install
# Clear the Master Boot Record
zerombr
# Allow anaconda to partition the system as needed
autopart

%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end

%packages
$SNIPPET('func_install_if_enabled')
%end

%post
$SNIPPET('log_ks_post')
# Start yum configuration
$yum_config_stanza
# End yum configuration
$SNIPPET('post_install_kernel_options')
$SNIPPET('post_install_network_config')
$SNIPPET('func_register_if_enabled')
$SNIPPET('download_config_files')
$SNIPPET('koan_environment')
$SNIPPET('redhat_register')
$SNIPPET('cobbler_register')
# Enable post-install boot notification
$SNIPPET('post_anamon')
# Start final steps
$SNIPPET('kickstart_done')
# End final steps
%end
share|improve this question
    
Configure CentOS to use the onboard NIC? –  Michael Hampton Feb 3 at 22:16
    
@MichaelHampton: The only way I know how to do that is by editing the udev rules after installation. Is there a way to configure CentOS to use the onboard NIC as part of a PXE boot installation? –  billyw Feb 3 at 22:38
    
Did you pass biosdevname=0 on the kernel command line? If not, you should run through a test installation (at least semi-interactively) with that option. –  Michael Hampton Feb 3 at 22:42
    
Please provide some details: Do you use kickstart or manual OS installation? Do you use dhcp or manual interface setup? –  Veniamin Feb 4 at 5:34
    
@Veniamin I added some more information to the question. Also, I don't believe that biosdevname is responsible for this behavior since it's disabled by default (except for select Dell servers) and my interface names have been "ethX". But I'll still do a test installation when I have the opportunity. –  billyw Feb 4 at 18:02

1 Answer 1

Linux probes dedicated network card first here and I wonder if any ways to change this order. Thus on-board port gets name ethX other then eth0.

If you agree to stand It then just use the --device=bootif kickstart network option to configure the PXE boot interface exactly:

network --bootproto=dhcp --device=bootif --onboot=on

Some additional speculations:

It would be also great to assign eth0 name to the boot interface automatically. Providing an option of passing bootif MAC address to kickstart post installation script It would be possible to rewrite UDEV rules accordingly. Unfortunately I currently do not know ways to do It.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.