← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1452202] Re: ubuntu preseed install fails to set a hostname

 

** Also affects: debian-installer (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: debian-installer (Ubuntu)
       Status: New => In Progress

** Changed in: debian-installer (Ubuntu Trusty)
       Status: New => In Progress

** Changed in: debian-installer (Ubuntu)
   Importance: Undecided => Medium

** Changed in: debian-installer (Ubuntu Xenial)
       Status: New => In Progress

** Changed in: debian-installer (Ubuntu Trusty)
   Importance: Undecided => Medium

** Changed in: debian-installer (Ubuntu Xenial)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1452202

Title:
  ubuntu preseed install fails to set a hostname

Status in debian-installer package in Ubuntu:
  Fix Released
Status in preseed package in Ubuntu:
  Fix Released
Status in debian-installer source package in Trusty:
  In Progress
Status in preseed source package in Trusty:
  In Progress
Status in debian-installer source package in Xenial:
  In Progress
Status in preseed source package in Xenial:
  Fix Committed
Status in netcfg package in Debian:
  New

Bug description:
  [Impact]

   * DHCP hostname take precedence over netcfg/hostname, if set.

  The problem is that the system read the preseed file after having run
  netcfg, thus the preseed parameter cannot be loaded straight from the
  start.

  [Test Case]

   * HOWTO reproduce :

  Install Ubuntu using a preseed[1] file[2] and add the following line in the preseed recipe :
  d-i netcfg/hostname string <HOSTNAME>

  If the machine get a HOSTNAME from DHCP server or from a reverse
  lookup, netcfg/hostname doesn't take precedence.

  [1] - url=http://<WEB_SERVER>/<PRESEED_FILE>
  [2] - https://help.ubuntu.com/lts/installation-guide/example-preseed.txt

  [Regression Potential]

   * none expected, the change is trivial and has been intensively
  jointly tested by myself and cyphermox.

  [Other Info]

   * Debian bug : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755848
     Patch has been submitted to Debian
   * There is an old patch introduced in 2012 [Use netcfg/hostname for the hostname if found. (Closes: #606636)] but that doesn't work as expected.

  [Original Description]

  == Comment: #0 - Edward R. Cheslek <echeslak@xxxxxxxxxx> - 2015-04-28 18:04:01 ==
  ---Problem Description---
  An install using a preseed file fails to configure the hostname of the system being installed.

  Contact Information = echeslak@xxxxxxxxxx

  ---uname output---
  Ubuntu 15.04 ppc64le

  Machine Type = Tuleta pKVM guest

  ---Debugger---
  A debugger is not configured

  ---Steps to Reproduce---
   set up an automated install using a preseed file.  Grub menu entry:

  menuentry "Test" {
          linux   ubuntu-installer/ppc64el/vmlinux tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false auto=true preseed/url=http://10.33.11.31/data/autoinst/ted.preseed
          initrd  ubuntu-installer/ppc64el/initrd.gz
  }

  The install will begin, and reach the hostname configuration screen,
  then stop, waiting for input.  The hostname is set in the preseed
  file, which is attached.

  Install method: http from ports.ubuntu.com

  Install disk info: n/a

  Install ISO Information: n/a

  *Additional Instructions for echeslak@xxxxxxxxxx:
  -Post a private note with access information to the machine that the bug is occuring on.

  == Comment: #1 - SANDHYA VENUGOPALA <vsandhya@xxxxxxxxxx> - 2015-04-29 06:08:18 ==
  Some literature that is floating around -

  when booting from an installation CD and using a preseed file on a
  network, the installer will need answers to some questions (hostname,
  network configuration, ...) before it can load the preseed file. On
  the other hand, including a customized preseed file in a setup CD will
  allow for more automation, but requires re-mastering of the CD.

  The configuration of domain and host name, and keymap are still being
  asked, even if you have them in your preseed file as shown above. So
  if you want to kickstart the preseeded installation without a single
  questions asked, append the following more options to kernel boot
  prompt:

  console-keymaps-at/keymap=us hostname=myhost domain=example.com
  locale=en_US

  Perhaps David Heller can throw some light on this and let us know if
  its bug.

  == Comment: #2 - Edward R. Cheslek <echeslak@xxxxxxxxxx> - 2015-04-29 07:57:29 ==
  I'm booting and installing from the network.  Even if I leave the hostname related options out of my preseed, it still picks up and displays the correct hostname from dhcp.

  == Comment: #3 - David Heller <hellerda@xxxxxxxxxx> - 2015-05-05 14:12:52 ==
  I'm not very familiar with this particular preseed option so I'm not sure how it's supposed to behave.  However, in a quick test on Ubuntu 15.04, adding "netcfg/hostname=blah" to the kernel cmdline worked: it successfully overrode the hostname from DHCP (the way it is usually set in my environment) with no other changes required.

  In the preseed however, I could not make it work, even if I commented
  out the related lines:

  #d-i netcfg/get_hostname string unassigned-hostname
  #d-i netcfg/get_domain string unassigned-domain
  d-i netcfg/hostname string blah

  And looking in the installer log, it could be a order of operations
  thing, since we see it picking up the hostname from DHCP before
  retrieving the preseed...

  # cat /var/log/syslog | egrep "hostname|seed"
  May  5 16:10:16 netcfg[2270]: INFO: DHCP hostname: "myhost"
  May  5 16:10:16 netcfg[2270]: DEBUG: Preseeding domain from global: ibm.com
  May  5 16:10:16 main-menu[301]: INFO: Menu item 'network-preseed' selected
  May  5 16:10:18 preseed: successfully loaded preseed file from ftp://9.114.211.201/install/autoinst/myhost

  That said: this doesn't tell exactly when the hostname was *set*, or
  if it should be overridden even if it is set at that point.

  IMHO it should work the same way in the preseed as it does command-
  line, regardless of order, since that is what the user is requesting.
  If the installer already "set" the hostname from DHCP info, well, it
  should set it again with what the user wants.

  But I don't know if this is supported or expected to work in all
  cases.  Frankly, I'm not even sure if this is the correct way to do it
  in preseed (although it seems like it is).

  But I think it's fair to mirror this to Ubuntu to ask.

  == Comment: #5 - Edward R. Cheslek <echeslak@xxxxxxxxxx> - 2015-05-05 16:21:35 ==
  I can set the hostname on the linux kernel line in grub, and it will  show up correctly in the installer, but my issue is that the install still asks me to confirm that the hostname is correct.  I want to proceed through my install totally unattended.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1452202/+subscriptions