Configuration file - minios-linux/minios-live GitHub Wiki
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. 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"
EXPORT_LOGS="false"
LOCALES="de_DE.UTF-8"
TIMEZONE="Europe/Berlin"
KEYBOARD_MODEL="pc105"
KEYBOARD_LAYOUT="us,de"
KEYBOARD_VARIANT=""
KEYBOARD_OPTIONS="grp:alt_shift_toggle,grp_led:scroll"
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
LOCALES
TIMEZONE
KEYBOARD_MODEL
KEYBOARD_LAYOUT
KEYBOARD_VARIANT
KEYBOARD_OPTIONS
Parameter | Meaning | Example |
---|---|---|
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 |
EXPORT_LOGS | If true, when booting from a writable media, MiniOS logs are copied to the minios/logs folder during boot. The default value is "false" | EXPORT_LOGS="false" |
LOCALES | Sets the locale. |
LOCALES="en_US.UTF-8" LOCALES="de_DE.UTF-8"
|
TIMEZONE | Sets the timezone. |
TIMEZONE="Europe/Berlin" TIMEZONE="America/New_York"
|
KEYBOARD_MODEL | Sets the keyboard model. |
KEYBOARD_MODEL="pc105" KEYBOARD_MODEL="ThinkPadZ60"
|
KEYBOARD_LAYOUT | Sets the keyboard layout. |
KEYBOARD_LAYOUT="us" KEYBOARD_LAYOUT="de"
|
KEYBOARD_VARIANT | Sets the keyboard variant. |
KEYBOARD_VARIANT="dvorak" KEYBOARD_VARIANT="colemak"
|
KEYBOARD_OPTIONS | Sets keyboard options. |
KEYBOARD_OPTIONS="grp:alt_shift_toggle" KEYBOARD_OPTIONS="grp_led:scroll"
|
- 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. - 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.