Skip to content

fix: prevent console-setup from blocking first boot - #732

Merged
Marketen merged 1 commit into
masterfrom
marc/fix-console-setup-firstboot
Aug 31, 2026
Merged

fix: prevent console-setup from blocking first boot#732
Marketen merged 1 commit into
masterfrom
marc/fix-console-setup-firstboot

Conversation

@Marketen

@Marketen Marketen commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

Ubuntu ISO installations can stall on first boot at:

Setting up console-setup (1.226ubuntu1.1) ...

The Ubuntu 24.04.3 base contains console-setup 1.226ubuntu1. When noble-updates upgrades it to 1.226ubuntu1.1, package configuration can fail during the ISO late-command. The prerequisite script previously hid that dpkg failure behind tee. On first boot, apt-get install -y kbd resumes the half-configured package and debconf opens a hidden whiptail dialog on /dev/pts/0. This leaves .firstboot in place and prevents any core containers from being created.

This PR:

  • makes every prerequisite-script APT operation use the noninteractive debconf frontend;
  • preserves apt-get exit statuses while logging host updates and aborts on upgrade failure;
  • makes the first-boot kbd installation explicitly noninteractive.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • ISO install reproduction
  • Other

I reproduced the original failure with a complete KVM/UEFI install from a repo-generated Ubuntu 24.04.3 DAppNode ISO. At timeout, .firstboot remained, all eleven core images were loaded, docker ps -a was empty, and the process tree ended in a hidden console-setup whiptail prompt.

Focused validation after the change:

  • bash -n scripts/dappnode_install.sh scripts/dappnode_install_pre.sh
  • ShellCheck on both changed scripts; only the two pre-existing SC1091/SC2129 findings remain
  • mocked host_update checks proving update and upgrade failures retain their original nonzero status
  • Ubuntu 24.04 container installation of kbd and console-setup 1.226ubuntu1.1 with DEBIAN_FRONTEND=noninteractive; package configuration completed and dpkg --audit was clean

An updated ISO was not rebuilt for this PR; the full VM run was used to establish the failing path, followed by focused validation of the fix.

Test Configuration:

  • Base ISO: Ubuntu 24.04.3 live-server amd64
  • VM: QEMU/KVM, UEFI, 4 vCPU, 4 GiB RAM
  • Host: Ubuntu 24.04 amd64

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

Why this surfaced now

This is a latent installer bug exposed by a recent Ubuntu archive update, rather than a recent change to the DAppNode first-boot code. The Ubuntu 24.04.3 ISO contains console-setup 1.226ubuntu1, while noble-updates now provides 1.226ubuntu1.1. Previously there was no newer console-setup package to configure, so the vulnerable path was effectively a no-op.

Now the prerequisite host upgrade attempts that package transition during the unattended ISO late-command. Package configuration fails because debconf cannot ask questions there, but the apt-get ... | tee pipeline hides the failure. On first boot, apt-get install -y kbd retries the half-configured package and debconf starts a hidden whiptail prompt on /dev/pts/0. The installer remains at Setting up console-setup, .firstboot is never removed, and core container creation is skipped.

The Ubuntu update is a no-change rebuild; the issue is not an intentional new prompt in the package. Reconfiguring the newly available version exposed the installer's existing noninteractive and error-propagation gaps.

@Marketen
Marketen requested a review from a team as a code owner August 31, 2026 11:37
@Marketen
Marketen merged commit 289a8cd into master Aug 31, 2026
14 checks passed
@Marketen
Marketen deleted the marc/fix-console-setup-firstboot branch August 31, 2026 11:58
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