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 #
Parameter | Meaning | Example | Which initrd works with |
---|---|---|---|
USER_NAME | The 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 |
|
USER_PASSWORD | The 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 |
|
ROOT_PASSWORD | Password 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 |
|
HOST_NAME | The name of the node associated with the system. | HOST_NAME=minios |
|
DEFAULT_TARGET | The purpose of systemd. You can read more about systemd targets here. | DEFAULT_TARGET=graphical DEFAULT_TARGET=multi-user |
|
ENABLE_SERVICES | Enable services on boot. | ENABLE_SERVICES=ssh ENABLE_SERVICES=ssh,firewalld |
|
DISABLE_SERVICES | Turn off services on boot. | DISABLE_SERVICES=docker DISABLE_SERVICES=docker,firewalld,ssh |
|
SSH_KEY | The 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 |
|
CLOUD | Service parameter, required for use with cloud-init, does not apply to public versions of MiniOS. | CLOUD=false |
|
SCRIPTS | Running shell scripts from the minios/scripts folder, enabled by default. Scripts run automatically on tty2 after reaching multi-user.target (init 3). | SCRIPTS=true |
|
HIDE_CREDENTIALS | Hide credentials displayed as tooltip in tty. Disabled by default. | HIDE_CREDENTIALS=false |
|
AUTOLOGIN | Enable/disable automatic login. Enabled by default. | AUTOLOGIN=true |
|
SYSTEM_TYPE | Select 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 |
|
CORE_BUNDLE_PREFIX | A service parameter that tells utilities in the system the name of the module with the base system. | CORE_BUNDLE_PREFIX=00-core |
|
BEXT | A service parameter that indicates to utilities in the system the extension in the module file name. | BEXT=sb |
|
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 toDISABLE_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
andDEFAULT_TARGET
parameters. - The
CLOUD
,CORE_BUNDLE_PREFIX
andBEXT
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.