Project

General

Profile

Bug #8314

Static Network info is not applied during preseeding on Debian like OSes

Added by Tim McIntyre over 4 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Templates
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Hello,

When deploying a new instance of Debian/Ubuntu via PXE/DHCP, the Debian Installer ignores static network config.
The problem is described here:
https://www.debian.org/releases/wheezy/i386/apbs04.html.en#preseed-network

"preseeding the network configuration won't work if you're loading your preconfiguration file from the network"
"Although preseeding the network configuration is normally not possible when using network preseeding (using “preseed/url”), you can use the following hack to work around that, for example if you'd like to set a static address for the network interface. The hack is to force the network configuration to run again after the preconfiguration file has been loaded by creating a “preseed/run” script containing the following commands: kill-all-dhcp; netcfg"

The hack outlined above works, in that the deployed machine has the correct static network info, and is not set to use dhcp. However, the machines hostname and domainname are not set correctly. They are set from DNS, which may not be correct. The fix here is to correct /etc/hostname, /etc/hosts, /etc/resolv.conf and /etc/network/interfaces, in the finish script, before the puppet agent is started on the machine.

Pull request here: https://github.com/theforeman/community-templates/pull/127
Apologies if this does not meet standards or is too hacky, at the very least it brings this issue to light :)

Regards
Tim

Associated revisions

Revision 4dbd5824 (diff)
Added by freddysdad over 4 years ago

fixes #8314 - static network config for preseed

- fix ignored static network info when pxe booting
o see debian manual https://www.debian.org/releases/wheezy/i386/apbs04.html.en#preseed-network
- pass static var to finish template
o if network config is static then host+domain need fixing in finish template
- update host/domain name if using static network
o when pxe booting via dhcp, debian ignores get_hostname & get_domain string within d-i

History

#1 Updated by Dominic Cleal over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 21

#2 Updated by The Foreman Bot almost 2 years ago

  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/community-templates/pull/341 added

#3 Updated by Marek Hulán almost 2 years ago

  • Pull request deleted (https://github.com/theforeman/community-templates/pull/341)

Also available in: Atom PDF