Skip to content
131 changes: 131 additions & 0 deletions docs/user/guides/network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Agama network-based installation

The Agama installer ships as a Live ISO image generated by [KIWI NG](https://osinside.github.io/kiwi/index.html).

It can be booted directly from an USB stick, CD/DVD or from the network using
the initrd and the kernel extracted from the ISO as it is documented [by KIWI](https://osinside.github.io/kiwi/working_with_images/network_live_iso_boot.html#booting-a-live-iso-image-from-network).

As the remote boot process of a live ISO image places the ISO file into a ramdisk
by default it is recommended to also extract the compressed root file system
(squashfs.img).

Once extracted, these files must be copied to an appropriate location accessible
via FTP, TFTP, HTTP, HTTPS...

```bash
sudo mount -oro,loop /srv/install/iso/agama-installer.iso /mnt
sudo cp /mnt/boot/x86_64/loader/linux /srv/tftpboot/boot/images/agama/x86_64/
sudo cp /mnt/boot/x86_64/loader/initrd /srv/tftpboot/boot/images/agama/x86_64/
sudo cp /mnt/LiveOS/squashfs.img /srv/tftpboot/boot/images/agama/x86_64/
```

How to set up a PXE server is out of scope of this guide but some documentation
for SLES can be found at [PXE Server](#pxe-server-documentation).

## Important changes compared to YaST installer

There are some important changes that affect the installation workflow and
specially the [kernel boot options](#kernel-boot-options).

- Linuxrc is not included and [dracut][]. takes care of booting the installer.
- NetworkManager is the default network backend.

We tried to provide some [compatibility with Linuxrc options](https://agama-project.github.io/docs/user/reference/boot_options/linuxrc_compatibility)
but we recommend migrating to [dracut][] specific ones because not all the use
cases are supported.

## Kernel boot options

As there is no Linuxrc anymore, the options given as kernel parameters should
be replaced by [dracut][] specific ones like the network configuration and the
installer sources.

For Agama specific options check the [boot options](https://agama-project.github.io/docs/user/reference/boot_options)
section.

### Specify the installer image location

It already requires network configuration enforcing `rd.neednet=1`.

- `root=live:http://192.168.0.1/boot/images/agama/x86_64/squashfs.img ip=dhcp`

Sets the SquashFS image or ISO to be fetched by the livenet [dracut][] module.

- `inst.install_url=http://192.168.0.1/install/agama/x86_84`

Sets the repositories to be used by the installer instead of the defaults
repositories for the selected product. It is not necessary in case of an online
installation with a registered product.

### Network configuration

Network will be configured by [dracut][] only if really required so, there are
some kernel boot options like `root=live:<URL>` that already requires or
enforces the network to be configured, but not all the kernel options
(e.g., `inst.install_url`, `ip`) do so, therefore, to ensure the network is
configured by [dracut][] set `rd.neednet=1`.

:::warning

If explicit network configuration is provided using the `ip=` kernel boot option,
Agama will disable the NetworkManager DHCP autosetup when starting the installer
marking the NetworkManager connections generated by the nm-initrd-generator to
be persisted after the installation by default.

The `inst.copy_network=0` kernel boot option can be used to disable the copy of
NetworkManager connections from `/etc/NetworkManager/system-connections` to the
target system.

:::

### DHCP configuration

- `ip=dhcp`

nm-initrd-generator will generate a profile using DHCP allowing multiple
devices to apply it at the same time.

- `ip=enp1s0:dhcp`

The generated profile will be assigned to enp1s0 interface.

- `ip=aa-bb-cc-dd-ee-ff:dhcp`

The generated profile will be assigned to the device with the specified mac address

### DHCP static configuration

- `ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<dns1>][:<dns2>]]`

- `ip=10.144.136.45::10.144.136.254:24:agama1.suse.cz:enc800`

Static configuration using a prefix length as the netmask.

- `ip=192.168.100.228::192.168.100.1:255.255.255.0:agama.test:aa-bb-cc-dd-ee-ff`

The interface can be also a mac address.

### Use custom interface naming

- `ifname=<interface>:<MAC>`

Assign network device name `<interface>` to the NIC with the MAC `<MAC>`.

- `ifname=bootnet:AA:BB:CC:DD:EE:FF ip=bootnet:dhcp rd.neednet=1`

:::warning

Agama will persist the renaming of the interface after the installation
through a systemd network link file (e.g., `/etc/systemd/network/10-agama-ifname-bootnet.link`).

The file can be removed using a [post-installation script](/docs/user/reference/profile/scripts.md#post-installation-scripts)
at the Agama configuration.

:::

## PXE server documentation

For more information about setting up a PXE Boot Server on SUSE Linux
Enterprise Server 16.0 refer to [this guide](https://susedoc.github.io/doc-modular/main/html/SLES-PXE-server/).

[dracut]: https://man7.org/linux/man-pages/man7/dracut.cmdline.7.html