Comment 0 for bug 1452202

Revision history for this message
bugproxy (bugproxy) wrote :

== Comment: #0 - Edward R. Cheslek <email address hidden> - 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 = <email address hidden>

---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 <email address hidden>:
-Post a private note with access information to the machine that the bug is occuring on.

== Comment: #1 - SANDHYA VENUGOPALA <email address hidden> - 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 <email address hidden> - 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 <email address hidden> - 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 <email address hidden> - 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.