Configuration file

Configuration file #

MiniOS differs from most classic flash distributions in that some parameters can be set before boot in a fairly simple configuration file minios/minios.conf, which minimizes the amount of work required when creating your own modules to create embedded systems. Optionally, some of the parameters can be set in the boot parameters.

MiniOS configuration file #

Boot options take precedence over the configuration file. Some parameters in this file are service ones and it is better not to change them. Below is an example of a standard configuration file:

USER_NAME="live"
USER_PASSWORD="evil"
ROOT_PASSWORD="toor"
HOST_NAME="minios"
DEFAULT_TARGET="graphical"
ENABLE_SERVICES="ssh"
DISABLE_SERVICES=""
SSH_KEY="authorized_keys"
CLOUD="false"
SCRIPTS="true"
HIDE_CREDENTIALS="false"
AUTOLOGIN="true"
SYSTEM_TYPE="puzzle"
CORE_BUNDLE_PREFIX="00-core"
BEXT="sb"

Some of these options can only be set once, before the first load, if you are using persistent mode. In persistent mode, only the following parameters can always be changed:

USER_PASSWORD
ROOT_PASSWORD
ENABLE_SERVICES
DISABLE_SERVICES
SSH_KEY
HIDE_CREDENTIALS
AUTOLOGIN

Description of parameters #

ParameterMeaningExampleWhich initrd works with
USER_NAMEThe name of the user whose profile will be created on first boot. If you specify the username root, then no user profile will be created, the USER_PASSWORD parameter will be ignored, and login will be performed using the root profile.USER_NAME=live
USER_NAME=user
USER_NAME=root
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
USER_PASSWORDThe password of a main user in clear text. The password must not include ' , \ , and other characters that might be misinterpreted by bash.USER_PASSWORD=evil
USER_PASSWORD=PxKYJnLK8cv0E3Hd
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
ROOT_PASSWORDPassword of the privileged user root in clear text. The password must not include ' , \ , and other characters that might be misinterpreted by bash.ROOT_PASSWORD=toor
ROOT_PASSWORD=9gVIlgGsZtpKPsE8
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
HOST_NAMEThe name of the node associated with the system.HOST_NAME=minios
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
DEFAULT_TARGETThe purpose of systemd. You can read more about systemd targets here.DEFAULT_TARGET=graphical
DEFAULT_TARGET=multi-user
  • MiniOS Live Kit
ENABLE_SERVICESEnable services on boot.ENABLE_SERVICES=ssh
ENABLE_SERVICES=ssh,firewalld
  • MiniOS Live Kit
DISABLE_SERVICESTurn off services on boot.DISABLE_SERVICES=docker
DISABLE_SERVICES=docker,firewalld,ssh
  • MiniOS Live Kit
SSH_KEYThe name of the SSH public key file, which must be located in the system folder on the media (along with the main .sb modules). By default, the system looks for a file named authorized_keys.
This file will be copied to ~/.ssh/authorized_keys of the main user and root user when the system boots, and can be used to authorize with using SSH keys.
SSH_KEY=authorized_keys
SSH_KEY=my_public_key.pub
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
CLOUDService parameter, required for use with cloud-init, does not apply to public versions of MiniOS.CLOUD=false
  • MiniOS Live Kit
SCRIPTSRunning shell scripts from the minios/scripts folder, enabled by default. Scripts run automatically on tty2 after reaching multi-user.target (init 3).SCRIPTS=true
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
HIDE_CREDENTIALSHide credentials displayed as tooltip in tty. Disabled by default.HIDE_CREDENTIALS=false
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
AUTOLOGINEnable/disable automatic login. Enabled by default.AUTOLOGIN=true
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
SYSTEM_TYPESelect the operating mode of the system. If you plan to install software exclusively by modules, you must use “puzzle”, if you want to install software using apt, then “classic”. The default setting is “puzzle”.SYSTEM_TYPE=puzzle
SYSTEM_TYPE=classic
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
CORE_BUNDLE_PREFIXA service parameter that tells utilities in the system the name of the module with the base system.CORE_BUNDLE_PREFIX=00-core
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD
BEXTA service parameter that indicates to utilities in the system the extension in the module file name.BEXT=sb
  • MiniOS Live Kit
  • Slax Live Kit
  • UIRD

Important! #

  • The SSH server is enabled by default for compatibility with 3rd party initrds, to disable it, you must not only remove it from ENABLE_SERVICES, but also add it to DISABLE_SERVICES.
  • When first booting in persistent mode, or if you are using clean boot or RAM boot mode, you can optionally change the HOST_NAME and DEFAULT_TARGET parameters.
  • The CLOUD, CORE_BUNDLE_PREFIX and BEXT parameters cannot be changed, they are service ones and are used in non-standard non-public versions of MiniOS (cloud virtualization, non-standard module layout, etc.).
  • When using an initrd other than the MiniOS Live Kit, some of the options will not be available, pay attention to the right column.

What else can the minios.conf file be useful for? You can use it to set your own parameters in your scripts when creating modules. On first boot, it is copied to the /etc/minios folder, then the /etc/minios/minios.conf file is automatically monitored and, when changes are made, overwrites the configuration file on the flash drive, if it is writable. Thus, you can put your variables in minios.conf and get them from /etc/minios/minios.conf in your scripts regardless of the type of initrd used.