Your Name dc7af63e6b FAQ
2025-08-16 17:43:19 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
FAQ
2025-08-16 17:43:19 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00
2025-08-16 16:24:12 -04:00

n-OS-tr

n-OS-tr is an attempt to create a nostr based operating system / distro.

We are starting with a base of debian live.

Currently exploring different means to this end.

Debian Live Build Setup and Tutorial 1 Implementation

This document covers the complete process of setting up live-build and implementing Tutorial 1 from the Debian Live Manual.

System Requirements

Tested on Pop!_OS 22.04 LTS (Ubuntu-based system).

Phase 1: Installing Dependencies

The following packages are required for building Debian Live images:

sudo apt update
sudo apt install debootstrap xorriso squashfs-tools syslinux-utils cpio gzip gettext

Package purposes:

  • debootstrap: Creates minimal Debian base system
  • xorriso: Creates ISO images
  • squashfs-tools: Creates compressed filesystem
  • syslinux-utils: Boot loader utilities
  • cpio, gzip, gettext: Archive and localization utilities

Phase 2: Setting up Live-Build from Repository

Instead of installing live-build via system packages (which may be outdated), we use the repository directly for the most current version.

Creating the Wrapper Script

Create lb-wrapper.sh for convenient access to live-build commands:

#!/bin/bash

# Set the LIVE_BUILD environment variable to point to our repository
export LIVE_BUILD="$(dirname "$0")/live-build"

# Execute the live-build frontend with all arguments passed through
"$LIVE_BUILD/frontend/lb" "$@"

Make it executable:

chmod +x lb-wrapper.sh

Usage: Replace all lb commands with ./lb-wrapper.sh to use the repository version.

Phase 3: Tutorial 1 - Default Image Creation

Following the Debian Live Manual Tutorial 1 to create a basic live system:

mkdir tutorial1
cd tutorial1
../lb-wrapper.sh config

This creates the basic configuration structure in the config/ directory.

Phase 4: Building the Image

Important: Due to keyring compatibility issues between Ubuntu/Pop!_OS and Debian, we need to bypass GPG verification for development builds.

Build the image as root with security bypass:

sudo ../lb-wrapper.sh config --apt-secure false --distribution stable
sudo ../lb-wrapper.sh build 2>&1 | tee build.log

Keyring Issues and Troubleshooting

Problem: Pop!_OS/Ubuntu keyrings are incompatible with both Debian testing and stable distributions, causing GPG verification failures.

Error examples:

  • Debian testing: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 78DBA3BC47EF2265
  • Debian stable: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 762F67A0B2C39DE4

Solution: Use --apt-secure false flag to bypass GPG verification for development purposes.

Production note: For production builds, proper keyring setup should be implemented instead of disabling security checks.

Expected Results

  • Build time: Varies based on internet connection and system performance
  • Output file: live-image-amd64.hybrid.iso (approximately 298MB)
  • This ISO can be:
    • Tested in virtual machines (QEMU, VirtualBox)
    • Written to USB drives
    • Burned to optical media

Command Summary

Complete sequence for Tutorial 1:

# 1. Install dependencies
sudo apt install debootstrap xorriso squashfs-tools syslinux-utils cpio gzip gettext

# 2. Create wrapper script (if not exists)
# [Create lb-wrapper.sh as shown above]
chmod +x lb-wrapper.sh

# 3. Create and configure tutorial
mkdir tutorial1
cd tutorial1
../lb-wrapper.sh config --apt-secure false --distribution stable

# 4. Build image
sudo ../lb-wrapper.sh build 2>&1 | tee build.log

# 5. Result: live-image-amd64.hybrid.iso ready for testing

Notes

  • The --distribution stable ensures we use Debian stable instead of the default testing
  • Build logs are automatically saved due to the wrapper script configuration
  • The --apt-secure false flag is a workaround for keyring issues on Ubuntu-based systems
  • For clean rebuilds, use sudo ../lb-wrapper.sh clean before building again

FAQ

Q: What are the auto, config, and local directories created by lb config for?

A: When you run lb config, three directories are created:

  1. auto/ - Created but empty by default

    • Used for optional automation scripts that you create yourself
    • You can add auto/config, auto/build, auto/clean scripts that run automatically before their respective lb commands
    • Most basic builds (like Tutorial 1) don't need these files
    • Useful for advanced scenarios where you want reproducible builds with version control
  2. config/ - This is where the real configuration lives

    • Contains all the subdirectories for customizing your live system
    • Has the main config files (binary, bootstrap, chroot, common, source) with your build parameters
    • This is where you add package lists, custom files, hooks, etc.
    • Most important directory for customization
  3. local/ - For local customizations

    • Also typically empty unless you have custom executables or files to include
    • Used for build-time scripts and tools, not files to include in the final system

Q: How do I add files to specific locations in the final live system?

A: Several directories in the config structure map directly to the final system filesystem:

For files you want in the final live system:

  1. config/includes.chroot/ - Maps directly to the root filesystem (/)

    • To put a file in /usr/local/bin/myscript in the final system
    • Place it at config/includes.chroot/usr/local/bin/myscript
    • Everything in this directory gets copied to / in the live system
  2. config/includes.chroot_after_packages/ - Same mapping, but copied after packages are installed

    • Use when you want to overwrite files that packages might have installed
    • Same directory mapping as above
  3. config/includes.chroot_before_packages/ - Copied before packages are installed

    • Less commonly used, but available if needed

For files you want on the ISO/boot media itself (not in the live system):

  1. config/includes.binary/ - Files that go on the boot media
    • These appear on the USB/CD itself, not inside the running live system
    • Useful for documentation, additional tools, etc.

Example: To put a custom script in /usr/local/bin/hello in your live system:

# 1. Create the directory structure
mkdir -p config/includes.chroot/usr/local/bin/

# 2. Put your script there
cp myscript config/includes.chroot/usr/local/bin/hello

# 3. Make it executable
chmod +x config/includes.chroot/usr/local/bin/hello

The build process will automatically copy it to the correct location in the live system.

Q: How would I add a splash screen that would come up upon booting?

A: There are several methods to add splash screens to your Debian Live system, depending on when and how you want the splash to appear:

Method 1: Boot Loader Splash (Easiest - SYSLINUX)

For a simple graphical background during boot menu selection:

1. Prepare your splash image:

# Create the bootloader directory
mkdir -p config/bootloaders/syslinux

# Your image should be:
# - PNG or JPEG format
# - 640x480 resolution (for best compatibility)
# - Named something like splash.png
cp your-splash-image.png config/bootloaders/syslinux/splash.png

2. Create custom syslinux configuration:

# Copy the default syslinux config to customize
cp live-build/share/bootloaders/syslinux/* config/bootloaders/syslinux/

# Edit config/bootloaders/syslinux/syslinux.cfg
# Add this line after the first line:
# MENU BACKGROUND splash.png

Method 2: Plymouth Boot Splash (Advanced - Animated)

For professional animated boot screens like Ubuntu's spinning logo:

1. Add Plymouth to your package list:

echo "plymouth plymouth-themes" >> config/package-lists/splash.list.chroot

2. Configure Plymouth theme:

# Create Plymouth configuration directory
mkdir -p config/includes.chroot/etc/plymouth

# Set the default theme (example: solar theme)
echo "[Daemon]" > config/includes.chroot/etc/plymouth/plymouthd.conf
echo "Theme=solar" >> config/includes.chroot/etc/plymouth/plymouthd.conf

3. Enable Plymouth in boot parameters:

# When running lb config, add:
../lb-wrapper.sh config --bootappend-live "boot=live components splash quiet"

Method 3: GRUB Graphical Splash (For EFI systems)

For systems using GRUB (EFI boot):

1. Create GRUB bootloader directory:

mkdir -p config/bootloaders/grub-pc

2. Add custom GRUB background:

# Copy your background image (PNG, JPG, or TGA format)
# Recommended size: 1024x768 or your target resolution
cp your-background.png config/includes.binary/boot/grub/background.png

3. Create custom GRUB configuration:

# Create config/bootloaders/grub-pc/grub.cfg with:
cat > config/bootloaders/grub-pc/grub.cfg << 'EOF'
if background_image /boot/grub/background.png; then
  set color_normal=white/black
  set color_highlight=black/light-gray
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
EOF

Method 4: Desktop Splash Screen

For splash screens that appear when the desktop environment starts:

1. Add to package list (example with LXDE):

echo "lxsplash" >> config/package-lists/desktop.list.chroot

2. Configure desktop splash:

# Create desktop configuration directory
mkdir -p config/includes.chroot/etc/xdg/lxsession/LXDE

# Configure lxsession to show splash
echo "lxsplash -s" > config/includes.chroot/etc/xdg/lxsession/LXDE/autostart

Quick Start Recommendation

For beginners: Start with Method 1 (SYSLINUX background) - it's simple and works reliably.

Example complete setup:

# 1. Create bootloader directory and add image
mkdir -p config/bootloaders/syslinux
cp ~/my-logo.png config/bootloaders/syslinux/splash.png

# 2. Copy default syslinux files to customize
cp -r live-build/share/bootloaders/syslinux/* config/bootloaders/syslinux/

# 3. Edit the main config file
sed -i '2i MENU BACKGROUND splash.png' config/bootloaders/syslinux/syslinux.cfg

# 4. Build with your custom splash
sudo ../lb-wrapper.sh build

Notes:

  • Image formats: PNG works best for syslinux, JPG for GRUB
  • Keep images reasonably sized to avoid slowing boot time
  • Test your splash screen in a virtual machine first
  • For production systems, ensure images are properly licensed

Q: What are the main options for adding a GUI? How do I add them?

A: Debian Live supports several GUI options, from lightweight window managers to full desktop environments. Here are the main options and how to implement them:

Lightweight Window Managers (Minimal Resource Usage)

1. Openbox (Very Light)

echo "openbox obconf obmenu tint2 pcmanfm lxappearance" >> config/package-lists/gui.list.chroot

Features: Basic window manager, highly customizable, ~50MB additional space Best for: Minimal systems, older hardware, custom interfaces

2. i3 (Tiling Window Manager)

echo "i3 i3status dmenu i3lock" >> config/package-lists/gui.list.chroot

Features: Tiling window manager, keyboard-driven, very efficient Best for: Power users, developers, keyboard-focused workflows

3. Fluxbox

echo "fluxbox fbpanel pcmanfm" >> config/package-lists/gui.list.chroot

Features: Fast, simple, tabbed windows Best for: Minimal desktop needs, simple interfaces

4. LXDE (Lightweight Desktop Environment)

echo "task-lxde-desktop" >> config/package-lists/gui.list.chroot

Features: Complete desktop with panel, file manager, settings Size: ~400MB additional Best for: Beginner-friendly, low resource usage, complete desktop experience

5. Xfce (Moderate Resource Usage)

echo "task-xfce-desktop" >> config/package-lists/gui.list.chroot

Features: Full-featured, customizable, good performance Size: ~600MB additional Best for: Balance between features and performance

echo "task-gnome-desktop" >> config/package-lists/gui.list.chroot

Features: Modern interface, many applications, polished experience Size: ~1.5GB additional Best for: Modern desktop experience, touch interfaces, latest features

echo "task-kde-desktop" >> config/package-lists/gui.list.chroot

Features: Highly customizable, many applications, modern interface Size: ~1.2GB additional Best for: Power users who want customization and modern features

Quick Setup Examples

Example 1: Minimal GUI System (LXDE + Firefox)

# Create tutorial directory
mkdir tutorial-gui
cd tutorial-gui

# Configure with GUI
../lb-wrapper.sh config --apt-secure false --distribution stable

# Add desktop and browser
echo "task-lxde-desktop firefox-esr" >> config/package-lists/desktop.list.chroot

# Optional: Add useful applications
echo "synaptic gdebi leafpad galculator" >> config/package-lists/apps.list.chroot

# Build
sudo ../lb-wrapper.sh build

Example 2: Kiosk System (Single Application)

# Minimal X11 setup for single application
echo "xorg gdm3 openbox firefox-esr" >> config/package-lists/kiosk.list.chroot

# Auto-start Firefox in kiosk mode
mkdir -p config/includes.chroot/etc/skel
cat > config/includes.chroot/etc/skel/.xsession << 'EOF'
#!/bin/sh
openbox &
firefox --kiosk https://example.com
EOF

Example 3: Developer Workstation

# Add Xfce desktop with development tools
echo "task-xfce-desktop" >> config/package-lists/desktop.list.chroot
echo "code git build-essential python3 nodejs npm" >> config/package-lists/dev.list.chroot
echo "terminator vim emacs" >> config/package-lists/editors.list.chroot

GUI Components Explanation

Essential X11 Components (Required for any GUI)

# Always needed for graphical interface
echo "xorg" >> config/package-lists/x11.list.chroot

Display Managers (Login Screen)

# Lightweight
echo "lightdm" >> config/package-lists/dm.list.chroot

# GNOME/modern
echo "gdm3" >> config/package-lists/dm.list.chroot

# Simple
echo "slim" >> config/package-lists/dm.list.chroot

Common Applications by Category

# File managers
echo "pcmanfm nautilus thunar" >> config/package-lists/filemanagers.list.chroot

# Text editors
echo "gedit mousepad kate" >> config/package-lists/editors.list.chroot

# Web browsers
echo "firefox-esr chromium" >> config/package-lists/browsers.list.chroot

# Media players
echo "vlc mpv rhythmbox" >> config/package-lists/media.list.chroot

# Graphics
echo "gimp inkscape" >> config/package-lists/graphics.list.chroot

Resource Usage Comparison

Desktop Environment RAM Usage Disk Space Boot Time Complexity
Openbox alone ~100MB ~50MB Fast Simple
LXDE ~200MB ~400MB Fast Easy
Xfce ~300MB ~600MB Medium Medium
GNOME ~800MB ~1.5GB Slow Complex
KDE Plasma ~600MB ~1.2GB Medium Complex

Advanced GUI Configuration

Custom Desktop Theme

# Create theme directory
mkdir -p config/includes.chroot/usr/share/themes/MyTheme

# Add custom wallpaper
mkdir -p config/includes.chroot/usr/share/pixmaps
cp my-wallpaper.jpg config/includes.chroot/usr/share/pixmaps/

# Set default wallpaper for LXDE
mkdir -p config/includes.chroot/etc/xdg/pcmanfm/LXDE
cat > config/includes.chroot/etc/xdg/pcmanfm/LXDE/desktop-items-0.conf << 'EOF'
[*]
wallpaper_mode=stretch
wallpaper_common=1
wallpaper=/usr/share/pixmaps/my-wallpaper.jpg
EOF

Auto-login Configuration

# For LXDE with automatic login
mkdir -p config/includes.chroot/etc/lightdm
cat > config/includes.chroot/etc/lightdm/lightdm.conf << 'EOF'
[Seat:*]
autologin-user=user
autologin-user-timeout=0
EOF

Recommendation Guide

For new users: Start with LXDE (task-lxde-desktop)

  • Easy to use
  • Good performance
  • Includes essential applications
  • Well documented

For minimal systems: Use Openbox + essential apps

  • Very low resource usage
  • Fast boot times
  • Customizable

For modern experience: Choose Xfce or GNOME

  • Modern interface
  • Good hardware support
  • Regular updates

For specific use cases: Custom combinations

  • Kiosk systems: Openbox + single application
  • Developer workstations: Xfce + development tools
  • Media centers: Minimal WM + media applications

FAQ: How do I look up applications on my current system to get package names for config/package-lists?

Q: I want to include applications I currently use in my live system. How do I find the exact package names to add to my config/package-lists files?

A: There are several methods to discover package names from installed applications. Here are the most effective approaches:

Method 1: List All Installed Packages

Using dpkg (Debian Package Manager)

# List all installed packages with descriptions
dpkg -l | grep -i "search-term"

# Examples:
dpkg -l | grep -i firefox          # Find Firefox packages
dpkg -l | grep -i editor           # Find text editors
dpkg -l | grep -i media            # Find media applications

Using apt

# List all manually installed packages
apt list --installed | grep -i "search-term"

# Show only manually installed (not dependencies)
apt-mark showmanual | grep -i "search-term"

# Examples:
apt list --installed | grep -i gimp
apt-mark showmanual | grep -i code

Method 2: Find Package for Specific Application

Using which and dpkg

# Find which package provides a specific command
which firefox
dpkg -S $(which firefox)

# Or in one command:
dpkg -S $(which firefox) | cut -d: -f1

# Examples:
dpkg -S $(which code)              # Find VS Code package
dpkg -S $(which vlc)               # Find VLC package
dpkg -S $(which gimp)              # Find GIMP package

Using apt-file (if installed)

# First install and update apt-file
sudo apt install apt-file
sudo apt-file update

# Find package containing a file
apt-file search /usr/bin/firefox
apt-file search gimp

# Find package containing any file with name
apt-file search -x '/usr/bin/.*firefox.*'

Method 3: Application-Specific Discovery

Desktop Applications (.desktop files)

# List all desktop applications
ls /usr/share/applications/*.desktop | while read app; do
    name=$(basename "$app" .desktop)
    echo "Desktop entry: $name"
    # Find which package provides this .desktop file
    dpkg -S "$app" 2>/dev/null | cut -d: -f1
done

GUI Application Discovery

# Find packages by searching application menu names
dpkg -l | awk '/^ii/{print $2}' | while read pkg; do
    if dpkg -L "$pkg" 2>/dev/null | grep -q "/usr/share/applications/"; then
        echo "Package with GUI: $pkg"
    fi
done

Method 4: Category-Based Package Discovery

By Package Sections

# Find packages by category
dpkg-query -W -f='${Package} ${Section}\n' | grep -E "(graphics|video|audio|editors|web|games)" | sort

# Specific categories:
dpkg-query -W -f='${Package} ${Section}\n' | grep graphics
dpkg-query -W -f='${Package} ${Section}\n' | grep editors
dpkg-query -W -f='${Package} ${Section}\n' | grep web

By Description Content

# Search package descriptions for keywords
apt-cache search "text editor" | head -10
apt-cache search "media player" | head -10
apt-cache search "graphics" | head -10
apt-cache search "development" | head -10

Method 5: Practical Examples

Common Applications and Their Package Names

Web Browsers:

# What you see → Package name
Firefox         → firefox-esr
Google Chrome   → google-chrome-stable (requires external repository)
Chromium        → chromium

Text Editors:

VS Code         → code (requires external repository)
Sublime Text    → sublime-text (requires external repository)
Vim             → vim
Emacs           → emacs
Nano            → nano
Gedit           → gedit

Media Applications:

VLC             → vlc
GIMP            → gimp
Inkscape        → inkscape
Audacity        → audacity
OBS Studio      → obs-studio

Development Tools:

Git             → git
Node.js         → nodejs
Python          → python3
Docker          → docker.io

Method 6: Generate Package List from Current System

Create Complete Package List

# Generate a list of all manually installed packages
apt-mark showmanual > my-current-packages.txt

# Clean up the list (remove system packages you don't want)
# Then use in your live-build:
cp my-current-packages.txt config/package-lists/current-system.list.chroot

Create Filtered Package List

# Create list excluding system packages
apt-mark showmanual | grep -v -E "^(linux-|grub-|systemd|udev|apt|dpkg)" > config/package-lists/applications.list.chroot

Method 7: Interactive Package Discovery

Using Synaptic Package Manager

# Install Synaptic for GUI package browsing
sudo apt install synaptic

# Launch Synaptic, browse categories, note package names
# Then add them to your package lists

Using aptitude (Text UI)

# Install aptitude for interactive package management
sudo apt install aptitude

# Launch aptitude, browse packages interactively
aptitude

Practical Workflow Example

Step-by-step: Adding Your Current Applications

1. Find your most used applications:

# Check command history for frequently used applications
history | grep -E "^[0-9]+ (firefox|code|gimp|vlc)" | head -20

# Check recent application launches
ls -la ~/.local/share/recently-used.xbel 2>/dev/null

2. Convert applications to package names:

# Create a discovery script
cat > find-packages.sh << 'EOF'
#!/bin/bash
apps=("firefox" "code" "gimp" "vlc" "thunderbird")
for app in "${apps[@]}"; do
    echo "=== $app ==="
    which "$app" 2>/dev/null && dpkg -S $(which "$app") | cut -d: -f1
    echo
done
EOF

chmod +x find-packages.sh
./find-packages.sh

3. Create your package list:

# Based on discoveries, create your package list
cat > config/package-lists/my-apps.list.chroot << 'EOF'
# Web and Communication
firefox-esr
thunderbird

# Development
code
git
nodejs
python3

# Graphics and Media  
gimp
vlc
inkscape

# Utilities
vim
htop
tree
curl
EOF

Tips and Best Practices

Package Name Variations:

  • Some applications have different names in Debian repositories
  • Use apt search application-name to find alternatives
  • Check both the main package and -dev packages if you need development files

Metapackages vs Individual Packages:

  • task-* packages install complete desktop environments
  • Individual packages give more control over what's installed
  • You can mix both approaches in different .list.chroot files

External Repositories:

  • Some applications (VS Code, Chrome) require external repositories
  • Consider using alternative packages available in Debian repos (Chromium instead of Chrome)
  • Document external repository requirements separately

Testing Package Lists:

  • Test your package lists in a virtual machine before final build
  • Use apt-cache policy package-name to verify package availability
  • Check package dependencies with apt-cache depends package-name

Q: This is live-build, so it runs in memory. Can you also install it to disk if you want?

A: Yes! Debian Live systems are designed to run both ways - as temporary live systems in memory AND as permanent installations to disk. Here are your options:

Live vs Installed - The Difference

Live Mode (Default):

  • Runs entirely from USB/CD/DVD in RAM
  • No changes are saved (unless using persistence - see below)
  • Perfect for testing, troubleshooting, portable computing
  • No installation required - boot and go

Installed Mode:

  • Permanently installed to hard disk like any other OS
  • All changes saved normally
  • Full desktop OS experience
  • Can dual-boot with other operating systems

Installation Methods

Add the installer to your live build configuration:

# When configuring your build, enable the installer
../lb-wrapper.sh config --debian-installer live --apt-secure false --distribution stable

# Add installer launcher to desktop
echo "debian-installer-launcher" >> config/package-lists/installer.list.chroot

What this gives you:

  • A "Install Debian" icon on the desktop
  • Full graphical installer interface
  • Can install your customized system with all your packages
  • Preserves all customizations during installation

Method 2: Text-based Installer

For a more advanced installer interface:

# Add text installer to config
../lb-wrapper.sh config --debian-installer true --apt-secure false --distribution stable

Features:

  • Professional text-based installer (like server installs)
  • More installation options and control
  • Network-based installation capabilities
  • Advanced partitioning options

Method 3: Live-Installer (Simpler)

For a quick "clone live system to disk" approach:

# Add live-installer package
echo "live-installer" >> config/package-lists/installer.list.chroot

How it works:

  • Copies the current live system exactly to disk
  • Simpler but less flexible than debian-installer
  • Good for kiosk or specialized systems

Persistence (Hybrid Approach)

You can also use persistence to save changes while staying in live mode:

Create Persistent USB

# Create persistence partition on USB after writing ISO
# (This example assumes USB device is /dev/sdb - VERIFY YOUR DEVICE!)

# 1. Write ISO to USB first
sudo dd if=live-image-amd64.hybrid.iso of=/dev/sdb bs=4M status=progress

# 2. Create additional partition for persistence
sudo fdisk /dev/sdb
# Create new partition using remaining space

# 3. Format persistence partition
sudo mkfs.ext4 -L persistence /dev/sdb2

# 4. Mount and create persistence.conf
sudo mkdir -p /mnt/persistence
sudo mount /dev/sdb2 /mnt/persistence
echo "/ union" | sudo tee /mnt/persistence/persistence.conf
sudo umount /mnt/persistence

Enable Persistence at Boot

Boot with persistence enabled:

# Add to boot parameters
boot=live components persistence

Complete Installation Example

Here's how to create a live system that can be easily installed:

mkdir installable-system
cd installable-system

# Configure with installer included
../lb-wrapper.sh config \
    --debian-installer live \
    --apt-secure false \
    --distribution stable \
    --bootappend-live "boot=live components"

# Add your desktop environment
echo "task-lxde-desktop" >> config/package-lists/desktop.list.chroot

# Add installer launcher for easy desktop installation
echo "debian-installer-launcher" >> config/package-lists/installer.list.chroot

# Add your applications
echo "firefox-esr vlc gimp git" >> config/package-lists/apps.list.chroot

# Build
sudo ../lb-wrapper.sh build

Installation Process (User Experience)

Live Mode:

  1. Boot from USB/DVD
  2. System runs in memory
  3. Desktop appears with all your customizations
  4. "Install Debian" icon appears on desktop (if debian-installer-launcher included)

Installing to Disk:

  1. Click "Install Debian" icon or run installer from menu
  2. Graphical installer launches
  3. Choose installation target (disk/partition)
  4. All your custom packages and configurations are installed
  5. Reboot to permanent system with all your customizations

Use Cases

Live-only scenarios:

  • Public computers/internet cafes
  • System rescue and repair
  • Software demonstration
  • Portable personal desktop
  • Security-focused computing (no traces left)

Install-to-disk scenarios:

  • Custom corporate desktop rollouts
  • Specialized workstations
  • Personal daily-use systems
  • Educational lab systems
  • Development environments

Key Benefits of This Approach

  1. Try Before Install: Test your custom system thoroughly before committing to disk
  2. Portable Development: Same environment everywhere - USB stick becomes your entire desktop
  3. Easy Deployment: Build once, deploy to multiple machines via installation
  4. Recovery System: Always have a bootable rescue system with your tools
  5. Customization Preservation: All your tweaks, themes, and applications carry over to installed system

The beauty of Debian Live is this flexibility - you get both the convenience of a live system for testing/portability AND the option to install it permanently when you're ready!

FAQ: System Minimization - How Small Can You Go?

Q: When I ran my minimal install, and I got into the system, I see that there were apps installed such as 'ls'. Is it optional to remove those? How small an install can you go?

A: System minimization in Debian Live is possible, but there are important limitations. Core utilities like ls are part of essential packages that cannot be safely removed. Here's a comprehensive guide to minimization:

Understanding Essential vs Optional Packages

Essential Packages (Cannot Remove):

  • coreutils (includes ls, cp, mv, cat, mkdir, etc.)
  • bash (shell interpreter)
  • init systems (systemd or equivalent)
  • libc6 (core C library)
  • dpkg (package manager)

Why ls Cannot Be Removed:

# Check if ls is part of an essential package
dpkg -S $(which ls)
# Output: coreutils: /bin/ls

# Check if coreutils is essential
dpkg -s coreutils | grep Essential
# Output: Essential: yes

Essential packages are marked as such because removing them would break the system fundamentally.

Minimization Strategies

Use the most minimal bootstrap variant:

# Ultra-minimal configuration
../lb-wrapper.sh config \
    --apt-secure false \
    --distribution stable \
    --debootstrap-options "--variant=minbase" \
    --apt-recommends false \
    --apt-indices false \
    --firmware-chroot false \
    --memtest none \
    --binary-image hdd

# Re-add only absolutely necessary packages
echo "user-setup sudo" > config/package-lists/essential.list.chroot

# For network access (if needed)
echo "ifupdown isc-dhcp-client" >> config/package-lists/essential.list.chroot

Results: ~298MB system (compared to ~380MB default)

# Disable automatic installation of recommended packages
../lb-wrapper.sh config --apt-recommends false

# Then manually add back only what you actually need
echo "live-tools eject" > config/package-lists/minimal-live.list.chroot

Strategy 3: Custom Package Exclusions

Create hooks to remove specific non-essential packages:

# Create removal hook
mkdir -p config/hooks/normal
cat > config/hooks/normal/0010-remove-optional.hook.chroot << 'EOF'
#!/bin/bash

# Remove documentation to save space
rm -rf /usr/share/doc/*
rm -rf /usr/share/man/*
rm -rf /usr/share/info/*

# Remove locale data except for English
find /usr/share/locale -mindepth 1 -maxdepth 1 -type d ! -name 'en*' -exec rm -rf {} \;

# Remove cached package files
apt-get clean
EOF

Warning: This violates package integrity and may cause issues.

What Can Actually Be Removed

Safe to Remove (Non-Essential):

# Example of packages you can safely remove/avoid
echo "# Avoid these in minimal builds" > config/package-lists/avoid.list.chroot
echo "# nano          # text editor (use vi instead)" >> config/package-lists/avoid.list.chroot
echo "# wget          # download utility (use curl)" >> config/package-lists/avoid.list.chroot
echo "# less          # pager (use more)" >> config/package-lists/avoid.list.chroot
echo "# info          # info documentation system" >> config/package-lists/avoid.list.chroot

Never Remove (System Will Break):

  • coreutils (ls, cp, mv, cat, chmod, etc.)
  • bash or another shell
  • init system (systemd, sysvinit)
  • mount utilities
  • basic device drivers
  • kernel and modules

Practical Minimization Examples

Ultra-Minimal Console System

mkdir minimal-console
cd minimal-console

# Minimal console-only configuration
../lb-wrapper.sh config \
    --debootstrap-options "--variant=minbase" \
    --apt-recommends false \
    --apt-indices false \
    --firmware-chroot false \
    --memtest none \
    --bootappend-live "boot=live components noautologin" \
    --binary-image hdd

# Add only essential packages
cat > config/package-lists/minimal.list.chroot << 'EOF'
user-setup
sudo
ifupdown
isc-dhcp-client
vim-tiny
EOF

# Build ultra-minimal system
sudo ../lb-wrapper.sh build

Expected size: ~250-280MB

Minimal GUI System

mkdir minimal-gui
cd minimal-gui

# Minimal GUI configuration
../lb-wrapper.sh config \
    --debootstrap-options "--variant=minbase" \
    --apt-recommends false \
    --apt-indices false \
    --firmware-chroot false \
    --memtest none

# Minimal X11 setup
cat > config/package-lists/minimal-gui.list.chroot << 'EOF'
user-setup
sudo
xorg
openbox
pcmanfm
lxterminal
firefox-esr
EOF

# Network support
echo "ifupdown isc-dhcp-client wireless-tools wpasupplicant" >> config/package-lists/network.list.chroot

Expected size: ~400-500MB

Size Comparison Table

Configuration Type Size Boot Time Functionality
Default Tutorial 1 ~380MB Medium Basic console + live tools
Minimal (minbase) ~280MB Fast Essential console only
Ultra-minimal hook ~250MB Very fast Bare minimum (risky)
Minimal GUI ~450MB Medium Basic graphical interface
Full LXDE ~800MB Slow Complete desktop

Advanced Minimization Techniques

Using Alternative Core Utilities

Replace some utilities with smaller alternatives:

# Use busybox for some utilities (saves space)
echo "busybox-static" >> config/package-lists/alternatives.list.chroot

# Create hook to replace some standard utilities with busybox
cat > config/hooks/normal/0020-busybox-alternatives.hook.chroot << 'EOF'
#!/bin/bash
# Replace some utilities with busybox versions
# (Only do this if you understand the implications)
for util in vi less; do
    if [ -f /bin/busybox ]; then
        update-alternatives --install /usr/bin/$util $util /bin/busybox 50
    fi
done
EOF

Locale Minimization

# Build with single locale only
../lb-wrapper.sh config --bootappend-live "boot=live components locales=en_US.UTF-8"

# Remove extra locales via hook
cat > config/hooks/normal/0030-locale-cleanup.hook.chroot << 'EOF'
#!/bin/bash
# Keep only English locales
find /usr/share/locale -mindepth 1 -maxdepth 1 -type d ! -name 'en*' -delete
find /usr/share/i18n/locales -mindepth 1 -maxdepth 1 -type f ! -name 'en_*' -delete
EOF

The Bottom Line: Practical Limits

Theoretical minimum: ~180-200MB (unstable, breaks functionality) Practical minimum: ~250-280MB (stable, console-only) Recommended minimum: ~350-400MB (includes basic GUI capability)

Why You Can't Remove Core Utilities

System Dependencies:

# Check what depends on coreutils
apt-cache rdepends coreutils | head -20
# Shows hundreds of packages depend on basic utilities

# Check essential status
dpkg-query -Wf='${Package} ${Essential}\n' | grep yes
# Shows all essential packages that cannot be removed

Package Manager Protection:

  • APT/dpkg prevents removal of essential packages
  • Essential packages are hardcoded in Debian Policy
  • Removing them requires --force-depends (dangerous)

Best Practices for Minimization

  1. Start with --debootstrap-options "--variant=minbase" - safest reduction
  2. Disable recommendations with --apt-recommends false
  3. Remove documentation/locales via hooks if space is critical
  4. Test thoroughly - minimal systems may lack expected tools
  5. Document what you removed for troubleshooting
  6. Consider alternatives like Alpine Linux for truly minimal containers

Remember: Core utilities like ls, cp, mv are fundamental to Unix-like systems. They're in essential packages for a reason - removing them will break your system. Focus on removing optional packages, documentation, and recommended packages instead of core system utilities.

The goal should be "minimal but functional" rather than "absolutely smallest possible" for any system you plan to actually use.

Description
A privacy-preserving, ephemeral operating system whose identity and configuration live on Nostr.
Readme 346 MiB
Languages
Vim Script 64.8%
Perl 13.8%
Shell 12.6%
HTML 2.5%
Prolog 1.7%
Other 4.4%