Making hostname persistent across reboots

182 views
Skip to first unread message

verz...@gmail.com

unread,
May 26, 2018, 12:45:29 AM5/26/18
to CoreOS User
Hello,

I'm completely puzzled.
No matter what I do hostname setting is not persistent across reboots
hostnamectl sets the hostname, but after reboot hostname reverses back to some other name.
Where is the hostname stored, not file seems to have it?

Thanks

Benjamin Gilbert

unread,
May 29, 2018, 1:26:12 PM5/29/18
to verz...@gmail.com, CoreOS User
On Sat, May 26, 2018 at 12:45 AM, <verz...@gmail.com> wrote:
No matter what I do hostname setting is not persistent across reboots
hostnamectl sets the hostname, but after reboot hostname reverses back to some other name.
Where is the hostname stored, not file seems to have it?

Hi,

Did you provision the system using coreos-cloudinit?  If so, coreos-cloudinit will set the hostname on every boot, either to the hostname given in the cloud-config, or if none, to a default hostname.  You can avoid this by provisioning with Ignition instead.

--Benjamin Gilbert

Imad Faruqi

unread,
May 31, 2018, 12:17:12 PM5/31/18
to CoreOS User
Hi Benjamin,

I believe the default AWS mentions using cloudinit as the default provisioning mechanism.
May I know the migration guide of provisioning using ignition utility.


I need it very urgently , May i know any other options to resort it fast.

Thanks

Sergey Verzunov

unread,
May 31, 2018, 1:53:41 PM5/31/18
to Benjamin Gilbert, CoreOS User
Benjamin,

I’m not sure how I provisioned the coreos, it was a battle to do it.
Basically, I made USB stick, booted VM from it, then OS got installed.

Is there a way to find out which method was used.

I did some research that pointed me to certain files, none of those could found on my system.

I just cannot believe, host name cannot be changed. Where is it written so that I can change it?

Thanks

Benjamin Gilbert

unread,
May 31, 2018, 3:06:31 PM5/31/18
to Imad Faruqi, CoreOS User
On Thu, May 31, 2018 at 12:17 PM, Imad Faruqi <ima...@gmail.com> wrote:
I believe the default AWS mentions using cloudinit as the default provisioning mechanism.

If you're seeing that in the Container Linux documentation, please file a bug so we can get it fixed.  The Container Linux EC2 page recommends Container Linux Configs, which are the human-writable configuration language for provisioning a system using Ignition.
 
May I know the migration guide of provisioning using ignition utility.

See here.

--Benjamin Gilbert

Benjamin Gilbert

unread,
May 31, 2018, 3:14:12 PM5/31/18
to Sergey Verzunov, CoreOS User
On Thu, May 31, 2018 at 1:53 PM, Sergey Verzunov <verz...@gmail.com> wrote:
I’m not sure how I provisioned the coreos, it was a battle to do it.
Basically, I made USB stick, booted VM from it, then OS got installed.

Is there a way to find out which method was used.

If you installed using coreos-install but didn't pass an Ignition config via the -i option, coreos-cloudinit is running at startup.

The Container Linux getting started guides have instructions on installing Container Linux on various platforms.  I'd recommend those as a starting point.

--Benjamin Gilbert

Reply all
Reply to author
Forward
0 new messages