Basic configuration using rc.conf. - RedCoolBeans/CargOS GitHub Wiki

Basic configuration in /etc/rc.conf

CargOS uses /etc/rc.conf to determine what will be executed when the system boots. Understanding this file is important.

The /etc/defaults/rc.conf file contains the default values for most settings. To override a default value, the new value must be put into /etc/rc.conf. The definitions there override the ones in /etc/defaults/rc.conf (which you should leave unchanged).

Define a hostname for your machine (use a fully qualified hostname, i.e., one including domain).

If you have a standalone machine you can use any name (for example, vigor3.your.domain). If your machine is connected to a network, you should supply the correct name. (e.g. hostname=vigor3.your.domain). By default CargOS uses your MAC address of the configured network interface.

Default gateway

If your are connected to a local network or the Internet through a router, set the defaultroute variable to the IP address of your router (sometimes called a default gateway). For example, defaultroute=192.168.1.1.

Network interface configuration

Network interface configuration also happens in /etc/rc.conf. For example to configure the interface called ens3 to use dhcp, one would need to add ifconfig_ens3=dhcp to /etc/rc.conf. If a static configuration is preferred, one would use ifconfig_ens3="inet 192.168.0.1 netmask 255.255.255.0".

Disk/partition management

CargOS 2015.11 switched to using XFS on top of LVM. The default partitioning as automatically created by the installer allocates the largest chunk for the Docker layer storage in /var/lib/docker. To extend this or other volumes the following commands can be used:

lvextend -L+5G /dev/cargos/home
xfs_growfs -d /home

Default user

The CargOS installer does not create any users at the time of installation. Only the root user can be used by default to login to the system (local only) and then it is up to the system administrator to create users and groups. If required a sudo(8) package is available and can be installed with pkgin:

pkgin install sudo