Skip to content

Conversation

@synacktraa
Copy link

@synacktraa synacktraa commented Nov 18, 2025

Key Changes

  • Removed multi-OS support: Eliminated define.sh, focusing solely on Ubuntu
  • Added cloud-init configuration: ubuntu-desktop-minimal, automated partitioning, default user: docker
  • ISO remastering with pycdlib: Patches GRUB configuration in-place by adding autoinstall kernel parameters

Custom GRUB Configuration

  • Added assets/grub.cfg with single autoinstall boot entry
  • Refactored remaster_iso.py to support custom grub.cfg replacement

Enhanced Autoinstall User-Data

  • Switch storage layout from LVM to direct for simpler partitioning
  • Install ubuntu-desktop-minimal via late-commands for better control
  • Enable boot splash screen and configure GDM auto-login
  • Remove unused server packages (ubuntu-server, byobu, vim, openssh-server, etc.)
  • Disable LTS upgrade prompts and setup unattended-upgrades
  • Disable sleep, suspend, hibernate via systemd
  • Configure GNOME power settings via dconf to prevent idle timeout, screensaver, and screen lock

Golden Image Support

  • Check for ubuntu.boot marker to skip reinstallation when golden image exists
  • Save remastered ISO to storage as ubuntu.<size>.iso for reuse
  • Create ubuntu.base file with ISO filename for tracking
  • Use dynamic $BOOT path instead of hardcoded /custom.iso

Graceful Shutdown

  • Added power.sh with ACPI signal handling for graceful VM shutdown
  • Updated entry.sh to run QEMU in background with terminal monitoring
  • Trap handlers for SIGTERM, SIGHUP, SIGINT, SIGABRT, SIGQUIT

Build Fix

  • Run dos2unix on scripts and assets in Dockerfile to fix CRLF line endings

Testing

Tested with Ubuntu 22.04.05 LTS Server ISO - fully automated installation with:

  • No user interaction required
  • Auto-login to desktop
  • No sleep/suspend/idle timeout after boot
  • Graceful shutdown on container exit
  • Golden image reboot support

…agement

- Switch storage layout from LVM to direct
- Remove SSH server
- Install ubuntu-desktop-minimal via late-commands for better control
- Enable boot splash screen
- Remove unused server packages (ubuntu-server, byobu, vim, etc.)
- Configure GDM auto-login for docker user
- Disable LTS upgrade prompts
- Setup unattended-upgrades for automatic security updates
- Disable sleep, suspend, and hibernate via systemd
- Configure GNOME power settings via dconf to prevent idle timeout,
  screensaver, and screen lock
- Check for ubuntu.boot marker to skip reinstallation when golden image exists
- Save remastered ISO to storage as ubuntu.<size>.iso for reuse
- Create ubuntu.base file with ISO filename for tracking
- Create ubuntu.boot marker after remastering to enable golden image boot
- Use dynamic $BOOT path instead of hardcoded /custom.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant