DriveStage/gui
Jeremy Anderson af0516ade5 A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00
..
assets A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00
src A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00
Cargo.lock A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00
Cargo.toml A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00
README.md A Linux-native toolkit for building multi-payload USB drives. Clean ext4 + GRUB2 architecture, boot-time auto-discovery, and an optional Rust GUI. Inspired by Easy2Boot and RMPrepUSB; built from scratch for the modern Linux era. 2026-08-29 09:37:13 -04:00

README.md

drivestage-gui

A native Rust + Iced desktop application for building DriveStage drives on Linux. Inspired by Easy2Boot and RMPrepUSB. Built from scratch for the ext4/UEFI era.

Author: Jeremy Anderson info@dcos.net — dcos.net

A native Rust + Iced desktop application that wraps the bundled blkstage.sh bash script with a dark-tech-utility UI. Designed for sysadmins, distro-hoppers, and rescue-stick builders who want a Linux-native visual interface for DriveStage provisioning.

Features

  • Drive setup wizard — select a removable disk, configure ESP size and labels, install GRUB2, with live progress streaming
  • Payload manager — drag-and-drop ISOs and tarballs, view sizes, delete, eject (GRUB auto-discovers at boot)
  • Bootloader switcher — install GRUB2, systemd-boot, Limine, or rEFInd per-drive
  • Custom menuentry editor — edit /boot/grub/custom.cfg with a monospace editor
  • Drive diagnostics — SMART attributes, partition table dump, filesystem UUID and label browser
  • Dark tech utility theme — btop/htop-inspired palette, monospace accents, dense information display
  • sudo authentication — password cached in-memory for the session; never written to disk

Architecture

Hybrid design. Rust core for disk discovery, UI state, and async orchestration. Bash delegation for GRUB install and tarball extraction via the bundled blkstage.sh.

src/
├── main.rs                  # Bootstrap, iced::Application entry
├── app.rs                   # Top-level state, Message enum, update/view
├── theme.rs                 # Dark tech utility color palette
├── core/
│   ├── mod.rs               # Re-exports
│   ├── error.rs             # AppError enum (thiserror)
│   ├── sudo.rs              # sudo wrapper with stdout streaming
│   ├── disk.rs              # lsblk -J parsing, drive detection, SMART
│   ├── bootloader.rs        # GRUB2/systemd-boot/Limine/rEFInd dispatch
│   ├── payload.rs           # Deploy/scan/list payloads
│   └── script.rs            # Resolve bundled blkstage.sh path
├── ui/
│   ├── mod.rs               # Re-exports + Effect type alias
│   ├── setup.rs             # Drive setup wizard page
│   ├── payload.rs           # Payload manager page
│   ├── bootloader.rs        # Bootloader switcher page
│   ├── menu_editor.rs       # Custom menuentry editor
│   ├── diagnostics.rs       # Drive diagnostics page
│   └── widgets.rs           # Custom button style sheet helpers
└── assets/
    └── blkstage.sh     # Bundled bash script (the engine)

Build

Requires Rust 1.75+ and system dependencies for the bash script.

System dependencies

Debian / Ubuntu

sudo apt install parted dosfstools e2fsprogs grub-pc-bin grub-efi-amd64-bin \
    util-linux rsync tar smartmontools

Fedora

sudo dnf install parted dosfstools e2fsprogs grub2-pc grub2-efi-x64 grub2-tools grub2-common \
    util-linux rsync tar smartmontools

Arch Linux

sudo pacman -S parted dosfstools e2fsprogs grub efibootmgr \
    util-linux rsync tar smartmontools

Build the GUI

cargo build --release
# Binary: target/release/drivestage-gui

Install

From source

cargo install --path .

Or from git:

cargo install --git https://git.dcos.net/dcosnet/DriveStage

The binary locates blkstage.sh by searching the following paths in order:

  1. $DRIVESTAGE_SH environment variable
  2. ./assets/blkstage.sh (development mode)
  3. ~/.local/share/drivestage/blkstage.sh (cargo install layout)
  4. /usr/lib/drivestage/blkstage.sh or /usr/local/lib/drivestage/blkstage.sh

For cargo install, copy the script to the data directory:

mkdir -p ~/.local/share/drivestage/
cp assets/blkstage.sh ~/.local/share/drivestage/

Usage

# Launch the GUI (prompts for sudo password when required)
drivestage-gui

Workflow:

  1. Click Authenticate to enter your sudo password (cached for the session)
  2. Open the Setup tab, select a removable disk, configure options, type the device name to confirm
  3. Click PROVISION DRIVE — the script partitions, formats, and installs GRUB2
  4. Open the Payloads tab, click Add files... or drag-and-drop ISOs
  5. Eject the USB and boot — GRUB auto-discovers payloads

Bootloader support

Bootloader BIOS UEFI Installer binary
GRUB2 Yes Yes grub-install
systemd-boot No Yes bootctl
Limine Yes Yes limine
rEFInd No Yes refind-install

GRUB2 is the default and matches the bash script's dual-target install. The remaining bootloaders install via their respective binaries.

Theme — Dark Tech Utility

Inspired by btop, htop, and the Tokyo Night palette:

Token Hex Use
BG_DEEP #121318 App background
BG_SURFACE #1a1d24 Cards, panels
BG_ELEVATED #222633 Inputs, hover
ACCENT #4dbcd9 Primary actions
OK #6bcc7d Success
WARN #f2bf4d Warnings
DANGER #ed616b Destructive actions
FG_BRIGHT #edeef0 Primary text
FG_MUTED #9ea8bc Secondary text
FG_DIM #6b7588 Tertiary text

All UI text uses Font::MONOSPACE for the sysadmin-tool aesthetic.

License

MIT — see ../LICENSE.

Attribution

Inspired by Easy2Boot and RMPrepUSB by Steve Si. Independent implementation; no derived code.