first commit
This commit is contained in:
commit
eca28aae28
91 changed files with 3139 additions and 0 deletions
44
.gitignore
vendored
Normal file
44
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Build artifacts
|
||||||
|
*.iso
|
||||||
|
*.qcow2
|
||||||
|
*.img
|
||||||
|
*.deb
|
||||||
|
*.dsc
|
||||||
|
*.changes
|
||||||
|
*.buildinfo
|
||||||
|
*.tar.xz
|
||||||
|
|
||||||
|
# Container images (optional - you might want to track these)
|
||||||
|
# *.tar
|
||||||
|
|
||||||
|
# Live-build artifacts
|
||||||
|
.build/
|
||||||
|
local/
|
||||||
|
binary/
|
||||||
|
cache/
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
*.log
|
||||||
|
grep.log
|
||||||
|
|
||||||
|
# OS generated files
|
||||||
|
.DS_Store
|
||||||
|
.DS_Store?
|
||||||
|
._*
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# IDE files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Backup files
|
||||||
|
*.bak
|
||||||
|
*.backup
|
||||||
35
01-debian-atomic/Containerfile
Normal file
35
01-debian-atomic/Containerfile
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
FROM debian:trixie
|
||||||
|
|
||||||
|
# Install essential packages for a minimal bootable system
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
dbus \
|
||||||
|
sudo \
|
||||||
|
systemd-sysv \
|
||||||
|
systemd-timesyncd \
|
||||||
|
network-manager \
|
||||||
|
openssh-server \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
vim \
|
||||||
|
less \
|
||||||
|
htop \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Enable systemd services
|
||||||
|
RUN systemctl enable systemd-timesyncd
|
||||||
|
RUN systemctl enable NetworkManager
|
||||||
|
RUN systemctl enable ssh
|
||||||
|
|
||||||
|
# Create a default user
|
||||||
|
RUN useradd -m -s /bin/bash -G sudo user
|
||||||
|
RUN echo "user:password" | chpasswd
|
||||||
|
|
||||||
|
# Set up basic system configuration
|
||||||
|
RUN echo "debian-atomic" > /etc/hostname
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
RUN apt-get clean
|
||||||
|
|
||||||
|
# Set the default command
|
||||||
|
CMD ["/bin/bash"]
|
||||||
76
01-debian-atomic/README.md
Normal file
76
01-debian-atomic/README.md
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# Debian Atomic Desktop - Phase 1
|
||||||
|
|
||||||
|
This is Phase 1 of the Debian Atomic Desktop project, focusing on creating a minimal, bootable Debian OSTree image with automated build processes.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
This project aims to create a Debian-based atomic desktop distribution using `bootc`, similar to `ublue-os` but leveraging the Debian ecosystem. Phase 1 focuses on establishing the foundational build system and creating a minimal bootable image.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- `podman` or `docker` for container builds
|
||||||
|
- `just` for build automation
|
||||||
|
- `bootc` for OSTree image management (for testing)
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. **Build the image:**
|
||||||
|
```bash
|
||||||
|
just build-image
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Test the image:**
|
||||||
|
```bash
|
||||||
|
just test-image
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Test with systemd (for bootc compatibility):**
|
||||||
|
```bash
|
||||||
|
just test-image-systemd
|
||||||
|
```
|
||||||
|
|
||||||
|
## Available Commands
|
||||||
|
|
||||||
|
Use `just --list` to see all available commands, or run `just help` for a summary.
|
||||||
|
|
||||||
|
### Build Commands
|
||||||
|
- `just build-image` - Build the container image with latest tag
|
||||||
|
- `just build-image-tag <tag>` - Build with a specific tag
|
||||||
|
|
||||||
|
### Testing Commands
|
||||||
|
- `just test-image` - Run the image interactively
|
||||||
|
- `just test-image-systemd` - Run with systemd support (privileged mode)
|
||||||
|
|
||||||
|
### Maintenance Commands
|
||||||
|
- `just clean` - Remove the latest image
|
||||||
|
- `just clean-all` - Remove all debian-atomic images
|
||||||
|
- `just list-images` - List all debian-atomic images
|
||||||
|
- `just inspect-image` - Show detailed image information
|
||||||
|
|
||||||
|
## Image Contents
|
||||||
|
|
||||||
|
The Phase 1 image includes:
|
||||||
|
- Debian Trixie base
|
||||||
|
- Essential system packages (systemd, dbus, sudo, etc.)
|
||||||
|
- Network management (NetworkManager)
|
||||||
|
- SSH server
|
||||||
|
- Basic utilities (curl, wget, vim, htop)
|
||||||
|
- Default user account (user/password)
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
This is Phase 1 of the roadmap. Future phases will include:
|
||||||
|
- Phase 2: Calamares installer integration
|
||||||
|
- Phase 3: Desktop environment and kernel modules
|
||||||
|
- Phase 4: Polish and distribution
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
The project uses:
|
||||||
|
- `Containerfile` - Defines the container image
|
||||||
|
- `justfile` - Build automation and testing
|
||||||
|
- `roadmap.md` - Project roadmap and phases
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
This is currently in Phase 1 development. The focus is on establishing a solid foundation before adding more complex features.
|
||||||
44
01-debian-atomic/justfile
Normal file
44
01-debian-atomic/justfile
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Justfile for Debian Atomic Desktop - Phase 1
|
||||||
|
# Build and manage the minimal bootable Debian image
|
||||||
|
|
||||||
|
# Default recipe
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Build the container image
|
||||||
|
build-image:
|
||||||
|
podman build -t debian-atomic:latest .
|
||||||
|
|
||||||
|
# Build with a specific tag
|
||||||
|
build-image-tag tag:
|
||||||
|
podman build -t debian-atomic:{{tag}} .
|
||||||
|
|
||||||
|
# Clean up container images
|
||||||
|
clean:
|
||||||
|
podman rmi debian-atomic:latest || true
|
||||||
|
|
||||||
|
# Clean all debian-atomic images
|
||||||
|
clean-all:
|
||||||
|
podman rmi debian-atomic:latest || true
|
||||||
|
podman rmi debian-atomic:dev || true
|
||||||
|
|
||||||
|
# Test the image by running it interactively
|
||||||
|
test-image:
|
||||||
|
podman run -it --rm debian-atomic:latest
|
||||||
|
|
||||||
|
# Test the image with systemd (requires privileged mode)
|
||||||
|
test-image-systemd:
|
||||||
|
podman run -it --rm --privileged --systemd=always debian-atomic:latest
|
||||||
|
|
||||||
|
# List all debian-atomic images
|
||||||
|
list-images:
|
||||||
|
podman images debian-atomic
|
||||||
|
|
||||||
|
# Show image details
|
||||||
|
inspect-image:
|
||||||
|
podman inspect debian-atomic:latest
|
||||||
|
|
||||||
|
# Help
|
||||||
|
help:
|
||||||
|
@echo "Available recipes:"
|
||||||
|
@just --list
|
||||||
74
02-installer-bootc/Containerfile
Normal file
74
02-installer-bootc/Containerfile
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
FROM debian:trixie
|
||||||
|
|
||||||
|
# Install essential packages for a bootc installer
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
dbus \
|
||||||
|
sudo \
|
||||||
|
systemd-sysv \
|
||||||
|
systemd-timesyncd \
|
||||||
|
network-manager \
|
||||||
|
openssh-server \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
vim \
|
||||||
|
less \
|
||||||
|
htop \
|
||||||
|
# Calamares and its dependencies
|
||||||
|
calamares \
|
||||||
|
calamares-settings-debian \
|
||||||
|
# Bootc for atomic deployment (will install from source)
|
||||||
|
# bootc \
|
||||||
|
# Additional installer tools
|
||||||
|
parted \
|
||||||
|
gdisk \
|
||||||
|
fdisk \
|
||||||
|
e2fsprogs \
|
||||||
|
dosfstools \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install bootc dependencies first
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libarchive13t64 \
|
||||||
|
libavahi-client3 \
|
||||||
|
libavahi-common3 \
|
||||||
|
libavahi-glib1 \
|
||||||
|
libcurl3t64-gnutls \
|
||||||
|
libgpgme11t64 \
|
||||||
|
libglib2.0-0t64 \
|
||||||
|
libostree-1-1 \
|
||||||
|
podman \
|
||||||
|
skopeo \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Copy bootc from build context
|
||||||
|
COPY bootc /usr/local/bin/bootc
|
||||||
|
|
||||||
|
# Enable systemd services
|
||||||
|
RUN systemctl enable systemd-timesyncd
|
||||||
|
RUN systemctl enable NetworkManager
|
||||||
|
RUN systemctl enable ssh
|
||||||
|
|
||||||
|
# Create a default user for the installer environment
|
||||||
|
RUN useradd -m -s /bin/bash -G sudo installer
|
||||||
|
RUN echo "installer:installer" | chpasswd
|
||||||
|
|
||||||
|
# Set up basic system configuration
|
||||||
|
RUN echo "debian-atomic-installer" > /etc/hostname
|
||||||
|
|
||||||
|
# Copy Calamares configuration
|
||||||
|
COPY calamares-config/ /etc/calamares/
|
||||||
|
|
||||||
|
# Copy installation scripts
|
||||||
|
COPY scripts/ /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/*.sh
|
||||||
|
|
||||||
|
# Set up Calamares to autostart
|
||||||
|
RUN mkdir -p /etc/systemd/system/graphical.target.wants/
|
||||||
|
RUN ln -sf /usr/lib/systemd/system/calamares.service /etc/systemd/system/graphical.target.wants/
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
RUN apt-get clean
|
||||||
|
|
||||||
|
# Set the default command
|
||||||
|
CMD ["/bin/bash"]
|
||||||
101
02-installer-bootc/README.md
Normal file
101
02-installer-bootc/README.md
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
# Debian Atomic Desktop - Bootc Installer (Phase 2 Alternative)
|
||||||
|
|
||||||
|
This is an alternative approach to Phase 2 that uses **bootc + Calamares** instead of live-build. This approach is more modern and consistent with our atomic architecture.
|
||||||
|
|
||||||
|
## Architecture Overview
|
||||||
|
|
||||||
|
Instead of using live-build to create a traditional installer ISO, this approach:
|
||||||
|
|
||||||
|
1. **Creates a bootc container** that includes Calamares
|
||||||
|
2. **Calamares handles** partitioning, user setup, and system configuration
|
||||||
|
3. **Post-install script** uses `bootc install` to deploy the atomic image
|
||||||
|
4. **bootc creates the ISO** from the container
|
||||||
|
|
||||||
|
## Advantages Over Live-Build
|
||||||
|
|
||||||
|
- ✅ **Consistent tooling** - Everything uses bootc
|
||||||
|
- ✅ **No sysvinit conflicts** - Pure systemd environment
|
||||||
|
- ✅ **Atomic guarantees** - The installer itself is atomic
|
||||||
|
- ✅ **Simpler maintenance** - One build system instead of two
|
||||||
|
- ✅ **Modern approach** - Uses container-native tooling
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. **Build the installer:**
|
||||||
|
```bash
|
||||||
|
just build-installer
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Test the installer:**
|
||||||
|
```bash
|
||||||
|
just test-installer-systemd
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Create ISO (when ready):**
|
||||||
|
```bash
|
||||||
|
just create-iso
|
||||||
|
```
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
### 1. Container Build
|
||||||
|
The `Containerfile` creates a bootc container with:
|
||||||
|
- Calamares installer
|
||||||
|
- bootc for atomic deployment
|
||||||
|
- Systemd services
|
||||||
|
- Partitioning tools
|
||||||
|
|
||||||
|
### 2. Calamares Configuration
|
||||||
|
- `settings.conf` - Main Calamares configuration
|
||||||
|
- Handles partitioning, user setup, etc.
|
||||||
|
- Calls our post-install script
|
||||||
|
|
||||||
|
### 3. Post-Install Script
|
||||||
|
- `post-install.sh` - Uses bootc to deploy atomic image
|
||||||
|
- Gets target device from Calamares
|
||||||
|
- Runs `bootc install to-disk`
|
||||||
|
|
||||||
|
### 4. ISO Creation
|
||||||
|
- bootc creates bootable ISO from container
|
||||||
|
- ISO boots into Calamares installer
|
||||||
|
- Installer deploys atomic image
|
||||||
|
|
||||||
|
## File Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
02-installer-bootc/
|
||||||
|
├── Containerfile # Bootc container definition
|
||||||
|
├── justfile # Build automation
|
||||||
|
├── README.md # This file
|
||||||
|
├── calamares-config/ # Calamares configuration
|
||||||
|
│ └── settings.conf # Main Calamares settings
|
||||||
|
└── scripts/ # Installation scripts
|
||||||
|
└── post-install.sh # Bootc deployment script
|
||||||
|
```
|
||||||
|
|
||||||
|
## Comparison with Live-Build Approach
|
||||||
|
|
||||||
|
| Aspect | Live-Build | Bootc + Calamares |
|
||||||
|
|--------|------------|-------------------|
|
||||||
|
| Build System | live-build | bootc |
|
||||||
|
| Dependencies | Complex package conflicts | Clean container |
|
||||||
|
| Maintenance | Two build systems | One build system |
|
||||||
|
| Atomic Guarantees | Limited | Full atomic |
|
||||||
|
| Modern Tooling | Traditional | Container-native |
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
1. **Test the basic container** - Verify Calamares works
|
||||||
|
2. **Configure Calamares** - Add proper partitioning and user modules
|
||||||
|
3. **Test bootc deployment** - Verify atomic image installation
|
||||||
|
4. **Create ISO** - Use bootc to generate bootable ISO
|
||||||
|
5. **Integration testing** - Test full installation flow
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- `podman` or `docker`
|
||||||
|
- `just`
|
||||||
|
- `bootc`
|
||||||
|
- `qemu` (for testing)
|
||||||
|
|
||||||
|
This approach should eliminate the sysvinit conflicts we encountered with live-build and provide a cleaner, more modern installer experience.
|
||||||
67
02-installer-bootc/calamares-config/settings.conf
Normal file
67
02-installer-bootc/calamares-config/settings.conf
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
# Calamares settings for Debian Atomic Desktop installer
|
||||||
|
---
|
||||||
|
# This is the main configuration file for Calamares.
|
||||||
|
# It contains the general settings for the installer.
|
||||||
|
|
||||||
|
# Modules can be job modules (with different interfaces) and can be
|
||||||
|
# shown in the main page, or be part of the sequence of jobs.
|
||||||
|
# Each module can be loaded multiple times, so the module name
|
||||||
|
# should represent a feature and not a specific module.
|
||||||
|
|
||||||
|
# Instances section
|
||||||
|
# Each module can be loaded multiple times, so the module name
|
||||||
|
# should represent a feature and not a specific module.
|
||||||
|
instances:
|
||||||
|
- id: welcome
|
||||||
|
module: welcome
|
||||||
|
config: welcome.conf
|
||||||
|
|
||||||
|
- id: locale
|
||||||
|
module: locale
|
||||||
|
config: locale.conf
|
||||||
|
|
||||||
|
- id: keyboard
|
||||||
|
module: keyboardq
|
||||||
|
config: keyboard.conf
|
||||||
|
|
||||||
|
- id: partition
|
||||||
|
module: partition
|
||||||
|
config: partition.conf
|
||||||
|
|
||||||
|
- id: users
|
||||||
|
module: users
|
||||||
|
config: users.conf
|
||||||
|
|
||||||
|
- id: summary
|
||||||
|
module: summary
|
||||||
|
config: summary.conf
|
||||||
|
|
||||||
|
- id: finished
|
||||||
|
module: finished
|
||||||
|
config: finished.conf
|
||||||
|
|
||||||
|
# Sequence section
|
||||||
|
# This section defines the order in which the modules are shown.
|
||||||
|
sequence:
|
||||||
|
- show:
|
||||||
|
- welcome
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- partition
|
||||||
|
- users
|
||||||
|
- summary
|
||||||
|
- exec:
|
||||||
|
- partition
|
||||||
|
- users
|
||||||
|
- finished
|
||||||
|
|
||||||
|
# Branding section
|
||||||
|
# This section defines the branding for the installer.
|
||||||
|
branding: debian
|
||||||
|
|
||||||
|
# Prompts section
|
||||||
|
# This section defines the prompts shown to the user.
|
||||||
|
prompts:
|
||||||
|
- type: "ok"
|
||||||
|
message: "Installation Complete"
|
||||||
|
description: "The Debian Atomic Desktop has been installed successfully."
|
||||||
157
02-installer-bootc/create-vm.sh
Executable file
157
02-installer-bootc/create-vm.sh
Executable file
|
|
@ -0,0 +1,157 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Create VM script for Debian Atomic Desktop Bootc Installer
|
||||||
|
# This creates a real QEMU VM with VNC access
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
VM_NAME="debian-atomic-installer-vm"
|
||||||
|
VM_DISK="vm-disk.qcow2"
|
||||||
|
VM_MEMORY="4G"
|
||||||
|
VM_CORES="2"
|
||||||
|
VNC_PORT="5901"
|
||||||
|
VNC_DISPLAY=":1"
|
||||||
|
|
||||||
|
# Colors for output
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
log_info() {
|
||||||
|
echo -e "${BLUE}[INFO]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_success() {
|
||||||
|
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_warning() {
|
||||||
|
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create VM disk
|
||||||
|
create_vm_disk() {
|
||||||
|
log_info "Creating VM disk..."
|
||||||
|
if [ -f "$VM_DISK" ]; then
|
||||||
|
log_warning "VM disk already exists. Removing it..."
|
||||||
|
rm -f "$VM_DISK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
qemu-img create -f qcow2 "$VM_DISK" 20G
|
||||||
|
log_success "VM disk created: $VM_DISK"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download a minimal Debian ISO for testing
|
||||||
|
download_debian_iso() {
|
||||||
|
log_info "Downloading minimal Debian ISO for testing..."
|
||||||
|
|
||||||
|
if [ ! -f "debian-mini.iso" ]; then
|
||||||
|
# Download a minimal Debian netinst ISO
|
||||||
|
wget -O debian-mini.iso "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.7.0-amd64-netinst.iso"
|
||||||
|
log_success "Downloaded Debian netinst ISO"
|
||||||
|
else
|
||||||
|
log_info "Debian ISO already exists"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start the VM with VNC
|
||||||
|
start_vm() {
|
||||||
|
log_info "Starting VM with VNC access..."
|
||||||
|
log_info "VNC server will be available at: vnc://localhost:$VNC_PORT"
|
||||||
|
log_info "Use a VNC client to connect to: localhost:$VNC_PORT"
|
||||||
|
|
||||||
|
# Check if we have an ISO
|
||||||
|
if [ ! -f "debian-mini.iso" ]; then
|
||||||
|
download_debian_iso
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start VM with proper boot order
|
||||||
|
sudo qemu-system-x86_64 \
|
||||||
|
-name "$VM_NAME" \
|
||||||
|
-m "$VM_MEMORY" \
|
||||||
|
-smp "$VM_CORES" \
|
||||||
|
-enable-kvm \
|
||||||
|
-cpu host \
|
||||||
|
-machine q35 \
|
||||||
|
-drive file="$VM_DISK",format=qcow2,if=virtio \
|
||||||
|
-cdrom debian-mini.iso \
|
||||||
|
-device virtio-net-pci,netdev=net0 \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
||||||
|
-rtc base=utc \
|
||||||
|
-boot order=dc \
|
||||||
|
-serial mon:stdio \
|
||||||
|
-nographic
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install our installer in the VM
|
||||||
|
install_in_vm() {
|
||||||
|
log_info "Instructions for installing our installer in the VM:"
|
||||||
|
echo
|
||||||
|
echo "1. Connect to VNC: vnc://localhost:$VNC_PORT"
|
||||||
|
echo "2. Install Debian in the VM"
|
||||||
|
echo "3. After installation, install our tools:"
|
||||||
|
echo " - Install podman: sudo apt install podman"
|
||||||
|
echo " - Install bootc: Copy from host or install from package"
|
||||||
|
echo " - Install Calamares: sudo apt install calamares"
|
||||||
|
echo "4. Test the installer"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show help
|
||||||
|
show_help() {
|
||||||
|
echo "Usage: $0 [COMMAND]"
|
||||||
|
echo ""
|
||||||
|
echo "Commands:"
|
||||||
|
echo " create-disk - Create VM disk"
|
||||||
|
echo " download-iso - Download Debian ISO"
|
||||||
|
echo " start-vm - Start VM with VNC access"
|
||||||
|
echo " install - Show installation instructions"
|
||||||
|
echo " test - Full test (create disk, download ISO, start VM)"
|
||||||
|
echo " clean - Clean up VM files"
|
||||||
|
echo " help - Show this help"
|
||||||
|
echo ""
|
||||||
|
echo "VNC Access:"
|
||||||
|
echo " After starting the VM, connect to: vnc://localhost:$VNC_PORT"
|
||||||
|
echo " Or use: vncviewer localhost:$VNC_PORT"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
cleanup() {
|
||||||
|
log_info "Cleaning up VM files..."
|
||||||
|
rm -f "$VM_DISK"
|
||||||
|
rm -f debian-mini.iso
|
||||||
|
log_success "Cleanup completed."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main execution
|
||||||
|
case "${1:-help}" in
|
||||||
|
"create-disk")
|
||||||
|
create_vm_disk
|
||||||
|
;;
|
||||||
|
"download-iso")
|
||||||
|
download_debian_iso
|
||||||
|
;;
|
||||||
|
"start-vm")
|
||||||
|
if [ ! -f "$VM_DISK" ]; then
|
||||||
|
log_warning "VM disk not found. Creating it first..."
|
||||||
|
create_vm_disk
|
||||||
|
fi
|
||||||
|
start_vm
|
||||||
|
;;
|
||||||
|
"install")
|
||||||
|
install_in_vm
|
||||||
|
;;
|
||||||
|
"test")
|
||||||
|
create_vm_disk
|
||||||
|
download_debian_iso
|
||||||
|
start_vm
|
||||||
|
;;
|
||||||
|
"clean")
|
||||||
|
cleanup
|
||||||
|
;;
|
||||||
|
"help"|*)
|
||||||
|
show_help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
159
02-installer-bootc/justfile
Normal file
159
02-installer-bootc/justfile
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
# justfile for Debian Atomic Desktop Bootc Installer
|
||||||
|
# This creates a bootc-based installer with Calamares
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
IMAGE_NAME := "debian-atomic-installer"
|
||||||
|
IMAGE_TAG := "latest"
|
||||||
|
|
||||||
|
# Default recipe
|
||||||
|
default: build-installer
|
||||||
|
|
||||||
|
# Build the installer container image
|
||||||
|
build-installer:
|
||||||
|
@echo "Building Debian Atomic Desktop installer..."
|
||||||
|
podman build -t {{IMAGE_NAME}}:{{IMAGE_TAG}} .
|
||||||
|
@echo "Installer image built successfully!"
|
||||||
|
|
||||||
|
# Build with a specific tag
|
||||||
|
build-installer-tag tag:
|
||||||
|
@echo "Building installer with tag: {{tag}}"
|
||||||
|
podman build -t {{IMAGE_NAME}}:{{tag}} .
|
||||||
|
@echo "Installer image built with tag {{tag}}!"
|
||||||
|
|
||||||
|
# Test the installer image interactively
|
||||||
|
test-installer:
|
||||||
|
@echo "Testing installer image..."
|
||||||
|
podman run -it --rm {{IMAGE_NAME}}:{{IMAGE_TAG}} /bin/bash
|
||||||
|
|
||||||
|
# Test the installer with systemd (for bootc compatibility)
|
||||||
|
test-installer-systemd:
|
||||||
|
@echo "Testing installer with systemd support..."
|
||||||
|
podman run -it --rm \
|
||||||
|
--privileged \
|
||||||
|
--systemd=always \
|
||||||
|
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
|
||||||
|
{{IMAGE_NAME}}:{{IMAGE_TAG}}
|
||||||
|
|
||||||
|
# Create a bootable ISO from the installer image
|
||||||
|
create-iso:
|
||||||
|
@echo "Creating bootable ISO from installer image..."
|
||||||
|
@echo "This would use bootc to create an ISO from the container"
|
||||||
|
@echo "bootc container build-iso {{IMAGE_NAME}}:{{IMAGE_TAG}} --output debian-atomic-installer.iso"
|
||||||
|
|
||||||
|
# Test the ISO in QEMU
|
||||||
|
test-iso:
|
||||||
|
@echo "Testing installer ISO in QEMU..."
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-enable-kvm \
|
||||||
|
-m 2G \
|
||||||
|
-cdrom debian-atomic-installer.iso \
|
||||||
|
-serial mon:stdio \
|
||||||
|
-nographic
|
||||||
|
|
||||||
|
# Build bootable ISO from installer container
|
||||||
|
build-iso:
|
||||||
|
@echo "Building bootable ISO from installer container..."
|
||||||
|
./test-vm.sh build-iso
|
||||||
|
|
||||||
|
# Create VM disk for testing
|
||||||
|
create-vm-disk:
|
||||||
|
@echo "Creating VM disk for testing..."
|
||||||
|
./test-vm.sh create-vm
|
||||||
|
|
||||||
|
# Start VM with VNC access
|
||||||
|
start-vm:
|
||||||
|
@echo "Starting VM with VNC access..."
|
||||||
|
./test-vm.sh start-vm
|
||||||
|
|
||||||
|
# Full VM test (build ISO, create VM, start VM)
|
||||||
|
test-vm:
|
||||||
|
@echo "Running full VM test..."
|
||||||
|
./test-vm.sh test
|
||||||
|
|
||||||
|
# Clean up VM files
|
||||||
|
clean-vm:
|
||||||
|
@echo "Cleaning up VM files..."
|
||||||
|
./test-vm.sh clean
|
||||||
|
|
||||||
|
# Container VM testing (simpler approach)
|
||||||
|
test-container:
|
||||||
|
@echo "Testing installer in container VM..."
|
||||||
|
./test-container-vm.sh test
|
||||||
|
|
||||||
|
# Start container VM
|
||||||
|
start-container:
|
||||||
|
@echo "Starting installer container VM..."
|
||||||
|
./test-container-vm.sh start
|
||||||
|
|
||||||
|
# Setup VNC in container
|
||||||
|
setup-vnc:
|
||||||
|
@echo "Setting up VNC in container..."
|
||||||
|
./test-container-vm.sh setup-vnc
|
||||||
|
|
||||||
|
# Show container status
|
||||||
|
container-status:
|
||||||
|
@echo "Showing container status..."
|
||||||
|
./test-container-vm.sh status
|
||||||
|
|
||||||
|
# Stop container VM
|
||||||
|
stop-container:
|
||||||
|
@echo "Stopping installer container VM..."
|
||||||
|
./test-container-vm.sh stop
|
||||||
|
|
||||||
|
# Access container shell
|
||||||
|
container-shell:
|
||||||
|
@echo "Accessing container shell..."
|
||||||
|
./test-container-vm.sh shell
|
||||||
|
|
||||||
|
# Real VM testing with QEMU
|
||||||
|
create-real-vm-disk:
|
||||||
|
@echo "Creating VM disk..."
|
||||||
|
./create-vm.sh create-disk
|
||||||
|
|
||||||
|
download-debian-iso:
|
||||||
|
@echo "Downloading Debian ISO..."
|
||||||
|
./create-vm.sh download-iso
|
||||||
|
|
||||||
|
start-real-vm:
|
||||||
|
@echo "Starting real VM with VNC..."
|
||||||
|
./create-vm.sh start-vm
|
||||||
|
|
||||||
|
vm-install-instructions:
|
||||||
|
@echo "Showing VM installation instructions..."
|
||||||
|
./create-vm.sh install
|
||||||
|
|
||||||
|
test-real-vm:
|
||||||
|
@echo "Testing real VM (create disk, download ISO, start VM)..."
|
||||||
|
./create-vm.sh test
|
||||||
|
|
||||||
|
clean-vm-files:
|
||||||
|
@echo "Cleaning up VM files..."
|
||||||
|
./create-vm.sh clean
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
clean:
|
||||||
|
@echo "Cleaning up installer images..."
|
||||||
|
podman rmi {{IMAGE_NAME}}:{{IMAGE_TAG}} 2>/dev/null || true
|
||||||
|
|
||||||
|
# Clean all related images (simplified)
|
||||||
|
clean-all:
|
||||||
|
@echo "Cleaning all installer images..."
|
||||||
|
@echo "Use 'podman images' and 'podman rmi' manually for now"
|
||||||
|
|
||||||
|
# List all installer images
|
||||||
|
list-images:
|
||||||
|
@echo "Installer images:"
|
||||||
|
podman images {{IMAGE_NAME}}
|
||||||
|
|
||||||
|
# Show detailed image information
|
||||||
|
inspect-image:
|
||||||
|
@echo "Inspecting installer image..."
|
||||||
|
podman inspect {{IMAGE_NAME}}:{{IMAGE_TAG}}
|
||||||
|
|
||||||
|
# Help
|
||||||
|
help:
|
||||||
|
@echo "Available commands:"
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# List all recipes
|
||||||
|
list: help
|
||||||
46
02-installer-bootc/scripts/post-install.sh
Normal file
46
02-installer-bootc/scripts/post-install.sh
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Post-install script for Debian Atomic Desktop
|
||||||
|
# This script is called by Calamares after partitioning and user setup
|
||||||
|
|
||||||
|
echo "Starting Debian Atomic Desktop installation..."
|
||||||
|
|
||||||
|
# Get the target device from Calamares
|
||||||
|
TARGET_DEVICE="${1:-/dev/sda}"
|
||||||
|
ATOMIC_IMAGE="${2:-ghcr.io/particle-os/debian-atomic:latest}"
|
||||||
|
|
||||||
|
echo "Target device: $TARGET_DEVICE"
|
||||||
|
echo "Atomic image: $ATOMIC_IMAGE"
|
||||||
|
|
||||||
|
# Verify the target device exists
|
||||||
|
if [ ! -b "$TARGET_DEVICE" ]; then
|
||||||
|
echo "Error: Target device $TARGET_DEVICE does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if bootc is available
|
||||||
|
if ! command -v bootc &> /dev/null; then
|
||||||
|
echo "Error: bootc is not installed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install the atomic image using bootc
|
||||||
|
echo "Installing atomic image to $TARGET_DEVICE..."
|
||||||
|
bootc install to-disk \
|
||||||
|
--device "$TARGET_DEVICE" \
|
||||||
|
--replace-os \
|
||||||
|
--image "$ATOMIC_IMAGE"
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Atomic image installation completed successfully!"
|
||||||
|
else
|
||||||
|
echo "Error: Failed to install atomic image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Additional post-install tasks can be added here
|
||||||
|
# For example, copying user data, configuring bootloader, etc.
|
||||||
|
|
||||||
|
echo "Debian Atomic Desktop installation completed!"
|
||||||
|
exit 0
|
||||||
176
02-installer-bootc/test-container-vm.sh
Executable file
176
02-installer-bootc/test-container-vm.sh
Executable file
|
|
@ -0,0 +1,176 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Test Container VM script for Debian Atomic Desktop Bootc Installer
|
||||||
|
# This runs our installer container in a VM-like environment with VNC
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
CONTAINER_NAME="debian-atomic-installer-vm"
|
||||||
|
VNC_PORT="5901"
|
||||||
|
VNC_DISPLAY=":1"
|
||||||
|
|
||||||
|
# Colors for output
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
log_info() {
|
||||||
|
echo -e "${BLUE}[INFO]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_success() {
|
||||||
|
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_warning() {
|
||||||
|
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if installer image exists
|
||||||
|
check_installer() {
|
||||||
|
log_info "Checking installer image..."
|
||||||
|
if ! podman image exists debian-atomic-installer:latest; then
|
||||||
|
log_warning "Installer image not found. Building it first..."
|
||||||
|
just build-installer
|
||||||
|
fi
|
||||||
|
log_success "Installer image ready."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start the installer container with VNC
|
||||||
|
start_container_vm() {
|
||||||
|
log_info "Starting installer container with VNC access..."
|
||||||
|
log_info "VNC server will be available at: vnc://localhost:$VNC_PORT"
|
||||||
|
log_info "Use a VNC client to connect to: localhost:$VNC_PORT"
|
||||||
|
|
||||||
|
# Stop any existing container
|
||||||
|
podman stop "$CONTAINER_NAME" 2>/dev/null || true
|
||||||
|
podman rm "$CONTAINER_NAME" 2>/dev/null || true
|
||||||
|
|
||||||
|
# Start the container with systemd and VNC
|
||||||
|
podman run -d \
|
||||||
|
--name "$CONTAINER_NAME" \
|
||||||
|
--privileged \
|
||||||
|
--systemd=always \
|
||||||
|
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
|
||||||
|
-p "$VNC_PORT:5900" \
|
||||||
|
-p 2222:22 \
|
||||||
|
-e DISPLAY="$VNC_DISPLAY" \
|
||||||
|
debian-atomic-installer:latest
|
||||||
|
|
||||||
|
log_success "Container started. Connect to VNC at localhost:$VNC_PORT"
|
||||||
|
log_info "To access the container shell: podman exec -it $CONTAINER_NAME bash"
|
||||||
|
log_info "To stop the container: podman stop $CONTAINER_NAME"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install VNC server in the container
|
||||||
|
setup_vnc() {
|
||||||
|
log_info "Setting up VNC server in the container..."
|
||||||
|
|
||||||
|
podman exec "$CONTAINER_NAME" bash -c "
|
||||||
|
# Install VNC server and desktop environment
|
||||||
|
apt-get update && apt-get install -y \
|
||||||
|
tightvncserver \
|
||||||
|
xfce4 \
|
||||||
|
xfce4-goodies \
|
||||||
|
dbus-x11 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create VNC password
|
||||||
|
mkdir -p /root/.vnc
|
||||||
|
echo 'password' | vncpasswd -f > /root/.vnc/passwd
|
||||||
|
chmod 600 /root/.vnc/passwd
|
||||||
|
|
||||||
|
# Create VNC startup script
|
||||||
|
cat > /root/.vnc/xstartup << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
xrdb \$HOME/.Xresources
|
||||||
|
startxfce4 &
|
||||||
|
EOF
|
||||||
|
chmod +x /root/.vnc/xstartup
|
||||||
|
|
||||||
|
# Start VNC server
|
||||||
|
vncserver :1 -geometry 1024x768 -depth 24
|
||||||
|
"
|
||||||
|
|
||||||
|
log_success "VNC server setup completed"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show container status
|
||||||
|
show_status() {
|
||||||
|
log_info "Container status:"
|
||||||
|
podman ps -a --filter name="$CONTAINER_NAME"
|
||||||
|
|
||||||
|
echo
|
||||||
|
log_info "VNC Access:"
|
||||||
|
echo " Connect to: vnc://localhost:$VNC_PORT"
|
||||||
|
echo " Password: password"
|
||||||
|
echo
|
||||||
|
log_info "SSH Access:"
|
||||||
|
echo " Connect to: ssh installer@localhost -p 2222"
|
||||||
|
echo " Password: installer"
|
||||||
|
echo
|
||||||
|
log_info "Container Shell:"
|
||||||
|
echo " podman exec -it $CONTAINER_NAME bash"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stop the container
|
||||||
|
stop_container() {
|
||||||
|
log_info "Stopping installer container..."
|
||||||
|
podman stop "$CONTAINER_NAME" 2>/dev/null || true
|
||||||
|
podman rm "$CONTAINER_NAME" 2>/dev/null || true
|
||||||
|
log_success "Container stopped and removed"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show help
|
||||||
|
show_help() {
|
||||||
|
echo "Usage: $0 [COMMAND]"
|
||||||
|
echo ""
|
||||||
|
echo "Commands:"
|
||||||
|
echo " start - Start installer container with VNC"
|
||||||
|
echo " setup-vnc - Setup VNC server in the container"
|
||||||
|
echo " status - Show container status and access info"
|
||||||
|
echo " stop - Stop and remove the container"
|
||||||
|
echo " test - Full test (start container, setup VNC)"
|
||||||
|
echo " shell - Access container shell"
|
||||||
|
echo " help - Show this help"
|
||||||
|
echo ""
|
||||||
|
echo "VNC Access:"
|
||||||
|
echo " After starting, connect to: vnc://localhost:$VNC_PORT"
|
||||||
|
echo " Password: password"
|
||||||
|
echo ""
|
||||||
|
echo "SSH Access:"
|
||||||
|
echo " ssh installer@localhost -p 2222"
|
||||||
|
echo " Password: installer"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main execution
|
||||||
|
case "${1:-help}" in
|
||||||
|
"start")
|
||||||
|
check_installer
|
||||||
|
start_container_vm
|
||||||
|
;;
|
||||||
|
"setup-vnc")
|
||||||
|
setup_vnc
|
||||||
|
;;
|
||||||
|
"status")
|
||||||
|
show_status
|
||||||
|
;;
|
||||||
|
"stop")
|
||||||
|
stop_container
|
||||||
|
;;
|
||||||
|
"test")
|
||||||
|
check_installer
|
||||||
|
start_container_vm
|
||||||
|
sleep 5
|
||||||
|
setup_vnc
|
||||||
|
show_status
|
||||||
|
;;
|
||||||
|
"shell")
|
||||||
|
podman exec -it "$CONTAINER_NAME" bash
|
||||||
|
;;
|
||||||
|
"help"|*)
|
||||||
|
show_help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
197
02-installer-bootc/test-vm.sh
Executable file
197
02-installer-bootc/test-vm.sh
Executable file
|
|
@ -0,0 +1,197 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Test VM script for Debian Atomic Desktop Bootc Installer
|
||||||
|
# This creates a QEMU VM with VNC access to test the installer
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
VM_NAME="debian-atomic-installer-test"
|
||||||
|
VM_DISK="test-vm.qcow2"
|
||||||
|
VM_MEMORY="4G"
|
||||||
|
VM_CORES="2"
|
||||||
|
VNC_PORT="5901"
|
||||||
|
VNC_DISPLAY=":1"
|
||||||
|
|
||||||
|
# Colors for output
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
BLUE='\033[0;34m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
log_info() {
|
||||||
|
echo -e "${BLUE}[INFO]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_success() {
|
||||||
|
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_warning() {
|
||||||
|
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if installer image exists
|
||||||
|
check_installer() {
|
||||||
|
log_info "Checking installer image..."
|
||||||
|
if ! podman image exists debian-atomic-installer:latest; then
|
||||||
|
log_warning "Installer image not found. Building it first..."
|
||||||
|
just build-installer
|
||||||
|
fi
|
||||||
|
log_success "Installer image ready."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create bootable ISO from installer container
|
||||||
|
create_iso() {
|
||||||
|
log_info "Creating bootable ISO from installer container..."
|
||||||
|
|
||||||
|
# For now, let's create a simple test ISO using debian-live
|
||||||
|
# This is a temporary approach until we can properly create a bootable ISO
|
||||||
|
log_warning "Creating a simple test ISO using debian-live..."
|
||||||
|
|
||||||
|
# Install live-build if not available
|
||||||
|
if ! command -v lb &> /dev/null; then
|
||||||
|
log_info "Installing live-build..."
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y live-build
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a minimal live-build configuration
|
||||||
|
mkdir -p /tmp/live-build-test
|
||||||
|
cd /tmp/live-build-test
|
||||||
|
|
||||||
|
# Initialize live-build with minimal config
|
||||||
|
lb config \
|
||||||
|
--architectures amd64 \
|
||||||
|
--distribution trixie \
|
||||||
|
--binary-images iso-hybrid \
|
||||||
|
--debian-installer live \
|
||||||
|
--linux-flavours amd64 \
|
||||||
|
--bootloader syslinux \
|
||||||
|
--verbose
|
||||||
|
|
||||||
|
# Add our installer packages
|
||||||
|
mkdir -p config/package-lists
|
||||||
|
echo "calamares" > config/package-lists/installer.list.chroot
|
||||||
|
echo "bootc" >> config/package-lists/installer.list.chroot
|
||||||
|
echo "podman" >> config/package-lists/installer.list.chroot
|
||||||
|
echo "skopeo" >> config/package-lists/installer.list.chroot
|
||||||
|
|
||||||
|
# Build the ISO
|
||||||
|
log_info "Building live ISO..."
|
||||||
|
sudo lb build
|
||||||
|
|
||||||
|
# Copy the result
|
||||||
|
if [ -f "binary/live-image-amd64.hybrid.iso" ]; then
|
||||||
|
cp binary/live-image-amd64.hybrid.iso /opt/Projects/particleos/02-installer-bootc/debian-atomic-installer.iso
|
||||||
|
log_success "ISO created: debian-atomic-installer.iso"
|
||||||
|
else
|
||||||
|
log_warning "ISO build failed, creating a dummy ISO for testing..."
|
||||||
|
# Create a dummy ISO for testing
|
||||||
|
dd if=/dev/zero of=/opt/Projects/particleos/02-installer-bootc/debian-atomic-installer.iso bs=1M count=100
|
||||||
|
log_warning "Created dummy ISO for testing"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /opt/Projects/particleos/02-installer-bootc
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create VM disk
|
||||||
|
create_vm_disk() {
|
||||||
|
log_info "Creating VM disk..."
|
||||||
|
if [ -f "$VM_DISK" ]; then
|
||||||
|
log_warning "VM disk already exists. Removing it..."
|
||||||
|
rm -f "$VM_DISK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
qemu-img create -f qcow2 "$VM_DISK" 20G
|
||||||
|
log_success "VM disk created: $VM_DISK"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start the VM
|
||||||
|
start_vm() {
|
||||||
|
log_info "Starting VM with VNC access..."
|
||||||
|
log_info "VNC server will be available at: vnc://localhost:$VNC_PORT"
|
||||||
|
log_info "Use a VNC client to connect to: localhost:$VNC_PORT"
|
||||||
|
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-name "$VM_NAME" \
|
||||||
|
-m "$VM_MEMORY" \
|
||||||
|
-smp "$VM_CORES" \
|
||||||
|
-enable-kvm \
|
||||||
|
-cpu host \
|
||||||
|
-machine q35 \
|
||||||
|
-device virtio-vga \
|
||||||
|
-display vnc=localhost:$VNC_DISPLAY \
|
||||||
|
-cdrom debian-atomic-installer.iso \
|
||||||
|
-drive file="$VM_DISK",format=qcow2 \
|
||||||
|
-device virtio-net-pci,netdev=net0 \
|
||||||
|
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
||||||
|
-device virtio-balloon \
|
||||||
|
-device virtio-rng-pci \
|
||||||
|
-rtc base=utc \
|
||||||
|
-boot d \
|
||||||
|
-vga virtio \
|
||||||
|
-display sdl,gl=on \
|
||||||
|
-serial mon:stdio \
|
||||||
|
-nographic
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show help
|
||||||
|
show_help() {
|
||||||
|
echo "Usage: $0 [COMMAND]"
|
||||||
|
echo ""
|
||||||
|
echo "Commands:"
|
||||||
|
echo " build-iso - Build bootable ISO from installer container"
|
||||||
|
echo " create-vm - Create VM disk"
|
||||||
|
echo " start-vm - Start VM with VNC access"
|
||||||
|
echo " test - Full test (build ISO, create VM, start VM)"
|
||||||
|
echo " clean - Clean up VM files"
|
||||||
|
echo " help - Show this help"
|
||||||
|
echo ""
|
||||||
|
echo "VNC Access:"
|
||||||
|
echo " After starting the VM, connect to: vnc://localhost:$VNC_PORT"
|
||||||
|
echo " Or use: vncviewer localhost:$VNC_PORT"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
cleanup() {
|
||||||
|
log_info "Cleaning up VM files..."
|
||||||
|
rm -f "$VM_DISK"
|
||||||
|
rm -f debian-atomic-installer.iso
|
||||||
|
log_success "Cleanup completed."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main execution
|
||||||
|
case "${1:-help}" in
|
||||||
|
"build-iso")
|
||||||
|
check_installer
|
||||||
|
create_iso
|
||||||
|
;;
|
||||||
|
"create-vm")
|
||||||
|
create_vm_disk
|
||||||
|
;;
|
||||||
|
"start-vm")
|
||||||
|
if [ ! -f "debian-atomic-installer.iso" ]; then
|
||||||
|
log_warning "ISO not found. Building it first..."
|
||||||
|
check_installer
|
||||||
|
create_iso
|
||||||
|
fi
|
||||||
|
if [ ! -f "$VM_DISK" ]; then
|
||||||
|
log_warning "VM disk not found. Creating it first..."
|
||||||
|
create_vm_disk
|
||||||
|
fi
|
||||||
|
start_vm
|
||||||
|
;;
|
||||||
|
"test")
|
||||||
|
check_installer
|
||||||
|
create_iso
|
||||||
|
create_vm_disk
|
||||||
|
start_vm
|
||||||
|
;;
|
||||||
|
"clean")
|
||||||
|
cleanup
|
||||||
|
;;
|
||||||
|
"help"|*)
|
||||||
|
show_help
|
||||||
|
;;
|
||||||
|
esac
|
||||||
88
02-installer/README.md
Normal file
88
02-installer/README.md
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
# Debian Atomic Desktop - Phase 2: Calamares Installer
|
||||||
|
|
||||||
|
This is Phase 2 of the Debian Atomic Desktop project, focusing on creating a bootable ISO with a Calamares installer that can deploy the atomic image.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
Phase 2 builds upon the Phase 1 foundation to create a complete installation experience. The goal is to create a bootable ISO that presents a Calamares installer, which successfully installs the minimal atomic image created in Phase 1.
|
||||||
|
|
||||||
|
**Note: This build system is designed to create Debian Trixie ISOs from Ubuntu Noble hosts.**
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Ubuntu Noble host system
|
||||||
|
- `live-build` for creating the live ISO environment
|
||||||
|
- `calamares` package and dependencies
|
||||||
|
- `qemu-system-x86_64` for testing the ISO
|
||||||
|
- Access to the Phase 1 image (either embedded or from a registry)
|
||||||
|
- Internet connection for downloading Debian Trixie packages
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. **Build the installer ISO:**
|
||||||
|
```bash
|
||||||
|
just build-iso
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Test the ISO in QEMU:**
|
||||||
|
```bash
|
||||||
|
just test-iso
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Clean up build artifacts:**
|
||||||
|
```bash
|
||||||
|
just clean-iso
|
||||||
|
```
|
||||||
|
|
||||||
|
## Available Commands
|
||||||
|
|
||||||
|
Use `just --list` to see all available commands.
|
||||||
|
|
||||||
|
### Build Commands
|
||||||
|
- `just build-iso` - Build the bootable ISO with Calamares installer
|
||||||
|
- `just build-iso-debug` - Build with debug output
|
||||||
|
|
||||||
|
### Testing Commands
|
||||||
|
- `just test-iso` - Test the ISO in QEMU
|
||||||
|
- `just test-iso-gui` - Test with GUI (if available)
|
||||||
|
|
||||||
|
### Maintenance Commands
|
||||||
|
- `just clean-iso` - Clean up ISO build artifacts
|
||||||
|
- `just clean-all` - Clean all build artifacts
|
||||||
|
|
||||||
|
## ISO Contents
|
||||||
|
|
||||||
|
The Phase 2 ISO includes:
|
||||||
|
- Minimal Debian live environment
|
||||||
|
- Calamares installer with custom configuration
|
||||||
|
- Integration with the Phase 1 atomic image
|
||||||
|
- Automated partitioning and installation
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The installer uses custom Calamares configuration files:
|
||||||
|
- `calamares/settings.conf` - Main settings
|
||||||
|
- `calamares/modules/` - Module configurations
|
||||||
|
- `calamares/branding/` - Custom branding
|
||||||
|
|
||||||
|
## Installation Process
|
||||||
|
|
||||||
|
1. Boot from the ISO
|
||||||
|
2. Calamares installer launches automatically
|
||||||
|
3. User configures language, location, and user account
|
||||||
|
4. Installer partitions the disk and installs the atomic image
|
||||||
|
5. System reboots into the installed atomic desktop
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
|
||||||
|
This is Phase 2 of the roadmap. Future phases will include:
|
||||||
|
- Phase 3: Desktop environment and kernel modules
|
||||||
|
- Phase 4: Polish and distribution
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
The project uses:
|
||||||
|
- `live-build/` - Live ISO build configuration
|
||||||
|
- `calamares/` - Calamares installer configuration
|
||||||
|
- `justfile` - Build automation
|
||||||
|
- `scripts/` - Helper scripts for the build process
|
||||||
40
02-installer/calamares/branding/debian-atomic/branding.desc
Normal file
40
02-installer/calamares/branding/debian-atomic/branding.desc
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Debian Atomic Desktop - Calamares Branding
|
||||||
|
# Branding configuration for the installer
|
||||||
|
|
||||||
|
# General branding information
|
||||||
|
componentName: "Debian Atomic Desktop"
|
||||||
|
componentVersion: "Phase 2"
|
||||||
|
componentLogo: "debian-atomic-logo.png"
|
||||||
|
componentUrl: "https://github.com/your-username/debian-atomic-desktop"
|
||||||
|
componentAuthor: "Debian Atomic Desktop Project"
|
||||||
|
|
||||||
|
# Welcome page
|
||||||
|
welcome:
|
||||||
|
title: "Welcome to Debian Atomic Desktop"
|
||||||
|
subtitle: "A modern, atomic Debian-based desktop distribution"
|
||||||
|
showSupportUrl: true
|
||||||
|
showKnownIssuesUrl: true
|
||||||
|
showReleaseNotesUrl: true
|
||||||
|
|
||||||
|
# Product information
|
||||||
|
product:
|
||||||
|
name: "Debian Atomic Desktop"
|
||||||
|
version: "Phase 2"
|
||||||
|
shortName: "Debian Atomic"
|
||||||
|
shortVersion: "2.0"
|
||||||
|
bootloaderEntryName: "Debian Atomic Desktop"
|
||||||
|
productUrl: "https://github.com/your-username/debian-atomic-desktop"
|
||||||
|
supportUrl: "https://github.com/your-username/debian-atomic-desktop/issues"
|
||||||
|
knownIssuesUrl: "https://github.com/your-username/debian-atomic-desktop/wiki/Known-Issues"
|
||||||
|
releaseNotesUrl: "https://github.com/your-username/debian-atomic-desktop/releases"
|
||||||
|
|
||||||
|
# Slideshow
|
||||||
|
slideshow:
|
||||||
|
api: 1
|
||||||
|
path: "show.qml"
|
||||||
|
|
||||||
|
# Style
|
||||||
|
style:
|
||||||
|
sidebarBackground: "#2c3e50"
|
||||||
|
sidebarText: "#ecf0f1"
|
||||||
|
sidebarTextSelect: "#3498db"
|
||||||
56
02-installer/calamares/modules/partition.conf
Normal file
56
02-installer/calamares/modules/partition.conf
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Partitioning module configuration for Debian Atomic Desktop
|
||||||
|
# This configures how Calamares will partition the target disk
|
||||||
|
|
||||||
|
# Default partitioning scheme
|
||||||
|
defaultPartitionTableType: gpt
|
||||||
|
|
||||||
|
# Default file system types
|
||||||
|
defaultFileSystemType: ext4
|
||||||
|
defaultFsType: ext4
|
||||||
|
|
||||||
|
# Available file system types
|
||||||
|
availableFileSystemTypes:
|
||||||
|
- ext4
|
||||||
|
- btrfs
|
||||||
|
- xfs
|
||||||
|
- f2fs
|
||||||
|
|
||||||
|
# Partitioning schemes
|
||||||
|
partitionLayout:
|
||||||
|
# EFI system partition
|
||||||
|
- name: "EFI System Partition"
|
||||||
|
size: 512M
|
||||||
|
filesystem: vfat
|
||||||
|
mountPoint: /boot/efi
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
- esp
|
||||||
|
|
||||||
|
# Boot partition for bootc
|
||||||
|
- name: "Boot Partition"
|
||||||
|
size: 1G
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /boot
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
|
||||||
|
# Root partition (will be replaced by bootc)
|
||||||
|
- name: "Root Partition"
|
||||||
|
size: 100%
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /
|
||||||
|
flags:
|
||||||
|
- root
|
||||||
|
|
||||||
|
# Swap configuration
|
||||||
|
swap:
|
||||||
|
# Use swap file instead of partition
|
||||||
|
useSwapFile: true
|
||||||
|
swapFileSize: 4G
|
||||||
|
|
||||||
|
# Bootloader configuration
|
||||||
|
bootloader:
|
||||||
|
# Install bootloader to the first disk
|
||||||
|
installPath: /dev/sda
|
||||||
|
# Use systemd-boot for EFI
|
||||||
|
bootloader: systemd-boot
|
||||||
51
02-installer/calamares/modules/shellprocess.conf
Normal file
51
02-installer/calamares/modules/shellprocess.conf
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
# Shell process module configuration for Debian Atomic Desktop
|
||||||
|
# This handles the post-installation deployment of the atomic image
|
||||||
|
|
||||||
|
# Post-installation script to deploy atomic image
|
||||||
|
script:
|
||||||
|
# First, ensure bootc is available
|
||||||
|
- command: "which"
|
||||||
|
arguments:
|
||||||
|
- "bootc"
|
||||||
|
timeout: 30
|
||||||
|
|
||||||
|
# Deploy the atomic image using bootc
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Alternative: deploy from local image if available
|
||||||
|
- command: "podman"
|
||||||
|
arguments:
|
||||||
|
- "load"
|
||||||
|
- "-i"
|
||||||
|
- "/run/archivemount/atomic-image.tar"
|
||||||
|
timeout: 60
|
||||||
|
|
||||||
|
# Set up bootc configuration with proper error handling
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "localhost/debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
environment:
|
||||||
|
BOOTC_IMAGE: "debian-atomic:latest"
|
||||||
|
BOOTC_DEVICE: "/dev/sda"
|
||||||
|
BOOTC_VERSION: "1.5.1-1~noble1"
|
||||||
|
|
||||||
|
# Error handling
|
||||||
|
onError: "continue"
|
||||||
73
02-installer/calamares/settings.conf
Normal file
73
02-installer/calamares/settings.conf
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
# Debian Atomic Desktop - Calamares Settings
|
||||||
|
# Main configuration file for the Calamares installer
|
||||||
|
|
||||||
|
# General settings
|
||||||
|
general:
|
||||||
|
# Installer branding
|
||||||
|
branding: debian-atomic
|
||||||
|
|
||||||
|
# Installer behavior
|
||||||
|
prompt-install: false
|
||||||
|
dont-chroot: false
|
||||||
|
|
||||||
|
# System requirements
|
||||||
|
requirements:
|
||||||
|
check-enough-disk-space: true
|
||||||
|
required-storage: 8G
|
||||||
|
check-internet: false
|
||||||
|
|
||||||
|
# Display settings
|
||||||
|
display:
|
||||||
|
# Installer window
|
||||||
|
window-title: "Debian Atomic Desktop Installer"
|
||||||
|
window-icon: "debian-atomic"
|
||||||
|
|
||||||
|
# Welcome page
|
||||||
|
welcome:
|
||||||
|
show-support-url: true
|
||||||
|
show-known-issues-url: true
|
||||||
|
show-release-notes-url: true
|
||||||
|
|
||||||
|
# Module sequence for installation
|
||||||
|
sequence:
|
||||||
|
# Welcome and preparation
|
||||||
|
- show:
|
||||||
|
- welcome
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- partition
|
||||||
|
- users
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
- exec:
|
||||||
|
- partition
|
||||||
|
- mount
|
||||||
|
- unpackfs
|
||||||
|
- machineid
|
||||||
|
- fstab
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- localecfg
|
||||||
|
- luksbootkeyfile
|
||||||
|
- luksopenswaphookcfg
|
||||||
|
- initcpiocfg
|
||||||
|
- initcpio
|
||||||
|
- users
|
||||||
|
- displaymanager
|
||||||
|
- networkcfg
|
||||||
|
- hwclock
|
||||||
|
- services-systemd
|
||||||
|
- bootloader
|
||||||
|
- packages
|
||||||
|
- preservefiles
|
||||||
|
- removeuser
|
||||||
|
- shellprocess
|
||||||
|
- initramfs
|
||||||
|
- grubcfg
|
||||||
|
- bootloader
|
||||||
|
- postcfg
|
||||||
|
- umount
|
||||||
|
|
||||||
|
# Finish
|
||||||
|
- show:
|
||||||
|
- finished
|
||||||
2
02-installer/config/archives/lists/debian.list.chroot
Normal file
2
02-installer/config/archives/lists/debian.list.chroot
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
deb http://deb.debian.org/debian trixie main
|
||||||
|
deb http://deb.debian.org/debian trixie-updates main
|
||||||
13
02-installer/config/archives/live.list.chroot
Normal file
13
02-installer/config/archives/live.list.chroot
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Debian Atomic Desktop - Custom sources.list
|
||||||
|
# This file overrides the default sources.list to exclude the security repository
|
||||||
|
|
||||||
|
# Main Debian Trixie repository
|
||||||
|
deb http://deb.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb-src http://deb.debian.org/debian/ trixie main contrib non-free
|
||||||
|
|
||||||
|
# Debian Trixie updates
|
||||||
|
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
|
||||||
|
# Note: Security repository intentionally excluded for Debian Trixie
|
||||||
|
# as it's not yet available for this release
|
||||||
6
02-installer/config/archives/robojerk.list.chroot
Normal file
6
02-installer/config/archives/robojerk.list.chroot
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Repository configuration for robojerk packages (bootc)
|
||||||
|
# This provides the official Debian packages for atomic deployment tools
|
||||||
|
# Note: Using noble repository for bootc since we're building from Ubuntu Noble
|
||||||
|
# Temporarily disabled due to SSL certificate issues
|
||||||
|
|
||||||
|
# deb [signed-by=/etc/apt/keyrings/forgejo-robojerk.asc] https://git.raines.xyz/api/packages/robojerk/debian noble main
|
||||||
4
02-installer/config/archives/trixie.list.chroot
Normal file
4
02-installer/config/archives/trixie.list.chroot
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
deb https://ftp.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb-src https://ftp.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb https://ftp.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
deb-src https://ftp.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
55
02-installer/config/auto/config
Executable file
55
02-installer/config/auto/config
Executable file
|
|
@ -0,0 +1,55 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debian Atomic Desktop - Phase 2: Live Build Configuration
|
||||||
|
# This script configures live-build for creating the installer ISO
|
||||||
|
|
||||||
|
# Basic configuration
|
||||||
|
lb config \
|
||||||
|
--architectures amd64 \
|
||||||
|
--binary-images iso-hybrid \
|
||||||
|
--distribution trixie \
|
||||||
|
--mode debian \
|
||||||
|
--apt-recommends false \
|
||||||
|
--apt-secure false \
|
||||||
|
--bootappend-live "boot=live components username=debian-atomic hostname=debian-atomic" \
|
||||||
|
--bootloader syslinux \
|
||||||
|
--cache true \
|
||||||
|
--cache-packages true \
|
||||||
|
--checksums sha256 \
|
||||||
|
--compression gzip \
|
||||||
|
--debian-installer live \
|
||||||
|
--debian-installer-gui false \
|
||||||
|
--initramfs-compression gzip \
|
||||||
|
--iso-application "Debian Atomic Desktop Installer" \
|
||||||
|
--iso-publisher "Debian Atomic Desktop Project" \
|
||||||
|
--iso-volume "Debian Atomic Desktop" \
|
||||||
|
--linux-flavours amd64 \
|
||||||
|
--linux-packages linux-image \
|
||||||
|
--memtest none \
|
||||||
|
--security true \
|
||||||
|
--source false \
|
||||||
|
--updates true \
|
||||||
|
--verbose
|
||||||
|
|
||||||
|
# Additional packages for the live environment
|
||||||
|
echo "calamares" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "calamares-settings-debian" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "live-boot" >> config/package-lists/live-boot.list.chroot
|
||||||
|
echo "live-config" >> config/package-lists/live-config.list.chroot
|
||||||
|
echo "live-tools" >> config/package-lists/live-tools.list.chroot
|
||||||
|
echo "network-manager" >> config/package-lists/network.list.chroot
|
||||||
|
echo "network-manager-gnome" >> config/package-lists/network.list.chroot
|
||||||
|
echo "sudo" >> config/package-lists/admin.list.chroot
|
||||||
|
echo "curl" >> config/package-lists/tools.list.chroot
|
||||||
|
echo "wget" >> config/package-lists/tools.list.chroot
|
||||||
|
echo "vim" >> config/package-lists/tools.list.chroot
|
||||||
|
|
||||||
|
# Desktop environment (minimal for installer)
|
||||||
|
echo "task-xfce-desktop" >> config/package-lists/desktop.list.chroot
|
||||||
|
echo "lightdm" >> config/package-lists/desktop.list.chroot
|
||||||
|
echo "lightdm-gtk-greeter" >> config/package-lists/desktop.list.chroot
|
||||||
|
|
||||||
|
# Bootc and container tools
|
||||||
|
echo "bootc" >> config/package-lists/bootc.list.chroot
|
||||||
|
echo "podman" >> config/package-lists/bootc.list.chroot
|
||||||
|
echo "skopeo" >> config/package-lists/bootc.list.chroot
|
||||||
119
02-installer/config/binary
Normal file
119
02-installer/config/binary
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
# config/binary - options for live-build(7), binary stage
|
||||||
|
|
||||||
|
# Set image type
|
||||||
|
LB_IMAGE_TYPE="iso-hybrid"
|
||||||
|
|
||||||
|
# Set image filesystem
|
||||||
|
LB_BINARY_FILESYSTEM="fat16"
|
||||||
|
|
||||||
|
# Set apt/aptitude generic indices
|
||||||
|
LB_APT_INDICES="true"
|
||||||
|
|
||||||
|
# Set boot parameters
|
||||||
|
LB_BOOTAPPEND_LIVE="boot=live components quiet splash"
|
||||||
|
|
||||||
|
# Set boot parameters
|
||||||
|
LB_BOOTAPPEND_INSTALL=""
|
||||||
|
|
||||||
|
# Set boot parameters
|
||||||
|
LB_BOOTAPPEND_LIVE_FAILSAFE="boot=live components memtest noapic noapm nodma nomce nosmp nosplash vga=788"
|
||||||
|
|
||||||
|
# Set BIOS bootloader
|
||||||
|
LB_BOOTLOADER_BIOS="syslinux"
|
||||||
|
|
||||||
|
# Set EFI bootloader
|
||||||
|
LB_BOOTLOADER_EFI=""
|
||||||
|
|
||||||
|
# Set bootloaders
|
||||||
|
LB_BOOTLOADERS="syslinux"
|
||||||
|
|
||||||
|
# Set checksums
|
||||||
|
LB_CHECKSUMS="sha256 md5"
|
||||||
|
|
||||||
|
# Set compression
|
||||||
|
LB_COMPRESSION="xz"
|
||||||
|
|
||||||
|
# Support dm-verity on rootfs
|
||||||
|
LB_DM_VERITY=""
|
||||||
|
|
||||||
|
# Support FEC on dm-verity rootfs
|
||||||
|
LB_DM_VERITY_FEC_ROOTS=""
|
||||||
|
|
||||||
|
# Set sign script for roothash for dm-verity rootfs
|
||||||
|
LB_DM_VERITY_SIGN=""
|
||||||
|
|
||||||
|
# Set zsync
|
||||||
|
LB_ZSYNC="true"
|
||||||
|
|
||||||
|
# Control if we build binary images chrooted
|
||||||
|
# NEVER, *EVER*, *E*V*E*R* SET THIS OPTION to false.
|
||||||
|
LB_BUILD_WITH_CHROOT="true"
|
||||||
|
|
||||||
|
# Set debian-installer
|
||||||
|
LB_DEBIAN_INSTALLER="live"
|
||||||
|
|
||||||
|
# Set debian-installer suite
|
||||||
|
LB_DEBIAN_INSTALLER_DISTRIBUTION="trixie"
|
||||||
|
|
||||||
|
# Set debian-installer preseed filename/url
|
||||||
|
LB_DEBIAN_INSTALLER_PRESEEDFILE=""
|
||||||
|
|
||||||
|
# Toggle use of GUI debian-installer
|
||||||
|
LB_DEBIAN_INSTALLER_GUI="true"
|
||||||
|
|
||||||
|
# Set hdd label
|
||||||
|
LB_HDD_LABEL="DEBIAN_LIVE"
|
||||||
|
|
||||||
|
# Set hdd filesystem size
|
||||||
|
LB_HDD_SIZE="10000"
|
||||||
|
|
||||||
|
# Set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout.
|
||||||
|
LB_HDD_PARTITION_START=""
|
||||||
|
|
||||||
|
# Set iso author
|
||||||
|
LB_ISO_APPLICATION="Debian Atomic Desktop Installer"
|
||||||
|
|
||||||
|
# Set iso preparer
|
||||||
|
LB_ISO_PREPARER="live-build 3.0~a57-1; http://packages.qa.debian.org/live-build"
|
||||||
|
|
||||||
|
# Set iso publisher
|
||||||
|
LB_ISO_PUBLISHER="Debian Atomic Desktop Project"
|
||||||
|
|
||||||
|
# Set iso volume (max 32 chars)
|
||||||
|
LB_ISO_VOLUME="Debian Atomic Desktop"
|
||||||
|
|
||||||
|
# Set jffs2 eraseblock size
|
||||||
|
LB_JFFS2_ERASEBLOCK=""
|
||||||
|
|
||||||
|
# Set memtest
|
||||||
|
LB_MEMTEST="memtest86+"
|
||||||
|
|
||||||
|
# Set loadlin
|
||||||
|
LB_LOADLIN="true"
|
||||||
|
|
||||||
|
# Set win32-loader
|
||||||
|
LB_WIN32_LOADER="false"
|
||||||
|
|
||||||
|
# Set net tarball
|
||||||
|
LB_NET_TARBALL="true"
|
||||||
|
|
||||||
|
# Set onie
|
||||||
|
LB_ONIE="false"
|
||||||
|
|
||||||
|
# Set onie additional kernel cmdline options
|
||||||
|
LB_ONIE_KERNEL_CMDLINE=""
|
||||||
|
|
||||||
|
# Set inclusion of firmware packages in debian-installer
|
||||||
|
LB_FIRMWARE_BINARY="true"
|
||||||
|
|
||||||
|
# Set inclusion of firmware packages in the live image
|
||||||
|
LB_FIRMWARE_CHROOT="true"
|
||||||
|
|
||||||
|
# Set swap file path
|
||||||
|
LB_SWAP_FILE_PATH=""
|
||||||
|
|
||||||
|
# Set swap file size
|
||||||
|
LB_SWAP_FILE_SIZE="512"
|
||||||
|
|
||||||
|
# Enable/disable UEFI secure boot support
|
||||||
|
LB_UEFI_SECURE_BOOT="auto"
|
||||||
76
02-installer/config/bootstrap
Normal file
76
02-installer/config/bootstrap
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# config/bootstrap - options for live-build(7), bootstrap stage
|
||||||
|
|
||||||
|
# Select architecture to use
|
||||||
|
LB_ARCHITECTURE="amd64"
|
||||||
|
|
||||||
|
# Select distribution to use
|
||||||
|
LB_DISTRIBUTION="trixie"
|
||||||
|
|
||||||
|
# Select parent distribution to use
|
||||||
|
LB_PARENT_DISTRIBUTION="trixie"
|
||||||
|
|
||||||
|
# Select distribution to use in the chroot
|
||||||
|
LB_DISTRIBUTION_CHROOT="trixie"
|
||||||
|
|
||||||
|
# Select parent distribution to use in the chroot
|
||||||
|
LB_PARENT_DISTRIBUTION_CHROOT="trixie"
|
||||||
|
|
||||||
|
# Select distribution to use in the final image
|
||||||
|
LB_DISTRIBUTION_BINARY="trixie"
|
||||||
|
|
||||||
|
# Select parent distribution to use in the final image
|
||||||
|
LB_PARENT_DISTRIBUTION_BINARY="trixie"
|
||||||
|
|
||||||
|
# Select parent distribution for debian-installer to use
|
||||||
|
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="trixie"
|
||||||
|
|
||||||
|
# Select archive areas to use
|
||||||
|
LB_ARCHIVE_AREAS="main"
|
||||||
|
|
||||||
|
# Select parent archive areas to use
|
||||||
|
LB_PARENT_ARCHIVE_AREAS="main"
|
||||||
|
|
||||||
|
# Set parent mirror to bootstrap from
|
||||||
|
LB_PARENT_MIRROR_BOOTSTRAP="http://deb.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set parent mirror to fetch packages from
|
||||||
|
LB_PARENT_MIRROR_CHROOT="http://deb.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set security parent mirror to fetch packages from
|
||||||
|
LB_PARENT_MIRROR_CHROOT_SECURITY="http://security.debian.org/"
|
||||||
|
|
||||||
|
# Set parent mirror which ends up in the image
|
||||||
|
LB_PARENT_MIRROR_BINARY="http://cdn.debian.net/debian/"
|
||||||
|
|
||||||
|
# Set security parent mirror which ends up in the image
|
||||||
|
LB_PARENT_MIRROR_BINARY_SECURITY="http://security.debian.org/"
|
||||||
|
|
||||||
|
# Set debian-installer parent mirror
|
||||||
|
LB_PARENT_MIRROR_DEBIAN_INSTALLER="http://deb.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set mirror to bootstrap from
|
||||||
|
LB_MIRROR_BOOTSTRAP="https://ftp.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set mirror to fetch packages from
|
||||||
|
LB_MIRROR_CHROOT="https://ftp.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set security mirror to fetch packages from
|
||||||
|
LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/"
|
||||||
|
|
||||||
|
# Set mirror which ends up in the image
|
||||||
|
LB_MIRROR_BINARY="http://deb.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set security mirror which ends up in the image
|
||||||
|
LB_MIRROR_BINARY_SECURITY="http://security.debian.org/"
|
||||||
|
|
||||||
|
# Set debian-installer mirror
|
||||||
|
LB_MIRROR_DEBIAN_INSTALLER="http://deb.debian.org/debian/"
|
||||||
|
|
||||||
|
# Set architectures to use foreign bootstrap
|
||||||
|
LB_BOOTSTRAP_QEMU_ARCHITECTURE=""
|
||||||
|
|
||||||
|
# Set packages to exclude during foreign bootstrap
|
||||||
|
LB_BOOTSTRAP_QEMU_EXCLUDE=""
|
||||||
|
|
||||||
|
# Set static qemu binary for foreign bootstrap
|
||||||
|
LB_BOOTSTRAP_QEMU_STATIC=""
|
||||||
37
02-installer/config/chroot
Normal file
37
02-installer/config/chroot
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# config/chroot - options for live-build(7), chroot stage
|
||||||
|
|
||||||
|
# Set chroot filesystem
|
||||||
|
LB_CHROOT_FILESYSTEM="squashfs"
|
||||||
|
|
||||||
|
# Set chroot squashfs compression level
|
||||||
|
LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL=""
|
||||||
|
|
||||||
|
# Set chroot squashfs compression type
|
||||||
|
LB_CHROOT_SQUASHFS_COMPRESSION_TYPE=""
|
||||||
|
|
||||||
|
# Set union filesystem
|
||||||
|
LB_UNION_FILESYSTEM="aufs"
|
||||||
|
|
||||||
|
# Set interactive build
|
||||||
|
LB_INTERACTIVE="false"
|
||||||
|
|
||||||
|
# Set keyring packages
|
||||||
|
LB_KEYRING_PACKAGES="debian-archive-keyring"
|
||||||
|
|
||||||
|
# Set kernel flavour to use (with arch)
|
||||||
|
LB_LINUX_FLAVOURS_WITH_ARCH="amd64"
|
||||||
|
|
||||||
|
# Set kernel packages to use
|
||||||
|
LB_LINUX_PACKAGES="linux-image"
|
||||||
|
|
||||||
|
# Enable security updates
|
||||||
|
LB_SECURITY="false"
|
||||||
|
|
||||||
|
# Enable updates updates
|
||||||
|
LB_UPDATES="true"
|
||||||
|
|
||||||
|
# Enable backports updates
|
||||||
|
LB_BACKPORTS="false"
|
||||||
|
|
||||||
|
# Enable proposed updates
|
||||||
|
LB_PROPOSED_UPDATES="false"
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Debian Atomic Desktop - Custom sources.list
|
||||||
|
# This file overrides the default sources.list to exclude the security repository
|
||||||
|
|
||||||
|
# Main Debian Trixie repository
|
||||||
|
deb http://deb.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb-src http://deb.debian.org/debian/ trixie main contrib non-free
|
||||||
|
|
||||||
|
# Debian Trixie updates
|
||||||
|
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
|
||||||
|
# Note: Security repository intentionally excluded for Debian Trixie
|
||||||
|
# as it's not yet available for this release
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Security repository disabled for Debian Trixie
|
||||||
|
# This file prevents live-build from adding the security repository
|
||||||
|
# which is not yet available for Debian Trixie
|
||||||
102
02-installer/config/common
Normal file
102
02-installer/config/common
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
# config/common - common options for live-build(7)
|
||||||
|
|
||||||
|
# Version of live-build used to build config (config format version)
|
||||||
|
LB_CONFIGURATION_VERSION="20250505"
|
||||||
|
|
||||||
|
# Set package manager
|
||||||
|
LB_APT="apt"
|
||||||
|
|
||||||
|
# Set proxy for HTTP connections
|
||||||
|
LB_APT_HTTP_PROXY=""
|
||||||
|
|
||||||
|
# Set apt/aptitude pipeline depth
|
||||||
|
LB_APT_PIPELINE=""
|
||||||
|
|
||||||
|
# Set apt/aptitude recommends
|
||||||
|
LB_APT_RECOMMENDS="false"
|
||||||
|
|
||||||
|
# Set apt/aptitude security
|
||||||
|
LB_APT_SECURE="true"
|
||||||
|
|
||||||
|
# Set apt/aptitude source entries in sources.list
|
||||||
|
LB_APT_SOURCE_ARCHIVES="true"
|
||||||
|
|
||||||
|
# Control cache
|
||||||
|
LB_CACHE="true"
|
||||||
|
|
||||||
|
# Control if downloaded package indices should be cached
|
||||||
|
LB_CACHE_INDICES="false"
|
||||||
|
|
||||||
|
# Control if downloaded packages files should be cached
|
||||||
|
LB_CACHE_PACKAGES="true"
|
||||||
|
|
||||||
|
# Control if completed stages should be cached
|
||||||
|
LB_CACHE_STAGES="bootstrap"
|
||||||
|
|
||||||
|
# Set debconf(1) frontend to use
|
||||||
|
LB_DEBCONF_FRONTEND="noninteractive"
|
||||||
|
|
||||||
|
# Set debconf(1) priority to use
|
||||||
|
LB_DEBCONF_PRIORITY="critical"
|
||||||
|
|
||||||
|
# Set initramfs hook
|
||||||
|
LB_INITRAMFS="live-boot"
|
||||||
|
|
||||||
|
# Set initramfs compression
|
||||||
|
LB_INITRAMFS_COMPRESSION="gzip"
|
||||||
|
|
||||||
|
# Set init system
|
||||||
|
LB_INITSYSTEM="sysvinit"
|
||||||
|
|
||||||
|
# Set distribution mode
|
||||||
|
LB_MODE="debian"
|
||||||
|
|
||||||
|
# Set system type
|
||||||
|
LB_SYSTEM="live"
|
||||||
|
|
||||||
|
# Set base name of the image
|
||||||
|
LB_IMAGE_NAME="live-image"
|
||||||
|
|
||||||
|
# Set options to use with apt
|
||||||
|
APT_OPTIONS="--option Acquire::IndexTargets::deb-src::Contents-deb::DefaultEnabled=false"
|
||||||
|
|
||||||
|
# Set options to use with aptitude
|
||||||
|
APTITUDE_OPTIONS="--assume-yes"
|
||||||
|
|
||||||
|
# Set options to use with debootstrap
|
||||||
|
DEBOOTSTRAP_OPTIONS=""
|
||||||
|
|
||||||
|
# Set script to use with debootstrap
|
||||||
|
DEBOOTSTRAP_SCRIPT=""
|
||||||
|
|
||||||
|
# Set options to use with gzip
|
||||||
|
GZIP_OPTIONS="-6 --rsyncable"
|
||||||
|
|
||||||
|
# Enable UTC timestamps
|
||||||
|
LB_UTC_TIME="false"
|
||||||
|
|
||||||
|
# live-build options
|
||||||
|
|
||||||
|
# Enable breakpoints
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_BREAKPOINTS="false"
|
||||||
|
|
||||||
|
# Enable debug
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_DEBUG="false"
|
||||||
|
|
||||||
|
# Enable color
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_COLOR="auto"
|
||||||
|
|
||||||
|
# Enable force
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_FORCE="false"
|
||||||
|
|
||||||
|
# Enable quiet
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_QUIET="false"
|
||||||
|
|
||||||
|
# Enable verbose
|
||||||
|
# If set here, overrides the command line option
|
||||||
|
#_VERBOSE="true"
|
||||||
11
02-installer/config/hooks/00-force-apt-fix.bootstrap
Executable file
11
02-installer/config/hooks/00-force-apt-fix.bootstrap
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
echo "Forcing mirror to https://ftp.debian.org/debian/ and fixing apt issues in bootstrap stage..."
|
||||||
|
cat > /etc/apt/sources.list << "EOF_SOURCES"
|
||||||
|
deb https://ftp.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb-src https://ftp.debian.org/debian/ trixie main contrib non-free
|
||||||
|
deb https://ftp.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
deb-src https://ftp.debian.org/debian/ trixie-updates main contrib non-free
|
||||||
|
EOF_SOURCES
|
||||||
|
echo "Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled \"false\";" > /etc/apt/apt.conf.d/99-disable-contents
|
||||||
|
echo "Bootstrap sources.list forced and Contents disabled successfully."
|
||||||
5
02-installer/config/hooks/01-disable-contents.chroot
Executable file
5
02-installer/config/hooks/01-disable-contents.chroot
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
echo "Disabling Contents downloads in chroot stage..."
|
||||||
|
echo "Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled \"false\";" > /etc/apt/apt.conf.d/99-disable-contents
|
||||||
|
echo "Contents downloads disabled in chroot stage."
|
||||||
9
02-installer/config/hooks/01-prevent-sysvinit.bootstrap
Executable file
9
02-installer/config/hooks/01-prevent-sysvinit.bootstrap
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
echo "Preventing sysvinit packages from being installed..."
|
||||||
|
echo "Package: sysvinit-core" > /etc/apt/preferences.d/99-sysvinit
|
||||||
|
echo "Pin: release *" >> /etc/apt/preferences.d/99-sysvinit
|
||||||
|
echo "Pin-Priority: -1" >> /etc/apt/preferences.d/99-sysvinit
|
||||||
|
echo "Package: initscripts" >> /etc/apt/preferences.d/99-sysvinit
|
||||||
|
echo "Pin: release *" >> /etc/apt/preferences.d/99-sysvinit
|
||||||
|
echo "Pin-Priority: -1" >> /etc/apt/preferences.d/99-sysvinit
|
||||||
17
02-installer/config/hooks/02-calamares-autostart.chroot
Executable file
17
02-installer/config/hooks/02-calamares-autostart.chroot
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
cat > /etc/systemd/system/calamares-autostart.service << "EOF2"
|
||||||
|
[Unit]
|
||||||
|
Description=Starts the Calamares installer on boot
|
||||||
|
Wants=graphical.target
|
||||||
|
After=graphical.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/calamares
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
||||||
|
EOF2
|
||||||
|
systemctl enable calamares-autostart.service
|
||||||
4
02-installer/config/hooks/03-remove-conflicting-packages.chroot
Executable file
4
02-installer/config/hooks/03-remove-conflicting-packages.chroot
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
echo "Removing conflicting sysvinit packages..."
|
||||||
|
apt-get remove --purge -y sysvinit-core initscripts sysv-rc || true
|
||||||
1
02-installer/config/hooks/04-force-systemd.chroot
Normal file
1
02-installer/config/hooks/04-force-systemd.chroot
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/live/0010-disable-kexec-tools.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/1000-create-mtab-symlink.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/1010-enable-cryptsetup.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/1020-create-locales-files.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5000-update-apt-file-cache.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5010-update-apt-xapian-index.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5020-update-glx-alternative.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5030-update-plocate-database.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5040-update-nvidia-alternative.hook.chroot
|
||||||
1
02-installer/config/hooks/normal/5050-dracut.hook.chroot
Symbolic link
1
02-installer/config/hooks/normal/5050-dracut.hook.chroot
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/5050-dracut.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8000-remove-adjtime-configuration.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8010-remove-backup-files.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8020-remove-dbus-machine-id.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8030-truncate-log-files.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8040-remove-mdadm-configuration.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8060-remove-systemd-machine-id.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8070-remove-temporary-files.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8080-reproducible-glibc.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/9010-remove-python-pyc.hook.chroot
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/live/build/hooks/normal/9020-remove-man-cache.hook.chroot
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Debian Atomic Desktop - Calamares Branding
|
||||||
|
# Branding configuration for the installer
|
||||||
|
|
||||||
|
# General branding information
|
||||||
|
componentName: "Debian Atomic Desktop"
|
||||||
|
componentVersion: "Phase 2"
|
||||||
|
componentLogo: "debian-atomic-logo.png"
|
||||||
|
componentUrl: "https://github.com/your-username/debian-atomic-desktop"
|
||||||
|
componentAuthor: "Debian Atomic Desktop Project"
|
||||||
|
|
||||||
|
# Welcome page
|
||||||
|
welcome:
|
||||||
|
title: "Welcome to Debian Atomic Desktop"
|
||||||
|
subtitle: "A modern, atomic Debian-based desktop distribution"
|
||||||
|
showSupportUrl: true
|
||||||
|
showKnownIssuesUrl: true
|
||||||
|
showReleaseNotesUrl: true
|
||||||
|
|
||||||
|
# Product information
|
||||||
|
product:
|
||||||
|
name: "Debian Atomic Desktop"
|
||||||
|
version: "Phase 2"
|
||||||
|
shortName: "Debian Atomic"
|
||||||
|
shortVersion: "2.0"
|
||||||
|
bootloaderEntryName: "Debian Atomic Desktop"
|
||||||
|
productUrl: "https://github.com/your-username/debian-atomic-desktop"
|
||||||
|
supportUrl: "https://github.com/your-username/debian-atomic-desktop/issues"
|
||||||
|
knownIssuesUrl: "https://github.com/your-username/debian-atomic-desktop/wiki/Known-Issues"
|
||||||
|
releaseNotesUrl: "https://github.com/your-username/debian-atomic-desktop/releases"
|
||||||
|
|
||||||
|
# Slideshow
|
||||||
|
slideshow:
|
||||||
|
api: 1
|
||||||
|
path: "show.qml"
|
||||||
|
|
||||||
|
# Style
|
||||||
|
style:
|
||||||
|
sidebarBackground: "#2c3e50"
|
||||||
|
sidebarText: "#ecf0f1"
|
||||||
|
sidebarTextSelect: "#3498db"
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Partitioning module configuration for Debian Atomic Desktop
|
||||||
|
# This configures how Calamares will partition the target disk
|
||||||
|
|
||||||
|
# Default partitioning scheme
|
||||||
|
defaultPartitionTableType: gpt
|
||||||
|
|
||||||
|
# Default file system types
|
||||||
|
defaultFileSystemType: ext4
|
||||||
|
defaultFsType: ext4
|
||||||
|
|
||||||
|
# Available file system types
|
||||||
|
availableFileSystemTypes:
|
||||||
|
- ext4
|
||||||
|
- btrfs
|
||||||
|
- xfs
|
||||||
|
- f2fs
|
||||||
|
|
||||||
|
# Partitioning schemes
|
||||||
|
partitionLayout:
|
||||||
|
# EFI system partition
|
||||||
|
- name: "EFI System Partition"
|
||||||
|
size: 512M
|
||||||
|
filesystem: vfat
|
||||||
|
mountPoint: /boot/efi
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
- esp
|
||||||
|
|
||||||
|
# Boot partition for bootc
|
||||||
|
- name: "Boot Partition"
|
||||||
|
size: 1G
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /boot
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
|
||||||
|
# Root partition (will be replaced by bootc)
|
||||||
|
- name: "Root Partition"
|
||||||
|
size: 100%
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /
|
||||||
|
flags:
|
||||||
|
- root
|
||||||
|
|
||||||
|
# Swap configuration
|
||||||
|
swap:
|
||||||
|
# Use swap file instead of partition
|
||||||
|
useSwapFile: true
|
||||||
|
swapFileSize: 4G
|
||||||
|
|
||||||
|
# Bootloader configuration
|
||||||
|
bootloader:
|
||||||
|
# Install bootloader to the first disk
|
||||||
|
installPath: /dev/sda
|
||||||
|
# Use systemd-boot for EFI
|
||||||
|
bootloader: systemd-boot
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
# Shell process module configuration for Debian Atomic Desktop
|
||||||
|
# This handles the post-installation deployment of the atomic image
|
||||||
|
|
||||||
|
# Post-installation script to deploy atomic image
|
||||||
|
script:
|
||||||
|
# First, ensure bootc is available
|
||||||
|
- command: "which"
|
||||||
|
arguments:
|
||||||
|
- "bootc"
|
||||||
|
timeout: 30
|
||||||
|
|
||||||
|
# Deploy the atomic image using bootc
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Alternative: deploy from local image if available
|
||||||
|
- command: "podman"
|
||||||
|
arguments:
|
||||||
|
- "load"
|
||||||
|
- "-i"
|
||||||
|
- "/run/archivemount/atomic-image.tar"
|
||||||
|
timeout: 60
|
||||||
|
|
||||||
|
# Set up bootc configuration with proper error handling
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "localhost/debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
environment:
|
||||||
|
BOOTC_IMAGE: "debian-atomic:latest"
|
||||||
|
BOOTC_DEVICE: "/dev/sda"
|
||||||
|
BOOTC_VERSION: "1.5.1-1~noble1"
|
||||||
|
|
||||||
|
# Error handling
|
||||||
|
onError: "continue"
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
# Debian Atomic Desktop - Calamares Settings
|
||||||
|
# Main configuration file for the Calamares installer
|
||||||
|
|
||||||
|
# General settings
|
||||||
|
general:
|
||||||
|
# Installer branding
|
||||||
|
branding: debian-atomic
|
||||||
|
|
||||||
|
# Installer behavior
|
||||||
|
prompt-install: false
|
||||||
|
dont-chroot: false
|
||||||
|
|
||||||
|
# System requirements
|
||||||
|
requirements:
|
||||||
|
check-enough-disk-space: true
|
||||||
|
required-storage: 8G
|
||||||
|
check-internet: false
|
||||||
|
|
||||||
|
# Display settings
|
||||||
|
display:
|
||||||
|
# Installer window
|
||||||
|
window-title: "Debian Atomic Desktop Installer"
|
||||||
|
window-icon: "debian-atomic"
|
||||||
|
|
||||||
|
# Welcome page
|
||||||
|
welcome:
|
||||||
|
show-support-url: true
|
||||||
|
show-known-issues-url: true
|
||||||
|
show-release-notes-url: true
|
||||||
|
|
||||||
|
# Module sequence for installation
|
||||||
|
sequence:
|
||||||
|
# Welcome and preparation
|
||||||
|
- show:
|
||||||
|
- welcome
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- partition
|
||||||
|
- users
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
- exec:
|
||||||
|
- partition
|
||||||
|
- mount
|
||||||
|
- unpackfs
|
||||||
|
- machineid
|
||||||
|
- fstab
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- localecfg
|
||||||
|
- luksbootkeyfile
|
||||||
|
- luksopenswaphookcfg
|
||||||
|
- initcpiocfg
|
||||||
|
- initcpio
|
||||||
|
- users
|
||||||
|
- displaymanager
|
||||||
|
- networkcfg
|
||||||
|
- hwclock
|
||||||
|
- services-systemd
|
||||||
|
- bootloader
|
||||||
|
- packages
|
||||||
|
- preservefiles
|
||||||
|
- removeuser
|
||||||
|
- shellprocess
|
||||||
|
- initramfs
|
||||||
|
- grubcfg
|
||||||
|
- bootloader
|
||||||
|
- postcfg
|
||||||
|
- umount
|
||||||
|
|
||||||
|
# Finish
|
||||||
|
- show:
|
||||||
|
- finished
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
[SeatDefaults]
|
||||||
|
autologin-user=debian-atomic
|
||||||
|
autologin-user-timeout=0
|
||||||
|
autologin-session=xfce
|
||||||
|
session-setup-script=/usr/local/bin/start-calamares
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Debian Atomic Desktop Installer
|
||||||
|
Name[en_US]=Debian Atomic Desktop Installer
|
||||||
|
Comment=Install Debian Atomic Desktop
|
||||||
|
Comment[en_US]=Install Debian Atomic Desktop
|
||||||
|
Exec=calamares
|
||||||
|
Icon=system-software-install
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;
|
||||||
|
X-GNOME-Autostart-enabled=true
|
||||||
36
02-installer/config/package-lists/bootc.list.chroot
Normal file
36
02-installer/config/package-lists/bootc.list.chroot
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
# OSTree packages for Debian Atomic Desktop
|
||||||
|
# These packages provide the core atomic filesystem functionality
|
||||||
|
|
||||||
|
# OSTree packages (from official Debian Trixie repositories - 2025.2-1)
|
||||||
|
ostree
|
||||||
|
ostree-boot
|
||||||
|
libostree-1-1
|
||||||
|
|
||||||
|
# Container tools (will add bootc later)
|
||||||
|
podman
|
||||||
|
skopeo
|
||||||
|
|
||||||
|
# Core dependencies (as listed in bootc package dependencies)
|
||||||
|
libc6
|
||||||
|
libgcc-s1
|
||||||
|
libglib2.0-0t64
|
||||||
|
libssl3t64
|
||||||
|
libzstd1
|
||||||
|
zlib1g
|
||||||
|
systemd
|
||||||
|
|
||||||
|
# OSTree dependencies (from official Debian package information)
|
||||||
|
libarchive13t64
|
||||||
|
libavahi-client3
|
||||||
|
libavahi-common3
|
||||||
|
libavahi-glib1
|
||||||
|
libcurl3t64-gnutls
|
||||||
|
libgpgme11t64
|
||||||
|
libfuse3-4
|
||||||
|
libgpg-error0
|
||||||
|
liblzma5
|
||||||
|
libselinux1
|
||||||
|
libsystemd0
|
||||||
|
|
||||||
|
# Note: bootc package temporarily disabled due to repository SSL issues
|
||||||
|
# Will be added back once repository access is resolved
|
||||||
10
02-installer/config/package-lists/calamares.list.chroot
Normal file
10
02-installer/config/package-lists/calamares.list.chroot
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
calamares
|
||||||
|
network-manager
|
||||||
|
sudo
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
vim
|
||||||
|
task-xfce-desktop
|
||||||
|
lightdm
|
||||||
|
podman
|
||||||
|
skopeo
|
||||||
3
02-installer/config/package-lists/exclude.list.chroot
Normal file
3
02-installer/config/package-lists/exclude.list.chroot
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
sysvinit-core
|
||||||
|
initscripts
|
||||||
|
sysv-rc
|
||||||
4
02-installer/config/package-lists/live.list.chroot
Normal file
4
02-installer/config/package-lists/live.list.chroot
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
live-boot
|
||||||
|
live-config
|
||||||
|
live-config-sysvinit
|
||||||
|
sysvinit-core
|
||||||
23
02-installer/config/package-lists/system-deps.list.chroot
Normal file
23
02-installer/config/package-lists/system-deps.list.chroot
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Core system dependencies for Debian Atomic Desktop
|
||||||
|
# These packages must be installed before bootc and ostree
|
||||||
|
|
||||||
|
# Essential system libraries
|
||||||
|
libc6
|
||||||
|
libgcc-s1
|
||||||
|
libglib2.0-0t64
|
||||||
|
libssl3t64
|
||||||
|
libzstd1
|
||||||
|
zlib1g
|
||||||
|
systemd
|
||||||
|
|
||||||
|
# Archive and compression libraries
|
||||||
|
libarchive13t64
|
||||||
|
|
||||||
|
# Network and communication libraries
|
||||||
|
libavahi-client3
|
||||||
|
libavahi-common3
|
||||||
|
libavahi-glib1
|
||||||
|
libcurl3t64-gnutls
|
||||||
|
|
||||||
|
# GPG and security libraries
|
||||||
|
libgpgme11t64
|
||||||
2
02-installer/config/package-lists/systemd.list.chroot
Normal file
2
02-installer/config/package-lists/systemd.list.chroot
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
systemd
|
||||||
|
systemd-sysv
|
||||||
7
02-installer/config/source
Normal file
7
02-installer/config/source
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# config/source - options for live-build(7), source stage
|
||||||
|
|
||||||
|
# Set source option
|
||||||
|
LB_SOURCE="false"
|
||||||
|
|
||||||
|
# Set image type
|
||||||
|
LB_SOURCE_IMAGES="tar"
|
||||||
161
02-installer/justfile
Normal file
161
02-installer/justfile
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
# justfile for creating a Debian "trixie" Calamares installer ISO.
|
||||||
|
# This file provides a full set of recipes for configuring, building,
|
||||||
|
# and testing the ISO. It assumes you have `just` and `live-build` installed.
|
||||||
|
|
||||||
|
# Variables for easy configuration.
|
||||||
|
DISTRIBUTION := "trixie"
|
||||||
|
ARCH := "amd64"
|
||||||
|
DEBIAN_MIRROR := "https://ftp.debian.org/debian/"
|
||||||
|
|
||||||
|
# To use apt-cacher-ng, uncomment the line below and set your proxy address.
|
||||||
|
# APT_CACHER_NG_PROXY := "http://172.19.0.2:3142"
|
||||||
|
APT_CACHER_NG_PROXY := ""
|
||||||
|
|
||||||
|
QEMU_ACCEL := "kvm"
|
||||||
|
|
||||||
|
# Default recipe that runs when you type `just`.
|
||||||
|
# It cleans up any previous build and then builds a new ISO.
|
||||||
|
default: build-iso
|
||||||
|
|
||||||
|
# List all available recipes in the justfile.
|
||||||
|
list:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# Show the current status of the live-build environment.
|
||||||
|
status:
|
||||||
|
@echo "P: Checking live-build status..."
|
||||||
|
@ls -la .build/ 2>/dev/null || echo "No .build directory found"
|
||||||
|
@ls -la binary/ 2>/dev/null || echo "No binary directory found"
|
||||||
|
|
||||||
|
# Initialize the live-build configuration. This is the first step.
|
||||||
|
init-live-build:
|
||||||
|
@echo "P: Initializing live-build configuration..."
|
||||||
|
@echo "P: Using standard mirror: {{DEBIAN_MIRROR}}"
|
||||||
|
sudo lb config \
|
||||||
|
--architectures {{ARCH}} \
|
||||||
|
--distribution {{DISTRIBUTION}} \
|
||||||
|
--binary-images iso-hybrid \
|
||||||
|
--iso-application "Debian Atomic Desktop Installer" \
|
||||||
|
--iso-publisher "Debian Atomic Desktop Project" \
|
||||||
|
--iso-volume "Debian Atomic Desktop" \
|
||||||
|
--debian-installer live \
|
||||||
|
--linux-flavours {{ARCH}} \
|
||||||
|
--bootloader syslinux \
|
||||||
|
--security false \
|
||||||
|
--verbose \
|
||||||
|
--apt-options "--option Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled=false" \
|
||||||
|
--apt-options "--option Acquire::IndexTargets::deb-src::Contents-deb::DefaultEnabled=false"
|
||||||
|
@echo "P: Creating bootstrap hook to force correct mirror and disable Contents..."
|
||||||
|
sudo mkdir -p config/hooks
|
||||||
|
sudo bash -c 'echo "#!/bin/bash" > config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "set -e" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "echo \"Forcing mirror to {{DEBIAN_MIRROR}} and fixing apt issues in bootstrap stage...\"" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "cat > /etc/apt/sources.list << \"EOF_SOURCES\"" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "deb {{DEBIAN_MIRROR}} trixie main contrib non-free" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "deb-src {{DEBIAN_MIRROR}} trixie main contrib non-free" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "deb {{DEBIAN_MIRROR}} trixie-updates main contrib non-free" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "deb-src {{DEBIAN_MIRROR}} trixie-updates main contrib non-free" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "EOF_SOURCES" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "echo \"Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled \\\"false\\\";\" > /etc/apt/apt.conf.d/99-disable-contents" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo bash -c 'echo "echo \"Bootstrap sources.list forced and Contents disabled successfully.\"" >> config/hooks/00-force-apt-fix.bootstrap'
|
||||||
|
sudo chmod +x config/hooks/00-force-apt-fix.bootstrap
|
||||||
|
@echo "P: Creating chroot hook as backup to disable Contents..."
|
||||||
|
sudo bash -c 'echo "#!/bin/bash" > config/hooks/01-disable-contents.chroot'
|
||||||
|
sudo bash -c 'echo "set -e" >> config/hooks/01-disable-contents.chroot'
|
||||||
|
sudo bash -c 'echo "echo \"Disabling Contents downloads in chroot stage...\"" >> config/hooks/01-disable-contents.chroot'
|
||||||
|
sudo bash -c 'echo "echo \"Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled \\\"false\\\";\" > /etc/apt/apt.conf.d/99-disable-contents" >> config/hooks/01-disable-contents.chroot'
|
||||||
|
sudo bash -c 'echo "echo \"Contents downloads disabled in chroot stage.\"" >> config/hooks/01-disable-contents.chroot'
|
||||||
|
sudo chmod +x config/hooks/01-disable-contents.chroot
|
||||||
|
@echo "P: Creating chroot package files..."
|
||||||
|
mkdir -p config/package-lists
|
||||||
|
echo "calamares" > config/package-lists/calamares.list.chroot
|
||||||
|
echo "network-manager" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "sudo" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "curl" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "wget" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "vim" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "task-xfce-desktop" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "lightdm" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "podman" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "skopeo" >> config/package-lists/calamares.list.chroot
|
||||||
|
@if [ -n "{{APT_CACHER_NG_PROXY}}" ]; then \
|
||||||
|
echo "P: Configuring apt-cacher-ng for chroot..."; \
|
||||||
|
mkdir -p config/chroot_local-setup; \
|
||||||
|
echo '#!/bin/sh' > config/chroot_local-setup/99-proxy; \
|
||||||
|
echo 'set -e' >> config/chroot_local-setup/99-proxy; \
|
||||||
|
echo 'echo "Acquire::http::Proxy \"{{APT_CACHER_NG_PROXY}}\";" > /etc/apt/apt.conf.d/99proxy' >> config/chroot_local-setup/99-proxy; \
|
||||||
|
chmod +x config/chroot_local-setup/99-proxy; \
|
||||||
|
fi
|
||||||
|
@echo "P: Creating Calamares autostart hook..."
|
||||||
|
sudo bash -c 'echo "#!/bin/sh" > config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "set -e" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "cat > /etc/systemd/system/calamares-autostart.service << \"EOF2\"" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "[Unit]" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "Description=Starts the Calamares installer on boot" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "Wants=graphical.target" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "After=graphical.target" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "[Service]" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "Type=simple" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "ExecStart=/usr/bin/calamares" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "Restart=no" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "[Install]" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "WantedBy=graphical.target" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "EOF2" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo bash -c 'echo "systemctl enable calamares-autostart.service" >> config/hooks/02-calamares-autostart.chroot'
|
||||||
|
sudo chmod +x config/hooks/02-calamares-autostart.chroot
|
||||||
|
@echo "P: Live-build initialized and chroot files created."
|
||||||
|
|
||||||
|
# Update the live-build configuration.
|
||||||
|
update-config:
|
||||||
|
@echo "P: Updating live-build configuration..."
|
||||||
|
just clean-iso
|
||||||
|
just init-live-build
|
||||||
|
|
||||||
|
# Build the bootable ISO with the Calamares installer.
|
||||||
|
# This recipe depends on a clean environment and a valid configuration.
|
||||||
|
build-iso: clean-all init-live-build
|
||||||
|
@echo "P: Starting the live-build process..."
|
||||||
|
sudo lb build
|
||||||
|
@echo "P: Build complete. The ISO should be in the current directory."
|
||||||
|
|
||||||
|
# Build with verbose debug output.
|
||||||
|
build-iso-debug: clean-all init-live-build
|
||||||
|
@echo "P: Starting the live-build process with verbose output..."
|
||||||
|
sudo lb build --verbose
|
||||||
|
@echo "P: Build complete. The ISO should be in the current directory."
|
||||||
|
|
||||||
|
# Test the generated ISO in QEMU with console only.
|
||||||
|
test-iso:
|
||||||
|
@echo "P: Testing ISO in QEMU..."
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-enable-kvm \
|
||||||
|
-m 2G \
|
||||||
|
-cdrom live-image-{{ARCH}}.hybrid.iso \
|
||||||
|
-serial mon:stdio \
|
||||||
|
-nographic
|
||||||
|
|
||||||
|
# Test the generated ISO in QEMU with a graphical window.
|
||||||
|
test-iso-gui:
|
||||||
|
@echo "P: Testing ISO in QEMU with GUI..."
|
||||||
|
qemu-system-x86_64 \
|
||||||
|
-enable-kvm \
|
||||||
|
-m 4G \
|
||||||
|
-smp 2 \
|
||||||
|
-vga virtio \
|
||||||
|
-display sdl,gl=on \
|
||||||
|
-cdrom live-image-{{ARCH}}.hybrid.iso
|
||||||
|
|
||||||
|
# Clean up only the ISO build artifacts, keeping the chroot cache.
|
||||||
|
clean-iso:
|
||||||
|
@echo "P: Cleaning ISO build artifacts..."
|
||||||
|
sudo lb clean --binary
|
||||||
|
|
||||||
|
# Clean all build artifacts, including the chroot and caches.
|
||||||
|
clean-all:
|
||||||
|
@echo "P: Cleaning all build artifacts..."
|
||||||
|
sudo lb clean --purge
|
||||||
|
|
||||||
|
# Help recipe (just a duplicate of --list)
|
||||||
|
help: list
|
||||||
11
02-installer/lb_resources.md
Normal file
11
02-installer/lb_resources.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
https://code.tools/man/1/lb_config/
|
||||||
|
https://manpages.debian.org/unstable/live-build/live-build.7.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/the-basics.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/overview-of-tools.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/managing-a-configuration.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customization-overview.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-package-installation.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-contents.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-run-time-behaviours.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-binary.en.html
|
||||||
|
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-installer.en.html
|
||||||
57
02-installer/live-build/auto/config
Executable file
57
02-installer/live-build/auto/config
Executable file
|
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debian Atomic Desktop - Phase 2: Live Build Configuration
|
||||||
|
# This script configures live-build for creating the installer ISO
|
||||||
|
|
||||||
|
# Basic configuration
|
||||||
|
lb config \
|
||||||
|
--architectures amd64 \
|
||||||
|
--binary-images iso-hybrid \
|
||||||
|
--distribution trixie \
|
||||||
|
--mode debian \
|
||||||
|
--apt-recommends false \
|
||||||
|
--apt-secure false \
|
||||||
|
--bootappend-live "boot=live components username=debian-atomic hostname=debian-atomic" \
|
||||||
|
--bootloader syslinux \
|
||||||
|
--cache true \
|
||||||
|
--cache-packages true \
|
||||||
|
--checksums sha256 \
|
||||||
|
--compression gzip \
|
||||||
|
--debian-installer live \
|
||||||
|
--debian-installer-gui false \
|
||||||
|
--initramfs-compression gzip \
|
||||||
|
--iso-application "Debian Atomic Desktop Installer" \
|
||||||
|
--iso-publisher "Debian Atomic Desktop Project" \
|
||||||
|
--iso-volume "Debian Atomic Desktop" \
|
||||||
|
--linux-flavours amd64 \
|
||||||
|
--linux-packages linux-image \
|
||||||
|
--memtest none \
|
||||||
|
--security false \
|
||||||
|
--source false \
|
||||||
|
--updates true \
|
||||||
|
--verbose \
|
||||||
|
--mirror-bootstrap "http://deb.debian.org/debian/" \
|
||||||
|
--mirror-chroot "http://deb.debian.org/debian/" \
|
||||||
|
--apt-options "--allow-unauthenticated --option Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled=false"
|
||||||
|
|
||||||
|
# Additional packages for the live environment
|
||||||
|
echo "calamares" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "calamares-settings-debian" >> config/package-lists/calamares.list.chroot
|
||||||
|
echo "live-boot" >> config/package-lists/live-boot.list.chroot
|
||||||
|
echo "live-config" >> config/package-lists/live-config.list.chroot
|
||||||
|
echo "live-tools" >> config/package-lists/live-tools.list.chroot
|
||||||
|
echo "network-manager" >> config/package-lists/network.list.chroot
|
||||||
|
echo "network-manager-gnome" >> config/package-lists/network.list.chroot
|
||||||
|
echo "sudo" >> config/package-lists/admin.list.chroot
|
||||||
|
echo "curl" >> config/package-lists/tools.list.chroot
|
||||||
|
echo "wget" >> config/package-lists/tools.list.chroot
|
||||||
|
echo "vim" >> config/package-lists/tools.list.chroot
|
||||||
|
|
||||||
|
# Desktop environment (minimal for installer)
|
||||||
|
echo "task-xfce-desktop" >> config/package-lists/desktop.list.chroot
|
||||||
|
echo "lightdm" >> config/package-lists/desktop.list.chroot
|
||||||
|
echo "lightdm-gtk-greeter" >> config/package-lists/desktop.list.chroot
|
||||||
|
|
||||||
|
# Container tools (bootc will be added later when repository is fixed)
|
||||||
|
echo "podman" >> config/package-lists/bootc.list.chroot
|
||||||
|
echo "skopeo" >> config/package-lists/bootc.list.chroot
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Repository configuration for robojerk packages (bootc)
|
||||||
|
# This provides the official Debian packages for atomic deployment tools
|
||||||
|
# Note: Using noble repository for bootc since we're building from Ubuntu Noble
|
||||||
|
|
||||||
|
deb [signed-by=/etc/apt/keyrings/forgejo-robojerk.asc] https://git.raines.xyz/api/packages/robojerk/debian noble main
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Disable security repository for Trixie (not available yet)
|
||||||
|
# This prevents the build from failing due to missing security updates
|
||||||
27
02-installer/live-build/config/hooks/0000-fix-repositories.chroot
Executable file
27
02-installer/live-build/config/hooks/0000-fix-repositories.chroot
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debian Atomic Desktop - Fix Repositories Hook
|
||||||
|
# This hook fixes repository issues for cross-distribution builds
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Fixing repository configuration for Debian Trixie build from Ubuntu Noble..."
|
||||||
|
|
||||||
|
# Remove security repository references (not available for Trixie yet)
|
||||||
|
if [ -f /etc/apt/sources.list.d/security.list ]; then
|
||||||
|
echo "Removing security repository (not available for Trixie)..."
|
||||||
|
rm -f /etc/apt/sources.list.d/security.list
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure we're using the correct Debian Trixie repositories
|
||||||
|
echo "Configuring Debian Trixie repositories..."
|
||||||
|
cat > /etc/apt/sources.list << EOF
|
||||||
|
deb http://ftp.debian.org/debian trixie main
|
||||||
|
deb http://ftp.debian.org/debian trixie-updates main
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Update package lists
|
||||||
|
echo "Updating package lists..."
|
||||||
|
apt update
|
||||||
|
|
||||||
|
echo "Repository configuration fixed for Debian Trixie build."
|
||||||
63
02-installer/live-build/config/hooks/0100-setup-bootc-repo.chroot
Executable file
63
02-installer/live-build/config/hooks/0100-setup-bootc-repo.chroot
Executable file
|
|
@ -0,0 +1,63 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debian Atomic Desktop - Setup Bootc Repository Hook
|
||||||
|
# This hook sets up the robojerk repository for bootc and installs packages
|
||||||
|
# Building Debian Trixie from Ubuntu Noble
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Setting up robojerk repository for bootc packages (cross-distribution build)..."
|
||||||
|
|
||||||
|
# Download the GPG key for the robojerk repository
|
||||||
|
curl -fsSL https://git.raines.xyz/api/packages/robojerk/gpg.key -o /etc/apt/keyrings/forgejo-robojerk.asc
|
||||||
|
|
||||||
|
# Add the repository (using noble since we're building from Ubuntu Noble)
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/forgejo-robojerk.asc] https://git.raines.xyz/api/packages/robojerk/debian noble main" > /etc/apt/sources.list.d/robojerk.list
|
||||||
|
|
||||||
|
# Update package lists
|
||||||
|
apt update
|
||||||
|
|
||||||
|
# Install OSTree packages from official Debian Trixie repositories first
|
||||||
|
echo "Installing OSTree packages from Debian Trixie repositories..."
|
||||||
|
apt install -y ostree ostree-boot libostree-1-1
|
||||||
|
|
||||||
|
# Install container tools
|
||||||
|
echo "Installing container tools..."
|
||||||
|
apt install -y podman skopeo
|
||||||
|
|
||||||
|
# Install additional dependencies
|
||||||
|
echo "Installing additional dependencies..."
|
||||||
|
apt install -y \
|
||||||
|
libarchive13t64 \
|
||||||
|
libavahi-client3 \
|
||||||
|
libavahi-common3 \
|
||||||
|
libavahi-glib1 \
|
||||||
|
libcurl3t64-gnutls \
|
||||||
|
libgpgme11t64 \
|
||||||
|
libfuse3-4 \
|
||||||
|
libgpg-error0 \
|
||||||
|
liblzma5 \
|
||||||
|
libselinux1 \
|
||||||
|
libsystemd0
|
||||||
|
|
||||||
|
# Now install bootc from robojerk repository
|
||||||
|
echo "Installing bootc from robojerk repository..."
|
||||||
|
apt install -y bootc
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
echo "Verifying installations..."
|
||||||
|
if command -v bootc >/dev/null 2>&1; then
|
||||||
|
echo "bootc installed successfully: $(bootc --version)"
|
||||||
|
else
|
||||||
|
echo "ERROR: bootc installation failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v ostree >/dev/null 2>&1; then
|
||||||
|
echo "ostree installed successfully: $(ostree --version)"
|
||||||
|
else
|
||||||
|
echo "ERROR: ostree installation failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Bootc and OSTree setup complete for Debian Trixie build."
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# GPG key for robojerk repository
|
||||||
|
# This key is required for secure package installation from the robojerk repository
|
||||||
|
# The actual key content will be downloaded during the build process
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
# Partitioning module configuration for Debian Atomic Desktop
|
||||||
|
# This configures how Calamares will partition the target disk
|
||||||
|
|
||||||
|
# Default partitioning scheme
|
||||||
|
defaultPartitionTableType: gpt
|
||||||
|
|
||||||
|
# Default file system types
|
||||||
|
defaultFileSystemType: ext4
|
||||||
|
defaultFsType: ext4
|
||||||
|
|
||||||
|
# Available file system types
|
||||||
|
availableFileSystemTypes:
|
||||||
|
- ext4
|
||||||
|
- btrfs
|
||||||
|
- xfs
|
||||||
|
- f2fs
|
||||||
|
|
||||||
|
# Partitioning schemes
|
||||||
|
partitionLayout:
|
||||||
|
# EFI system partition
|
||||||
|
- name: "EFI System Partition"
|
||||||
|
size: 512M
|
||||||
|
filesystem: vfat
|
||||||
|
mountPoint: /boot/efi
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
- esp
|
||||||
|
|
||||||
|
# Boot partition for bootc
|
||||||
|
- name: "Boot Partition"
|
||||||
|
size: 1G
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /boot
|
||||||
|
flags:
|
||||||
|
- boot
|
||||||
|
|
||||||
|
# Root partition (will be replaced by bootc)
|
||||||
|
- name: "Root Partition"
|
||||||
|
size: 100%
|
||||||
|
filesystem: ext4
|
||||||
|
mountPoint: /
|
||||||
|
flags:
|
||||||
|
- root
|
||||||
|
|
||||||
|
# Swap configuration
|
||||||
|
swap:
|
||||||
|
# Use swap file instead of partition
|
||||||
|
useSwapFile: true
|
||||||
|
swapFileSize: 4G
|
||||||
|
|
||||||
|
# Bootloader configuration
|
||||||
|
bootloader:
|
||||||
|
# Install bootloader to the first disk
|
||||||
|
installPath: /dev/sda
|
||||||
|
# Use systemd-boot for EFI
|
||||||
|
bootloader: systemd-boot
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Shell process module configuration for Debian Atomic Desktop
|
||||||
|
# This handles the post-installation deployment of the atomic image
|
||||||
|
|
||||||
|
# Post-installation script to deploy atomic image
|
||||||
|
script:
|
||||||
|
# Deploy the atomic image using bootc
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Alternative: deploy from local image if available
|
||||||
|
- command: "podman"
|
||||||
|
arguments:
|
||||||
|
- "load"
|
||||||
|
- "-i"
|
||||||
|
- "/run/archivemount/atomic-image.tar"
|
||||||
|
timeout: 60
|
||||||
|
|
||||||
|
# Set up bootc configuration
|
||||||
|
- command: "bootc"
|
||||||
|
arguments:
|
||||||
|
- "install"
|
||||||
|
- "to-disk"
|
||||||
|
- "--device"
|
||||||
|
- "/dev/sda"
|
||||||
|
- "--replace-os"
|
||||||
|
- "--image"
|
||||||
|
- "localhost/debian-atomic:latest"
|
||||||
|
timeout: 300
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
environment:
|
||||||
|
BOOTC_IMAGE: "debian-atomic:latest"
|
||||||
|
BOOTC_DEVICE: "/dev/sda"
|
||||||
|
|
||||||
|
# Error handling
|
||||||
|
onError: "continue"
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
# Debian Atomic Desktop - Calamares Settings
|
||||||
|
# Main configuration file for the Calamares installer
|
||||||
|
|
||||||
|
# General settings
|
||||||
|
general:
|
||||||
|
# Installer branding
|
||||||
|
branding: debian-atomic
|
||||||
|
|
||||||
|
# Installer behavior
|
||||||
|
prompt-install: false
|
||||||
|
dont-chroot: false
|
||||||
|
|
||||||
|
# System requirements
|
||||||
|
requirements:
|
||||||
|
check-enough-disk-space: true
|
||||||
|
required-storage: 8G
|
||||||
|
check-internet: false
|
||||||
|
|
||||||
|
# Display settings
|
||||||
|
display:
|
||||||
|
# Installer window
|
||||||
|
window-title: "Debian Atomic Desktop Installer"
|
||||||
|
window-icon: "debian-atomic"
|
||||||
|
|
||||||
|
# Welcome page
|
||||||
|
welcome:
|
||||||
|
show-support-url: true
|
||||||
|
show-known-issues-url: true
|
||||||
|
show-release-notes-url: true
|
||||||
|
|
||||||
|
# Module sequence for installation
|
||||||
|
sequence:
|
||||||
|
# Welcome and preparation
|
||||||
|
- show:
|
||||||
|
- welcome
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- partition
|
||||||
|
- users
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
- exec:
|
||||||
|
- partition
|
||||||
|
- mount
|
||||||
|
- unpackfs
|
||||||
|
- machineid
|
||||||
|
- fstab
|
||||||
|
- locale
|
||||||
|
- keyboard
|
||||||
|
- localecfg
|
||||||
|
- luksbootkeyfile
|
||||||
|
- luksopenswaphookcfg
|
||||||
|
- initcpiocfg
|
||||||
|
- initcpio
|
||||||
|
- users
|
||||||
|
- displaymanager
|
||||||
|
- networkcfg
|
||||||
|
- hwclock
|
||||||
|
- services-systemd
|
||||||
|
- bootloader
|
||||||
|
- packages
|
||||||
|
- preservefiles
|
||||||
|
- removeuser
|
||||||
|
- shellprocess
|
||||||
|
- initramfs
|
||||||
|
- grubcfg
|
||||||
|
- bootloader
|
||||||
|
- postcfg
|
||||||
|
- umount
|
||||||
|
|
||||||
|
# Finish
|
||||||
|
- show:
|
||||||
|
- finished
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
[SeatDefaults]
|
||||||
|
autologin-user=debian-atomic
|
||||||
|
autologin-user-timeout=0
|
||||||
|
autologin-session=xfce
|
||||||
|
session-setup-script=/usr/local/bin/start-calamares
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Debian Atomic Desktop Installer
|
||||||
|
Name[en_US]=Debian Atomic Desktop Installer
|
||||||
|
Comment=Install Debian Atomic Desktop
|
||||||
|
Comment[en_US]=Install Debian Atomic Desktop
|
||||||
|
Exec=calamares
|
||||||
|
Icon=system-software-install
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;
|
||||||
|
X-GNOME-Autostart-enabled=true
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Bootc and OSTree packages for Debian Atomic Desktop
|
||||||
|
# These packages provide the core atomic deployment functionality
|
||||||
|
|
||||||
|
# Core bootc package (from robojerk repository)
|
||||||
|
bootc
|
||||||
|
|
||||||
|
# OSTree packages (from official Debian Trixie repositories - 2025.2-1)
|
||||||
|
ostree
|
||||||
|
ostree-boot
|
||||||
|
libostree-1-1
|
||||||
|
|
||||||
|
# Container tools required by bootc
|
||||||
|
podman
|
||||||
|
skopeo
|
||||||
|
|
||||||
|
# Core dependencies (as listed in bootc package dependencies)
|
||||||
|
libc6
|
||||||
|
libgcc-s1
|
||||||
|
libglib2.0-0t64
|
||||||
|
libssl3t64
|
||||||
|
libzstd1
|
||||||
|
zlib1g
|
||||||
|
systemd
|
||||||
|
|
||||||
|
# OSTree dependencies (from official Debian package information)
|
||||||
|
libarchive13t64
|
||||||
|
libavahi-client3
|
||||||
|
libavahi-common3
|
||||||
|
libavahi-glib1
|
||||||
|
libcurl3t64-gnutls
|
||||||
|
libgpgme11t64
|
||||||
|
libfuse3-4
|
||||||
|
libgpg-error0
|
||||||
|
liblzma5
|
||||||
|
libselinux1
|
||||||
|
libsystemd0
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Core system dependencies for Debian Atomic Desktop
|
||||||
|
# These packages must be installed before bootc and ostree
|
||||||
|
|
||||||
|
# Essential system libraries
|
||||||
|
libc6
|
||||||
|
libgcc-s1
|
||||||
|
libglib2.0-0t64
|
||||||
|
libssl3t64
|
||||||
|
libzstd1
|
||||||
|
zlib1g
|
||||||
|
systemd
|
||||||
|
|
||||||
|
# Archive and compression libraries
|
||||||
|
libarchive13t64
|
||||||
|
|
||||||
|
# Network and communication libraries
|
||||||
|
libavahi-client3
|
||||||
|
libavahi-common3
|
||||||
|
libavahi-glib1
|
||||||
|
libcurl3t64-gnutls
|
||||||
|
|
||||||
|
# GPG and security libraries
|
||||||
|
libgpgme11t64
|
||||||
63
02-installer/scripts/prepare-atomic-image.sh
Executable file
63
02-installer/scripts/prepare-atomic-image.sh
Executable file
|
|
@ -0,0 +1,63 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Debian Atomic Desktop - Prepare Atomic Image Script
|
||||||
|
# This script prepares the atomic image for embedding in the live ISO
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
ATOMIC_IMAGE="debian-atomic:latest"
|
||||||
|
LIVE_MOUNT="/run/archivemount"
|
||||||
|
IMAGE_TAR="atomic-image.tar"
|
||||||
|
|
||||||
|
echo "Preparing atomic image for live ISO..."
|
||||||
|
|
||||||
|
# Check if we're running in the live environment
|
||||||
|
if [ -d "$LIVE_MOUNT" ]; then
|
||||||
|
echo "Running in live environment, preparing atomic image..."
|
||||||
|
|
||||||
|
# Create directory for atomic image
|
||||||
|
mkdir -p "$LIVE_MOUNT/atomic"
|
||||||
|
|
||||||
|
# Save the atomic image to tar file
|
||||||
|
if podman image exists "$ATOMIC_IMAGE"; then
|
||||||
|
echo "Saving atomic image to $IMAGE_TAR..."
|
||||||
|
podman save -o "$LIVE_MOUNT/atomic/$IMAGE_TAR" "$ATOMIC_IMAGE"
|
||||||
|
|
||||||
|
# Create deployment script
|
||||||
|
cat > "$LIVE_MOUNT/atomic/deploy.sh" << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
# Deploy atomic image script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ATOMIC_IMAGE="debian-atomic:latest"
|
||||||
|
IMAGE_TAR="atomic-image.tar"
|
||||||
|
TARGET_DEVICE="/dev/sda"
|
||||||
|
|
||||||
|
echo "Deploying Debian Atomic Desktop..."
|
||||||
|
|
||||||
|
# Load the atomic image
|
||||||
|
if [ -f "$IMAGE_TAR" ]; then
|
||||||
|
echo "Loading atomic image..."
|
||||||
|
podman load -i "$IMAGE_TAR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install using bootc
|
||||||
|
echo "Installing atomic image to $TARGET_DEVICE..."
|
||||||
|
bootc install to-disk --device "$TARGET_DEVICE" --replace-os --image "$ATOMIC_IMAGE"
|
||||||
|
|
||||||
|
echo "Atomic installation complete!"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$LIVE_MOUNT/atomic/deploy.sh"
|
||||||
|
echo "Atomic image prepared successfully."
|
||||||
|
else
|
||||||
|
echo "Warning: Atomic image $ATOMIC_IMAGE not found."
|
||||||
|
echo "Installation will attempt to pull from registry."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Not in live environment, skipping atomic image preparation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Atomic image preparation complete."
|
||||||
183
roadmap.md
Normal file
183
roadmap.md
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
This is an exciting and ambitious project\! Based on your goals and chosen tools, here is a detailed roadmap to guide you through building a Debian Atomic Desktop, mirroring the success of `ublue-os` while using the strengths of the Debian ecosystem.
|
||||||
|
|
||||||
|
The roadmap is broken down into four distinct phases, from the foundational build to a polished, distributable product.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Phase 1: Foundation & Core Build (The "Hello, World" Image)
|
||||||
|
|
||||||
|
**Goal:** Create a minimal, bootable Debian OSTree image and automate its build. This is your Minimum Viable Product.
|
||||||
|
|
||||||
|
**Tools:** `bootc`, `just`, `podman`/`docker`
|
||||||
|
|
||||||
|
**Tasks:**
|
||||||
|
|
||||||
|
1. **Project Scaffolding:**
|
||||||
|
|
||||||
|
* Create a new Git repository for your project (e.g., `my-debian-atomic-desktop`).
|
||||||
|
* Create the foundational files: `Containerfile` and `justfile`.
|
||||||
|
|
||||||
|
2. **Define the Base Image (`Containerfile`):**
|
||||||
|
|
||||||
|
* Start with a minimal Debian image.
|
||||||
|
* **Example `Containerfile` snippet:**
|
||||||
|
```dockerfile
|
||||||
|
FROM debian:trixie
|
||||||
|
|
||||||
|
# Install essential packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
systemd \
|
||||||
|
dbus \
|
||||||
|
sudo \
|
||||||
|
...
|
||||||
|
```
|
||||||
|
* Focus on only the bare minimum for now. Don't add a desktop yet. The goal is to get a working, bootable command line.
|
||||||
|
|
||||||
|
3. **Automate the Build (`justfile`):**
|
||||||
|
|
||||||
|
* Create a simple `justfile` with a recipe to build the container image.
|
||||||
|
* **Example `justfile` snippet:**
|
||||||
|
```justfile
|
||||||
|
build-image:
|
||||||
|
podman build -t my-debian-atomic:latest .
|
||||||
|
|
||||||
|
# Command to clean up
|
||||||
|
clean:
|
||||||
|
podman rmi my-debian-atomic:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Test the Image:**
|
||||||
|
|
||||||
|
* Build the image with `just build-image`.
|
||||||
|
* Test its functionality by deploying it to a VM using `bootc`.
|
||||||
|
* **Example `just` recipe for testing:**
|
||||||
|
```justfile
|
||||||
|
install-vm:
|
||||||
|
bootc install to-disk --device /dev/sda --replace-os --image my-debian-atomic:latest qemu-system-x86_64 -hda /var/lib/libvirt/images/my-debian.qcow2
|
||||||
|
```
|
||||||
|
* Verify that you can boot into a working Debian command-line environment.
|
||||||
|
|
||||||
|
**Deliverable:** A minimal, bootable Debian `bootc` image and a `justfile` to build and test it.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Phase 2: Calamares Installer Integration
|
||||||
|
|
||||||
|
**Goal:** Create a bootable ISO with a Calamares installer that can deploy your atomic image.
|
||||||
|
|
||||||
|
**Tools:** `live-build`, `calamares`
|
||||||
|
|
||||||
|
**Tasks:**
|
||||||
|
|
||||||
|
1. **Build a Live ISO Environment:**
|
||||||
|
|
||||||
|
* Use `live-build` to create a minimal live environment.
|
||||||
|
* Configure `live-build` to include the `calamares` package and all its dependencies.
|
||||||
|
* The live environment will also need access to your `bootc` image, either by embedding it in the ISO or pointing to a container registry.
|
||||||
|
|
||||||
|
2. **Configure Calamares:**
|
||||||
|
|
||||||
|
* Create a custom Calamares configuration (a set of `.yml` files).
|
||||||
|
* **The Partitioning Module:** Configure it to create the necessary partitions (e.g., `/boot/efi`, `/`, and a separate `/boot` for `bootc`).
|
||||||
|
* **The `post-install` Module (Crucial Step):** Write a script or configure this module to:
|
||||||
|
* Run the command `bootc install to-disk --device /dev/sda --replace-os --image ghcr.io/your-project/your-image:latest`.
|
||||||
|
* Handle the bootloader installation, which `bootc` can assist with.
|
||||||
|
|
||||||
|
3. **Integrate the Installer Build with `just`:**
|
||||||
|
|
||||||
|
* Add a new recipe to your `justfile` to orchestrate the `live-build` process.
|
||||||
|
* **Example `justfile` recipe:**
|
||||||
|
```justfile
|
||||||
|
build-iso:
|
||||||
|
./build_live_iso.sh
|
||||||
|
# The script would use live-build to create the .iso
|
||||||
|
|
||||||
|
test-iso:
|
||||||
|
qemu-system-x86_64 -cdrom my-debian-installer.iso -m 2G
|
||||||
|
```
|
||||||
|
|
||||||
|
**Deliverable:** A bootable `.iso` that presents a Calamares installer, which successfully installs your minimal atomic image.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Phase 3: Advanced Features (The `ublue-os` Mimicry)
|
||||||
|
|
||||||
|
**Goal:** Add a full desktop environment and a robust solution for building kernel modules like the NVIDIA driver.
|
||||||
|
|
||||||
|
**Tools:** Multi-stage `Containerfile` builds, `podman`/`docker`
|
||||||
|
|
||||||
|
**Tasks:**
|
||||||
|
|
||||||
|
1. **Add a Desktop Environment:**
|
||||||
|
|
||||||
|
* Update your `Containerfile` from Phase 1 to include a full desktop environment. For example, for KDE Plasma:
|
||||||
|
```dockerfile
|
||||||
|
# Inside the Containerfile
|
||||||
|
RUN apt-get install -y sddm task-kde-desktop
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Create the Kernel Module Pipeline:**
|
||||||
|
|
||||||
|
* **Separate Repository:** Create a new repository, for example, `my-debian-atomic-kmods`.
|
||||||
|
* **Build `Containerfile`:** In this new repo, create a `Containerfile` to build the NVIDIA driver from source for a specific Debian kernel version.
|
||||||
|
```dockerfile
|
||||||
|
# Inside the kmods Containerfile
|
||||||
|
FROM debian:trixie
|
||||||
|
RUN apt-get update && apt-get install -y build-essential linux-headers-$(uname -r) ...
|
||||||
|
RUN cd /path/to/nvidia-source && make KSRC=/usr/src/linux-headers-$(uname -r)
|
||||||
|
# Copy the compiled .ko file to a known location
|
||||||
|
```
|
||||||
|
* **Build Automation (`justfile`):** Add a `just` recipe to build and push this new `kmods` container image to a registry.
|
||||||
|
|
||||||
|
3. **Integrate the Pre-built Module:**
|
||||||
|
|
||||||
|
* Go back to your main `Containerfile` from Phase 1.
|
||||||
|
* Use a multi-stage build. The first stage pulls from your `kmods` image. The second stage copies the pre-compiled `.ko` file into the main image's `/lib/modules/` directory.
|
||||||
|
* **Example multi-stage `Containerfile` snippet:**
|
||||||
|
```dockerfile
|
||||||
|
# Stage 1: Build or get the kernel module
|
||||||
|
FROM ghcr.io/your-project/my-debian-atomic-kmods:latest AS kmods-builder
|
||||||
|
|
||||||
|
# Stage 2: Build the final image
|
||||||
|
FROM debian:trixie
|
||||||
|
# ... (rest of your desktop setup) ...
|
||||||
|
|
||||||
|
# Copy the pre-compiled kernel module
|
||||||
|
COPY --from=kmods-builder /path/to/nvidia.ko /lib/modules/$(uname -r)/updates/nvidia.ko
|
||||||
|
RUN depmod -a $(uname -r)
|
||||||
|
```
|
||||||
|
* This mimics the `ublue-os` approach: the complex build is isolated and the final product simply integrates the finished artifacts.
|
||||||
|
|
||||||
|
**Deliverable:** A fully-featured desktop image with an integrated, pre-compiled NVIDIA driver, built using a clean, automated pipeline.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Phase 4: Polish & Distribution
|
||||||
|
|
||||||
|
**Goal:** Make the project ready for others to use and contribute to.
|
||||||
|
|
||||||
|
**Tools:** GitHub Actions, Git
|
||||||
|
|
||||||
|
**Tasks:**
|
||||||
|
|
||||||
|
1. **Public Repositories:** Ensure your `my-debian-atomic-desktop` and `my-debian-atomic-kmods` repositories are public on a platform like GitHub.
|
||||||
|
|
||||||
|
2. **Set up CI/CD (GitHub Actions):**
|
||||||
|
|
||||||
|
* Create workflows in both repositories to automatically build and push new container images whenever you push code.
|
||||||
|
* Trigger an automatic build of the `kmods` repository whenever a new Debian kernel is released.
|
||||||
|
* Trigger an automatic build of the main desktop image after the `kmods` image has been successfully built and pushed.
|
||||||
|
|
||||||
|
3. **Write Comprehensive Documentation:**
|
||||||
|
|
||||||
|
* Create a `README.md` that explains the project's goals.
|
||||||
|
* Write a guide for users on how to install your desktop using the Calamares ISO.
|
||||||
|
* Document the build process for contributors.
|
||||||
|
* Explain any custom `ujust` commands you include.
|
||||||
|
|
||||||
|
4. **Finalize the User Experience:**
|
||||||
|
|
||||||
|
* Add custom desktop branding, wallpapers, and default application choices.
|
||||||
|
* Add a `ujustfile` inside your main `Containerfile` to provide a user-friendly command line interface for updates and system maintenance.
|
||||||
|
|
||||||
|
**Deliverable:** A stable, automated, and well-documented project with a polished user experience, ready for public consumption.
|
||||||
8
todo
Normal file
8
todo
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
Why did we not use bootc in phase 1 ?
|
||||||
|
|
||||||
|
why SOOO MANY hook files in phase 2?
|
||||||
|
|
||||||
|
Have .gitignore ignore all temp files, chroots, cache, etc
|
||||||
|
maybe create a build dir for phase 2 for .gitignore
|
||||||
|
|
||||||
|
Use apt-cacher-ng
|
||||||
Loading…
Add table
Add a link
Reference in a new issue