Void iso creation

this is not an extensive tutorial,
this is just a basic overview of how to use the tool

Building a Custom Void Linux ISO with Cinnamon Using void-mklive

Void Linux is a lightweight, independent Linux distribution with a unique runit init system. The void-mklive tool allows you to create custom live ISOs that can run as bootable environments or install a tailored system. This tutorial explains how to install void-mklive, create a basic live ISO, and build a custom ISO with the Cinnamon desktop, neovim, firefox, and alacritty, including a custom wallpaper and green terminal prompt. The custom ISO supports installation with void-installer to replicate the live setup on a disk or virtual machine.

Prerequisites

  • A Void Linux system (physical machine or virtual machine).
  • Root privileges (sudo).
  • Internet access for downloading packages.
  • 5-10 GB of free disk space.
  • Basic familiarity with terminal commands.

Install void-mklive

The void-mklive tool is hosted in Void Linux’s source repository. Install the required dependencies and clone the repository.

sudo xbps-install -S git xorriso squashfs-tools liblz4
git clone https://github.com/void-linux/void-mklive.git
cd void-mklive

Create a Basic Live ISO

Start by creating a minimal live ISO to understand the void-mklive process. The mklive.sh script generates a basic ISO without a desktop environment.

sudo ./mklive.sh -a x86_64 -o void-simple.iso

This command builds a minimal 64-bit ISO with a TTY login prompt and a base system. The process takes a few minutes. Test the ISO in a virtual machine (e.g., QEMU):

qemu-system-x86_64 -cdrom void-simple.iso -m 2G -enable-kvm

The ISO boots to a TTY, where you can log in as root (no password) and explore the base system.

Plan the Custom ISO

The custom ISO will include:

  • The Cinnamon desktop environment for a lightweight interface.
  • neovim for coding, firefox for browsing, and alacritty as a terminal emulator.
  • A custom wallpaper and green terminal prompt.
  • The void-installer to install the live environment’s setup.
  • Auto-login for the live mode.

The mkiso.sh script will be used, as it supports the base variant with void-installer and allows custom packages and configurations.

Build the Custom ISO

Set up a configuration directory to store custom files for the ISO.
This can be anywhere on your system, just remember the path, for our example we will create it in our home directory

mkdir -p ~/my-void-stuff/etc/skel
mkdir -p ~/my-void-stuff/usr/share/backgrounds

Add Custom Configurations

  1. Create a .bashrc file for a green terminal prompt.

    echo "PS1='\[\e[32m\]\u@\h:\w\$\[\e[m\] '" > ~/my-void-stuff/etc/skel/.bashrc
  2. Download a wallpaper. Replace [URL-to-image] with a valid image URL.

    wget -O ~/my-void-stuff/usr/share/backgrounds/my-wallpaper.jpg [URL-to-image]

Build the ISO

Use mkiso.sh to build the custom ISO with the base variant, additional packages, and custom configurations.

sudo ./mkiso.sh -a x86_64 -b base\
  -p "cinnamon neovim firefox alacritty"\
  -I ~/my-void-stuff\
  -- -C "live.autologin"\
  -o void-my-cinnamon.iso

This command:

  • Targets 64-bit systems (-a x86_64).
  • Uses the base variant with void-installer (-b base).
  • Adds packages: cinnamon, neovim, firefox, alacritty (-p).
  • Includes custom configurations (-I ~/my-void-stuff).
  • Enables auto-login (-C live.autologin).
  • Names the output void-my-cinnamon.iso (-o).

The -- passes flags to mklive.sh internally. The build takes 10-20 minutes, depending on your system and internet speed.

Test the Live ISO

Test the ISO to verify the live environment.

  1. Boot the ISO in a virtual machine (e.g., QEMU):

    qemu-system-x86_64 -cdrom void-my-cinnamon.iso -m 2G -enable-kvm
  2. Verify that the ISO boots into Cinnamon with auto-login, and check:

    • The custom wallpaper (my-wallpaper.jpg) is present.
    • The terminal (alacritty) shows the green prompt.
    • neovim and firefox are functional.

Install the Custom Setup

Use void-installer to install the live environment to a disk or virtual machine.

  1. Open a terminal and run:

    sudo void-installer
  2. Follow the prompts:

    • Select keyboard layout (e.g., us).
    • Configure networking (e.g., DHCP).
    • Partition the disk using cfdisk (e.g., create a single ext4 partition for /).
    • Format the partition: mkfs.ext4 /dev/sda1.
    • Set the mount point to /.
    • Select Local source to install the ISO’s packages (cinnamon, firefox, etc.).
    • Set a hostname, root password, and user account.
    • Proceed with installation.
  3. Reboot and verify the installed system includes Cinnamon, firefox, neovim, alacritty, the wallpaper, and the green prompt.

Additional Customizations

To further customize the ISO:

  • Enable services (e.g., -S sshd for SSH).
  • Specify a kernel (e.g., -v linux6.6).
  • Set a locale (e.g., -l en_GB.UTF-8).
  • Add configurations to /etc/skel for new users.

The void-mklive GitHub README lists all options. Build on a Void Linux system for compatibility, avoiding containers or other distributions.

Conclusion

This tutorial demonstrated how to use void-mklive to create a custom Void Linux ISO with Cinnamon, neovim, firefox, and alacritty. The ISO boots into a live environment with a custom wallpaper and green prompt, and it can install the same setup using void-installer. This process showcases Void’s flexibility for creating personalized, portable Linux systems.