Setting Up eLxr on Windows Subsystem for Linux

About This Task

Before you begin, download the eLxr Edge ISO image from the official website on the Windows system:

https://elxr.org/downloads

This guide assumes the ISO file has already been downloaded in Windows, so it is accessible from WSL under the /mnt/c path.

Note

This procedure installs eLxr in WSL using an extracted root filesystem. OSTree-based features such as atomic upgrades, rollbacks, and OSTree management commands are not supported in this setup.

Before You Begin

Ensure the following prerequisites are met before proceeding:

  • Windows Subsystem for Linux (WSL2) is installed and enabled.

  • A Debian-based Linux distribution such as Ubuntu or Debian is installed and available in WSL.

This documentation assumes a Debian environment, as eLxr is Debian-based and the commands and tooling used in this procedure align with Debian utilities. External Microsoft documentation covers WSL and Debian installation steps.

Procedure

  1. Open a Windows command prompt and launch Ubuntu.

    Ubuntu is used here due to broader WSL tooling support and availability of required utilities by default. Debian-based distributions are also expected to work, but Ubuntu is used as the reference environment.

  2. Create a directory called workspace.

    mkdir workspace
    
  3. Change to the workspace directory.

    cd workspace
    
  4. Copy the ISO image from the Windows Downloads directory to the current directory.

    cp /mnt/c/Users/<your-username>/Downloads/elxr-edge-<version>-amd64.iso .
    
  5. Mount and extract the ISO image.

    mkdir iso_mnt
    chmod 755 iso_mnt
    sudo mount -o loop elxr-edge-<version>-amd64.iso iso_mnt
    

    After mounting, you may see a warning indicating that the source is write-protected. This is expected behavior and not an error, as ISO files are mounted read-only.

  6. Extract the root filesystem.

    Most ISOs store their root filesystem in a compressed format such as filesystem.squashfs.

    mkdir extracted-root
    chmod 755 extracted-root
    sudo unsquashfs -f -d extracted-root iso_mnt/live/filesystem.squashfs
    

    Some warnings may appear during unsquashfs execution in WSL. These are expected and can be safely ignored, as WSL does not support device node creation and certain filesystem attributes.

  7. Verify that the extracted root filesystem contains a shell.

    Ensure that extracted-root contains at least one of the following.

    ls extracted-root/bin/sh
    ls extracted-root/bin/bash
    ls extracted-root/bin/busybox
    

    If any of these files exist, proceed with the next step. If none of these files exist, you must chroot into the filesystem, install a shell, and then continue.

  8. Create a tarball of the root filesystem.

    cd extracted-root
    sudo tar -cf ../rootfs.tar .
    

Windows Shell Steps

Run the following commands from a Windows Command Prompt or PowerShell window, not from the WSL terminal.

  1. Create directories on the Windows system.

    mkdir C:\WSL\elxredge
    mkdir C:\Users\<your-username>\work\iso
    
  2. Copy the rootfs.tar file from Ubuntu to Windows.

    cp ../rootfs.tar /mnt/c/Users/<your-username>/work/iso/
    
  3. Import the distribution into WSL.

    wsl --import elxredge C:\WSL\elxredge C:\Users\<your-username>\work\iso\rootfs.tar
    
  4. Verify that the distribution was imported successfully.

    wsl -l -v
    
    ../../_images/list_of_available_distros.png
  5. (Optional) Set eLxr as the default Linux distribution.

    wsl --set-default elxredge
    
  6. If you set eLxr as the default Linux distribution, start it using:

    wsl
    

    Otherwise, start it explicitly using:

    wsl -d elxredge
    

    When launching eLxr in WSL, you may see a message indicating that no screen session named tiler-installer exists. This is expected because WSL does not support installer-style boot workflows. The message can be safely ignored.

Results

All available WSL distributions are listed, and eLxr appears as the default Linux distribution if the optional default configuration step was performed.