Remixing#
When your profiles are all set up, the more exciting part comes: the remixing! Now you can create your own Ubuntu remix.
Info
If you prefer applying your configurations to an existing system, that's perfectly fine as well. In that case you can skip this part and go directly to Customization.
Zephyr with your profiles will be preinstalled on a stock Ubuntu ISO. So, after a fresh install no other setup is needed, applying the customizations can start right away. This results in a smooth (re)install/configure flow.
The remixing process is entirely automated; you will only have to run a few zephyrctl
commands (as explained later). However, you'll need to choose the Ubuntu ISO file you want to remix.
Note
Currently, remixing has only been tested with the Ubuntu 20.04 desktop ISO.
Additionally, if you have your own scripts for initializing/bootstrapping your workspace or want to embed any other projects/files into the ISO file that's possible too.
For this purpose use /payload
directory in Zephyr root. It's similar in concept to /profiles
dir: it's ignored by Git, so you can copy any payload (files) into this directory (or symlink to any other dir!) it won't disturb Zephyr. That directory and its contents will be packed into the SquashFS filesystem, so they are available when booting from the ISO (live desktop), and they are copied to the freshly installed system too! You can find them in /usr/local/share/zephyr/payload
by default, but this can be changed (see INSTALL_DIR
config).
Besides the payload, you can further customize the remixing, like adding your own preseed files. The configuration files live in the /remix
directory. This works similarly to the /profiles
and /payload
directories.
Remixing steps
- Download the ISO file that will be remixed (e.g. Ubuntu 20.04 desktop ISO)
# There are many methods, in this example I use 'wget' wget https://releases.ubuntu.com/20.04.6/ubuntu-20.04.6-desktop-amd64.iso
(Optional) Create preseed files in
/remix/preseeds
directory.These files will be included in the remixed ISO image, and they can be used to bootstrap the installation process by preseeding the installer with answers to questions it asks. You need to give the preseed file as kernel boot parameter to the installer.
linux /casper/vmlinuz file=/cdrom/preseed/zephyr.seed maybe-ubiquity quiet splash ---
Tip
In preseed files, an include directive is supported, so you can split your preseed configuration into multiple files. For examples check preseed files in
/example/remix/preseeds
directory.(Optional) Customize GRUB menu of the remixed ISO.
You can override the stock
grub.cfg
with your own at/remix/grub.cfg
. This is useful if you want to add extra boot options (maybe ones with your preseed files as boot options) or change the default boot entry.There's a helper to extract the stock
grub.cfg
from the ISO file, so you can start from that. Also you can check the example at/example/remix/grub.cfg
for inspiration.zephyrctl extract-grub ubuntu-20.04.6-desktop-amd64.iso
Remix the ISO file
zephyrctl remix ubuntu-20.04.6-desktop-amd64.iso
By default, this will create a remixed ISO file named
zephyr.iso
in the current directory. This can be configured or you can set a filename on CLI also. For details runzephyrctl help remix
.Success
If you want install your remix on a virtual machine then you're ready!
Just boot from the newly generated ISO.
(Optional) Burn the ISO file to a USB-stick, if you want install on a physical machine.
zephyrctl burn zephyr.iso
This will interactively ask for a disk (device file). It's possible to give the disk as a parameter, in this case it will run non-interactively. Also make sure the USB-stick is plugged in.
For details execute
zephyrctl help burn
.Any previous data on the disk will be deleted!
There are some safeguards, so hopefully won't overwrite your root filesystem, but please be careful and always double check that the correct device is selected
At this point you have remixed Ubuntu. The next step is Ubuntu installation.