Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 2.54 KB

installation.md

File metadata and controls

61 lines (45 loc) · 2.54 KB

Installing CuOS

What the installer does, and how a system finds its configuration on first boot.

To build an installer, see Building an installer in cuos-release. "Installation" means the OS is written onto another drive from removable media; to copy it directly onto the target's storage, see What a CuOS image contains.

The installer is x86 only. For ARM64 boards such as the Raspberry Pi, write a disk image instead.

What the installation media contains

  • A bootloader configuration
  • A choice of installation target
  • The system image to be installed

First boot configuration

A freshly installed system needs a system.json. It is read from the boot partition, which is the FAT partition labelled boot:

  • Network settings
  • Hostname
  • Update sources
  • The initial application container

The installer writes the system.json of the installation media onto that partition once the image is on the disk. It replaces the configuration the image was built with, rather than merging into it. That is what lets one installer be turned into installers for other systems (tool.sh installer --base): nothing of the original system's configuration reaches them. The media can be removed before the first boot.

If the file is not valid JSON, the system reports the problem and reboots rather than starting half-configured. The same happens if the boot partition cannot be read and no cloud-init drive configures the system. Without any system.json, the system starts on its defaults.

See the system.json reference for the keys, and system.json for how a configuration is put together.

An LXC container has no boot partition and is configured differently — see CuOS in an LXC container.

Cloud-init

CuOS also accepts cloud-init configuration: put it on the boot partition or a cloud-init drive, and the system applies it on first boot. It is translated into the same system.json model (system/cuos/cloud-init-to-system-json.sh).

Troubleshooting

Symptom Check
Does not boot Firmware settings (UEFI or legacy BIOS), Secure Boot disabled, boot order, image integrity
Boots but no network Network settings in system.json, physical connection, then the system log
Application container missing Registry credentials and DNS; cuos log on the running system
Reboots shortly after starting An invalid system.json on the boot partition