NOTE: This is an adjusted version of https://github.com/openSUSE/jeos-firstboot, for use with WSL. It SHOULD NOT be used outside of WSL
wsl-firstboot allows initial configuration and adjustments of a Linux system using text based dialogs.
It is a lightweight and customisable firstboot wizard that allows to set basic system settings during and after the first boot of an image. Including showing the license and prompt for language, keyboard, timezone, root passsword and network configuration..
This is mainly developed for openSUSE and SUSE Linux Enterprise Server WSL images.
For more information visit the JeOS wiki.
The RPM package is developed in openSUSE OBS devel package
You can also get binaries RPM for openSUSE flavours at package download
wsl-firstboot is used as two systemd services wsl-firstboot.service and wsl-firstboot-snapshot, for using it you need to copy the appropriate service files and enable it.
You can check the example in the RPM package for installation.
The service is controlled by a file, so after installing it you should be sure that your system is configured appropriately
# Enable wsl-firstboot
mkdir -p /var/lib/YaST2
touch /var/lib/YaST2/reconfig_system
systemctl mask systemd-firstboot.service
systemctl enable wsl-firstboot.serviceBeside the service that runs on firstboot there is also a tool to change configuration in a running system, this will also be installed and available as wsl-config
wsl-config usage:
Usage: wsl-config [OPTION...] [CONFIG_NAME]
Configure system settings using an interactive dialog
-h Show this usage help
locale Show configuration for locale
keytable Show configuration for keyboard
timezone Show configuration for timezone
password Show configuration for password
network (removed) Show configuration for network
raspberrywifi (removed) Show configuration for raspberrywifi
registration Use SUSEConnect, if required
switch Choose SLES or SLED, if required
Additional modules (like raspberrywifi) are shown if proper prerequisites are met.
If no parameter is given it shows a dialog for selection.
wsl-firstboot can be extended using modules written in bash placed in /usr/share/wsl-firstboot/modules/ or /etc/wsl-firstboot/modules/. Modules in /etc/wsl-firstboot/modules/ will be preferred. If a link to /dev/null is encountered, the module is skipped.
The basename of the module file is its name. It is used as prefix of properties and hooks. It is also used as argument to wsl-config when calling the module directly.
# Shown in wsl-config for module selection
yourmodule_title="Title of your module"
# Shown in wsl-config --help
yourmodule_description="Show an awesome dialog with a nice button"
# Priority of the module. Modules with higher priority are run later in wsl-firstboot and shown below in wsl-config.
# The default is 50.
yourmodule_priority=50# Runs if called by wsl-firstboot, currently after systemd-firstboot is called
# (that should probably be changed)
yourmodule_systemd_firstboot() { }
# Runs if called by wsl-firstboot, after all systemd_firstboot hooks.
yourmodule_post() { }
# Runs if called by wsl-config
yourmodule_wsl_config() { }
# Runs at the end of wsl-firstboot just before exiting.
yourmodule_cleanup() { }Any contributions you make are greatly appreciated.
Feel free to create any Issues and send pull requests to this repository.
Distributed under the MIT License. See LICENSE for more information.
wsl-firstboot supports systemd credentials to pre-configure systems. The wizard does not prompt for settings defined by credentials.
- firstboot.keymap
- firstboot.license-agreed
- firstboot.locale
- firstboot.timezone
- passwd.plaintext-password.root