Skip to content

AJprogramming123/OpsCenter-autoinstaller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Ubuntu Desktop Autoinstaller (24.04 LTS)

This project provides a fully automated, hands-free installation for Ubuntu Desktop 24.04 LTS (Noble Numbat) using the autoinstall.yaml mechanism. Starting with Ubuntu 24.04.1, the Desktop installer fully supports the same autoinstall functionality as Ubuntu Server.

This README includes instructions to prepare your bootable drive, configure your autoinstall file, and run the installation.


Features

  • Fully automated Desktop installation.
  • Pre-configured sudo user.
  • SSH server installation for Ansible/remote management.
  • Automatic locale, timezone, keyboard, and network configuration.
  • Post-installation commands and error handling.

Prerequisites

  • Ubuntu Desktop 24.04.1 ISO or newer.
  • USB drive or second partition for the autoinstall file.
  • SSH key pair (for passwordless access to the installed system).
  • WSL (Windows Subsystem for Linux) or Linux host for building the bootable ISO.

Step 1: Generate a Password Hash

Ubuntu autoinstall requires a hashed password for the default user.

openssl passwd -6

Copy the resulting hash into your autoinstall.yaml under password.


Step 2: Prepare SSH Keys

Ensure your personal computer’s public SSH key is available. Add it to the authorized-keys section in the autoinstall.yaml:

ssh:
  install-server: True
  authorized-keys:
    - ssh-ed25519 AAAAC3Nzac user@host
  allow-pw: false

For detailed guidance on generating SSH keys: SSH Key Generation


Step 3: Create a Bootable Autoinstall Drive (Using WSL)

  1. Create a directory for your autoinstall files:
mkdir -p ~/autoinstall
  1. Copy the ISO contents:
cp /mnt/c/Path/To/UbuntuISO.iso ~/autoinstall
  1. Install ISO generation tools:
sudo apt update && sudo apt install -y genisoimage
  1. Generate a bootable ISO:
genisoimage -o ~/autoinstall.iso -V AUTOINSTALL -r -J ~/autoinstall
  1. Copy it back to your Windows desktop:
cp ~/autoinstall.iso /mnt/c/(Where ever you want)

Step 4: Preinstallation Phase

During installation:

  • Skip any prompts until the autoinstall option appears.
  • To locate your USB or attached autoinstall drive:
lsblk
sudo su
mkdir -p /media/autoinstall
mount /dev/sdb /media/autoinstall
ls /media/autoinstall
# Should show: autoinstall.yaml
  • Use the path for manual autoinstall if needed:
file:///media/autoinstall/autoinstall.yaml

Step 5: Using Autoinstall

  1. Boot the Ubuntu 24.04.1 Desktop ISO.

  2. If the installer does not auto-detect your autoinstall.yaml, provide a manual path:

    • Press Ctrl+Alt+F2 (or Ctrl+Alt+T in GUI) to open a shell.
    • Attach your second drive or USB.
    • List disks: lsblk -f
    • Mount your autoinstall partition if needed.
    • Restart to GRUB menu and append to the Linux line:
subiquity.autoinstallpath=/media/ubuntu/CONFIG/autoinstall.yaml

Step 6: autoinstall.yaml Example

# Use spaces, no tabs
autoinstall:
  version: 1
  identity:
    realname: "Your Name"
    username: username
    password: "<generated-hash>"
    hostname: computer-name
    group: sudo

  interactive-sections:
    - network

  keyboard:
    layout: "us"

  locale: "en_US.UTF-8"
  timezone: "America/New_York"

  ssh:
    install-server: True
    authorized-keys:
      - ssh-ed25519 AAAAC3Nzac user@host
    allow-pw: false

  early-commands:
    - sudo apt update -y && sudo apt upgrade -y

  shutdown: reboot

  error-commands:
    - tar -czf /installer-logs.tar.gz /var/log/installer
    - journalctl -b > /installer-journal.log

  late-commands:
    - sudo apt update -y && sudo apt upgrade -y
    - sudo systemctl start sshd
    - sudo systemctl enable sshd
    - sudo systemctl restart sshd
    - firewall-cmd --service=ssh --permanent
    - firewall-cmd --reload

Notes

  • Desktop ISOs do not include openssh-server by default, so network access is required.
  • Using a single sudo user during install simplifies repetitive deployments.
  • For advanced post-install configurations, modify late-commands.

References & Further Reading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published