Skip to content
97 changes: 97 additions & 0 deletions docs/user/guides/network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Agama Network 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 Network using the initrd and kernel extracted from the ISO as it is documented [here](https://osinside.github.io/kiwi/working_with_images/network_live_iso_boot.html#booting-a-live-iso-image-from-network).

**Note:** 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 or HTTP.

```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 document but some documentation for SLES can be found at [PXE Server](#pxe-server-documentation).

## Important changes from 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 to migrate to the dracut specific ones as 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](https://man7.org/linux/man-pages/man7/dracut.cmdline.7.html) 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the user need to do something about this? Or is it automatically added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is automatically added.


- `root=live:http://192.168.0.1/agama/boot/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/agama/install/x86_84`

Sets the repositories to be used by the installer instead of the ones defined
in the product definition.

**Note:** For an online installation with a registered product does not make sense.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use :::note.


### Network configuration

Network will be configured by dracut only if really required so, kernel boot options like `root=live:<URL>` already requires it but not all the kernel options (e.g., `inst.install_url`) do so, therefore, to ensure the network is configured by dracut set rd.neednet=1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph is kind of confusing. Which arguments would force the network to be automatically started? It would be good to list them.


**Note:** If an explicit network configuration is given using the `ip=` parameter Agama will disable the NetworkManager DHCP autosetup when starting the installer and mark the nm-initrd-generator generated connections to be persisted after the installation by default. To disable the copy of network the `inst.copy_network=0` parameter is available.

### 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`

**Note:** Agama will persist the renamed interface after the installation
through a systemd network link file.

## 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/).