Skip to content

Netinstaller - #1

Merged
sharathDHD merged 2 commits into
mainfrom
netinstaller
Aug 28, 2026
Merged

sharathDHD merged 2 commits into
mainfrom
netinstaller

Conversation

@sharathDHD

@sharathDHD sharathDHD commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

What does this PR do?

Which layer does it touch?

  • profiles/ — declarative YAML only
  • engine/ — resolution/validation logic
  • installer/ — execution path (partitioning, pacstrap, chroot)
  • cli/ or cmd/modular/ — command line surface
  • iso/ — live environment
  • docs / CI / packaging

Checklist

  • python -m pytest tests/ passes locally
  • python scripts/validate-profiles.py passes (if profiles changed)
  • New behavior has a regression test (execution-layer changes MUST have one — see tests/installation/)
  • gofmt -l . is clean (if Go changed)
  • README / docs updated if user-visible behavior changed

Summary by Sourcery

Introduce a minimal network-based installer ISO with an interactive console workflow that shares the existing installation engine and downloads selected packages during installation.

New Features:

  • Add a console-based netinstall menu that checks connectivity, guides system configuration, previews package downloads, saves the installation configuration, and can launch the shared installer orchestrator.
  • Add a netinstall live-image boot flow that automatically launches the text menu on tty1 and provides a dedicated menu command.
  • Provide documentation for the minimal online-installer edition, its boot flow, manual usage, and build process.

Enhancements:

  • Reduce the live environment to the packages and services needed for booting, networking, and console installation by removing graphical-installer and related live-session services.

Build:

  • Update the build staging process to install the netinstall menu launcher.

CI:

  • Run CI for pushes and pull requests targeting the netinstaller branch.

Documentation:

  • Document the netinstall edition, installation workflow, manual commands, and ISO build/test procedures.

Tests:

  • Add regression coverage for menu selection parsing, network checks, disk discovery and confirmation, configuration validation, plan generation, and dry-run configuration output.

Summary by CodeRabbit

  • New Features
    • Added a text-based netinstall experience with network checks, configuration steps, package planning, and installation or dry-run options.
    • Added automatic launch of the installer menu when booting the minimal installer edition.
    • Added a modular-menu command for launching the installer manually.
    • Reduced the installer ISO package set for a smaller footprint.
  • Documentation
    • Added netinstaller branch documentation and a notice in the main README.
  • Bug Fixes
    • Extended CI coverage to the netinstaller branch.
  • Tests
    • Added coverage for menu navigation, validation, network checks, configuration, and dry runs.

The netinstaller branch ships a live environment with nothing but the
boot system, network drivers and a console menu. All desktop,
application and role packages are downloaded from the Arch mirrors by
pacstrap when the install runs — the menu is select -> download ->
install.

- installer/menu: interactive text menu (stdlib + PyYAML only) driving
  the same run_installation() orchestrator as the GTK GUI and CLI;
  network pre-flight with retry guidance (nmtui for wi-fi), plan
  preview with package count, typed device-name confirmation before
  disk wipe, --dry-run mode
- live env slimmed to 19 packages (dropped gtk3, python-gobject, git,
  openssh, vim, tmux, alsa-utils — no GUI/tooling on the ISO)
- tty1 autologin launches the menu via root/.bash_profile;
  /usr/local/bin/modular-menu wrapper for manual starts
- removed inapplicable services (graphical installer, sshd,
  alsa-unmuter, livecd-talk)
- README-netinstall.md documents the edition and its differences from
  main; README carries a branch banner
- 9 new regression tests (111 total)
@sourcery-ai

sourcery-ai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR introduces a minimal online-installer ISO edition with a reusable text menu front end, network and disk safety checks, configuration/plan preview, and shared installation orchestration; it packages the menu as the tty1 live-environment entry point, removes graphical-live services, adds regression coverage and documentation, and enables CI for the branch.

Sequence diagram for the netinstall menu and installation flow

sequenceDiagram
    actor User
    participant TTY1
    participant TextMenu
    participant Mirror
    participant Resolver
    participant Plan
    participant Installer

    User->>TTY1: Login on tty1
    TTY1->>TextMenu: main()
    TextMenu->>Mirror: check_network()
    Mirror-->>TextMenu: Reachability result
    User->>TextMenu: Select desktop, hardware, roles, applications, system, identity, disk
    TextMenu->>Resolver: resolve()
    Resolver-->>TextMenu: Resolved packages
    TextMenu->>Plan: build_plan()
    Plan-->>TextMenu: Package count
    TextMenu->>TextMenu: ModularConfiguration.save()
    User->>TextMenu: Confirm installation
    TextMenu->>Installer: run_installation()
    Installer-->>User: Installation result
Loading

File-Level Changes

Change Details Files
Adds a console-driven netinstall workflow that reuses the existing configuration, resolution, package-planning, and installation orchestration layers.
  • Introduces an eight-step interactive flow for network validation, profile selection, hardware and system settings, identity, disk selection, plan preview, and installation.
  • Adds injectable I/O, network probing, disk enumeration, input validation, dry-run support, YAML persistence, and package-count preview.
  • Exposes the menu through python3 -m installer.menu and a live-environment launcher.
installer/menu/__main__.py
installer/menu/text_menu.py
tests/installation/test_text_menu.py
build.sh
Converts the live ISO packaging and boot behavior to a minimal text-based netinstaller edition.
  • Removes graphical installer, audio-unmute, talk, SSH, and related systemd service wiring from the ISO profile.
  • Adds tty1 root-shell startup that launches the text menu once per boot.
  • Updates the ISO package profile and build staging to ship the console launcher and reduced live environment.
iso/profile/airootfs/root/.bash_profile
iso/profile/packages.x86_64
iso/profile/airootfs/etc/systemd/system/graphical.target.wants/modular-installer.service
iso/profile/airootfs/etc/systemd/system/livecd-alsa-unmuter.service
iso/profile/airootfs/etc/systemd/system/livecd-talk.service
iso/profile/airootfs/etc/systemd/system/modular-installer.service
iso/profile/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service
iso/profile/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service
Documents the netinstall edition, operating flow, manual usage, build commands, and branch packaging strategy.
  • Describes the online-install model, reduced live environment, network requirements, menu steps, and dry-run/headless commands.
  • Marks the branch-specific behavior in the main README and links to the detailed netinstall guide.
README-netinstall.md
README.md
Expands CI branch coverage for the netinstaller branch.
  • Runs push and pull-request CI triggers for both main and netinstaller.
.github/workflows/ci.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 624a99e0-bcbd-4980-8232-657beeb90c45

📥 Commits

Reviewing files that changed from the base of the PR and between fd06214 and 64e233e.

📒 Files selected for processing (15)
  • .github/workflows/ci.yml
  • README-netinstall.md
  • README.md
  • build.sh
  • installer/menu/__main__.py
  • installer/menu/text_menu.py
  • iso/profile/airootfs/etc/systemd/system/graphical.target.wants/modular-installer.service
  • iso/profile/airootfs/etc/systemd/system/livecd-alsa-unmuter.service
  • iso/profile/airootfs/etc/systemd/system/livecd-talk.service
  • iso/profile/airootfs/etc/systemd/system/modular-installer.service
  • iso/profile/airootfs/etc/systemd/system/multi-user.target.wants/sshd.service
  • iso/profile/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service
  • iso/profile/airootfs/root/.bash_profile
  • iso/profile/packages.x86_64
  • tests/installation/test_text_menu.py

📝 Walkthrough

Walkthrough

The change adds a netinstall text menu, integrates it into the live ISO, reduces ISO packages and automatic services, adds menu tests, documents the netinstaller branch, and enables CI for that branch.

Changes

Netinstaller edition

Layer / File(s) Summary
Menu flow and configuration
installer/menu/text_menu.py
Adds network checks, profile and hardware selection, identity validation, disk confirmation, configuration creation, and package-plan preview.
Menu execution and ISO integration
installer/menu/__main__.py, installer/menu/text_menu.py, build.sh, iso/profile/airootfs/root/.bash_profile, iso/profile/packages.x86_64, iso/profile/airootfs/etc/systemd/system/*
Adds module and ISO launcher entry points, starts the menu from the root login profile, supports dry-run execution, removes selected packages and automatic services, and disables automatic SSH startup.
Menu regression coverage
tests/installation/test_text_menu.py
Tests selection parsing, network retry behavior, profile selection, disk confirmation, configuration validation, package planning, and dry-run output.
Branch documentation and CI
.github/workflows/ci.yml, README.md, README-netinstall.md
Documents the netinstaller edition, operation and build commands, and runs CI for main and netinstaller.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RootShell
  participant TextMenu
  participant ProfileRegistry
  participant InstallerEngine

  RootShell->>TextMenu: Launch the netinstall menu
  TextMenu->>TextMenu: Check network and collect selections
  TextMenu->>ProfileRegistry: Resolve selected profiles
  TextMenu->>InstallerEngine: Build configuration and package plan
  TextMenu->>InstallerEngine: Run installation
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch netinstaller

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sharathDHD
sharathDHD merged commit 61967f3 into main Aug 28, 2026
8 checks passed

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="installer/menu/text_menu.py" line_range="280-285" />
<code_context>
+        entries = [(p.id, p.name) for p in profiles]
+        return self.ask_multiselect("select roles", entries)
+
+    def step_applications(self) -> list[str]:
+        self._out("\n[5/8] applications (downloaded at install time)")
+        profiles = self.registry.by_category("applications")
+        entries = [(p.id, p.name) for p in profiles]
+        self._out(f"  {len(entries)} applications available")
+        return self.ask_multiselect("select applications", entries)
+
+    def step_system(self) -> dict[str, str]:
</code_context>
<issue_to_address>
**issue (broader_impact):** The menu exposes every application profile, including AUR profiles, but the installation path sends only `plan.all_packages()` to pacstrap. `InstallationPlan.all_packages()` contains only the base and official package lists, so selected AUR applications are omitted from the actual installation while the menu presents them as selectable applications.

**Triggers:** When the user selects an application profile whose source is AUR, such as `brave`, `ghidra`, `heroic`, `onlyoffice`, or `vivaldi`.

**Suggested fix:** Either hide unsupported non-official profiles in the netinstall menu or add the corresponding AUR installation workflow and include its packages in the installation steps.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and the new menu adds a live installation path that can invoke the shared orchestrator to partition and wipe a user-selected disk, so a targeting or confirmation defect could irreversibly destroy data. The menu also collects and passes user and root passwords into the installation flow; reverting removes this path, but any disk contents already erased would not be recoverable.

Blocking findings: installer/menu/text_menu.py:285


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +280 to +285
def step_applications(self) -> list[str]:
self._out("\n[5/8] applications (downloaded at install time)")
profiles = self.registry.by_category("applications")
entries = [(p.id, p.name) for p in profiles]
self._out(f" {len(entries)} applications available")
return self.ask_multiselect("select applications", entries)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (broader_impact): The menu exposes every application profile, including AUR profiles, but the installation path sends only plan.all_packages() to pacstrap. InstallationPlan.all_packages() contains only the base and official package lists, so selected AUR applications are omitted from the actual installation while the menu presents them as selectable applications.

Triggers: When the user selects an application profile whose source is AUR, such as brave, ghidra, heroic, onlyoffice, or vivaldi.

Suggested fix: Either hide unsupported non-official profiles in the netinstall menu or add the corresponding AUR installation workflow and include its packages in the installation steps.

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