Readymade
Readymade (opens in a new tab) is the new installer for Ultramarine.. It's built with Rust and libhelium (opens in a new tab) and comes with a custom backend based on systemd-repart.
Readymade was created due to frustrations with Anaconda. The most common complaint we receive about Ultramarine is "why is Anaconda (slow/ugly/hard to use/like this)".
We knew we had to replace Anaconda at some point, but had been putting it off, until we tried to make Anaconda install to a Chromebook.
Chromebooks are weird, so to boot Linux on them we have to act weird. We flash a binary to a partition, and don't have an ESP or BIOSBOOT partition. Anaconda does not like this, this is when we discovered that Anaconda is hardcoded for EFI and BIOS systems to have very particular disk layouts, with no option for distributions to change it.
So we decided to fix it, and that's how Readymade was born.
It's very important to note that Readymade does not play any role in building OS images, unlike Anaconda.
Building
The most up to date build instructions can be found in the CI file (opens in a new tab) or HACKING.md (opens in a new tab).
Build dependencies:
cargo
clang-devel
cmake
gcc
gettext-devel
pkgconfig(libhelium-1)
pkgconfig(libgnome-desktop4)Dependencies: (according to dnf rq --providers-of=requires readymade)
cairo
cairo-gobject
efibootmgr
gdk-pixbuf2
glib2
glibc
glibc
gnome-desktop4
graphene
gtk4
harfbuzz
libgcc
libhelium
pango
pkexec
vulkan-loader
xz-libsAnd optionally, submarine (for Chromebook installations).
Configurations
Configurations are read from /etc/readymade.toml or, a path specified by the READYMADE_CONFIG variable.
Some example configuration files for Ultramarine are in templates/.
The Universal Blue configurations are available here: https://github.com/ublue-os/bluefin/blob/3c75eac59184afbe89250f2a4eaaf4c748b23ec8/iso_files/configure_iso.sh#L21-L53 (opens in a new tab)
Running
We provide a system policy to allow Readymade to run as root without authentication.
Copy the com.fyralabs.pkexec.readymade.policy file to /usr/share/polkit-1/actions/ and restart the Polkit service.
In development, it may be useful to specify options to the binary, such as the configuration file path, or the log level. You can do this by setting environment variables.
For example, to run with tracing and the ultramarine-chromebook template, run the following command:
READYMADE_LOG=trace READYMADE_CONFIG=templates/ultramarine-chromebook.toml cargo runYou can also set READYMADE_DRY_RUN this will skip the actual install.
Please note that this variable is set to 1 by default, within development builds.
You may want to create a virtual disk to install to during development:
fallocate -l 8G test.img # Create a blank 8GB file
sudo losetup --partscan --show -f test.img # Attach the file to a free loop device, take note of the outputted device.Note how loop devices become valid install targets within debug builds, select the one corresponding to the device noted in the prior commands.
You can also use another disk in your system, or a USB drive.
The above commands are available as scripts in the scripts/ directory.
Debugging
Readymade currently defaults to the error log level. To set a custom log level, set READYMADE_LOG. For example: READYMADE_LOG=trace will set the log level to trace, which is the most verbose level.
Readymade logs to stderr and to a temporary folder /tmp/readymade-logsXXXXXX, which contains the file readymade.log.
The logger is powered by tracing-appender.
It also logs to the system journal, so you can view the logs by running
journalctl _COMM=readymade # add -f to follow the logsReadymade checks for Dracut's default live-base (in /dev/mapper/live-base) logical volume for the base filesystem to mount and copy from. This is usually generated with Dracut's live module. It then tries to mount the base filesystem from the logical volume and
use the files from there as the source for the installer, as it assumes the running environment is a live CD environment generated by Dracut, thus it contains the original overlay filesystem in this exact location.
While you may expect it to mount a SquashFS, the default behavior is to mount an overlay disk image generated from the SquashFS. This is to prevent the SquashFS to be extracted twice, as the live module already mounts the SquashFS and turns it into a mapper device.
If that somehow fails, it may try again and check for /run/rootfsbase as the source path, this is a fallback for Dracut live environments that have the SquashFS containing the live environment directly inside the SquashFS and not as a disk image inside the SquashFS.
Readymade will mount this location if possible, and if not, it will attempt to copy files from /mnt/live-base as the source path anyway.
You can override this by setting the environment variable REPART_COPY_SOURCE to the path of the base filesystem to copy from. This makes use of systemd 255's new relative repart source feature.
In case you have an alternate root mounted at /mnt/squash from an external source (i.e a real filesystem or a mounted SquashFS image, or even an OCI image), add the environment variable REPART_COPY_SOURCE=/mnt/squash to the command line when running Readymade.
sudo REPART_COPY_SOURCE=/mnt/rootfs readymadeTranslations
You can translate Readymade to your language by visiting the Fyra Labs Weblate (opens in a new tab) instance.
Other distros can customize the install progress page (pages/installation.rs) by providing /usr/share/readymade/resources/*.gresource, and
providing Fluent translation files in /usr/share/readymade/bento/po/.
Postinstall modules
The following postinstall modules are available:
- SELinux
- Dracut
- ReinstallKernel
- GRUB2
- CleanupBoot
- PrepareFedora
- EfiStub
- InitialSetup
- Language
- CryptSetup
- Script
To enable a module, add this to the toml configuration file:
[[postinstall]]
module = "Script" # replace Script with the module nameReadymade will execute the modules in the order specified in the configuration.