rancher / elemental

Elemental is a software stack enabling centralized, full cloud-native OS management with Kubernetes.
https://elemental.docs.rancher.com/
Apache License 2.0
303 stars 39 forks source link

Configuration persistency issue #762

Open divyashukla25 opened 1 year ago

divyashukla25 commented 1 year ago

Trying to add the configuration files to set the static IP and password in /usr/local/cloud-config or /oem after system has been created, at the runtime.

But, after the reboot, the configuration files which I've putted in the /oem directory gets removed. I even tried in /usr/local/cloud-config directory also. But got the same result.

Ideally, the config files should stay even after the reboot. Please let me know, how I can resolve this issue.

davidcassany commented 1 year ago

@divyashukla25 feels like there might be something wrong in your environment as /oem and /usr/local/cloud-config are writable and persistent paths. I just have checked it on a VM on my env and the default configuration makes both paths writable and persistent.

Could you share the contents of your /etc/os-release and the runtime /etc/fstab?

divyashukla25 commented 1 year ago

Hi @davidcassany

Below are the files

davidcassany commented 1 year ago

Hi @divyashukla25

The mount points you shared are from the live ISO, hence this is always ephemeral. Did you install elemental on the hard disk? Could it be you installed elemental and your system rebooted again to the live ISO? If so, I am wondering about your firmware setup, feels like the device running the ISO is having a preference over other devices or EFI entries.

divyashukla25 commented 1 year ago

Hey, I again tried that and I checked that there is no fstab file, only mtab and it is giving me the above mentioned output. I'm installing elemental on VMware and my firmware is set on UEFI.

image

Could you please tell me how I can make the /oem directory persistent, so when systems reboot my customized file remain in the /oem directory and also writable at the same time.

davidcassany commented 1 year ago

@divyashukla25 are you actually installing the OS from the booted live ISO? You don't have any /etc/fstab file because within the live ISO it is not created at all. fstab is only generated when booting from the disk of an installed system.

Have you registered the machine against a Rancher instance including elemental-operator?

There is a small how to in our docs for VMWare. As on step 4.2 Boot the VM with the elemental ISO the installation automatically starts after booting. Once the installation is over reboot the machine and it should boot from the disk, not the ISO. Then, when booted from the disk /oem is persistent by default. /oem is not persistent on the live OS.

divyashukla25 commented 1 year ago

Hi @davidcassany

I tried with the documents which you have provided. And it is working for me now, I'm able to get the /oem persistent. This is really helpful. Thank you very much.

divyashukla25 commented 1 year ago

Hey @davidcassany

Actually, I tried your provided documents. And performed below commands

image

But after doing it, my k3s is not getting installed and rancher registeration is also getting failed.

image image image

Please help me to resolve this issue. I need this on urgent basis. Thanks.

kkaempf commented 1 year ago

@divyashukla25 it would help us a lot if you would append complete logfiles instead of partial screen shots.