talos icon indicating copy to clipboard operation
talos copied to clipboard

Takeover Installation

Open sj14 opened this issue 2 years ago • 6 comments

Feature Request

Add an installation option which will overwrite the currently running system.

Description

In some environments, it's not possible to boot from custom images. Takeover installations (e.g. as provided by k3os) are a practical workaround for those environments.

sj14 avatar Jun 06 '22 09:06 sj14

Talos does indeed work with that option, something along the lines of:

wget -O /tmp/talos.raw.xz https://github.com/siderolabs/talos/releases/download/v0.1.0/hcloud-amd64.raw.xz
# Replace system
xz -d -c /tmp/talos.raw.xz | dd of=/dev/sda && sync

This is for Hetzner cloud, probably need a custom image for the particular environment. The most nearest one could be nocloud-amd64.raw.xz

frezbo avatar Jun 06 '22 09:06 frezbo

Ah, great. I'm running instances on the Oracle Cloud free tier (thus, only a limited number of available operating systems, no custom images etc.)

sj14 avatar Jun 06 '22 09:06 sj14

Yep, worked, thank you. I used dd of=/dev/sda bs=16M to make it faster. Documenting this installation method would be nice 👍

sj14 avatar Jun 17 '22 12:06 sj14

Yep, worked, thank you. I used dd of=/dev/sda bs=16M to make it faster. Documenting this installation method would be nice 👍

Hi, I wanted to implement something similar, how do you pass the config file (cloud init) to the instance after replacing it's system with the talos one ?

louga31 avatar Feb 29 '24 04:02 louga31

Yep, worked, thank you. I used dd of=/dev/sda bs=16M to make it faster. Documenting this installation method would be nice 👍

Hi, I wanted to implement something similar, how do you pass the config file (cloud init) to the instance after replacing it's system with the talos one ?

Hi. No cloud-init. Continue with generating and applying the config as when the system would have been "normally" installed: https://www.talos.dev/v1.6/introduction/getting-started/#configure-talos-linux

Btw: the dd approach might not always work the first try when you overwrite a persisted and running system. When you have the option, overwrite it from a rescue system from the ram or similar.

sj14 avatar Feb 29 '24 20:02 sj14