Skip to content

dynamic-hostname: fix Darter Pro uniqueness issue#1579

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
vadika:fix-darter-hostname
Nov 26, 2025
Merged

dynamic-hostname: fix Darter Pro uniqueness issue#1579
brianmcgillion merged 1 commit intotiiuae:mainfrom
vadika:fix-darter-hostname

Conversation

@vadika
Copy link
Copy Markdown
Contributor

@vadika vadika commented Nov 24, 2025

Darter Pro laptops have identical system board serials, causing hostname collisions. This change refactors the hostname generation to use a combination of multiple hardware identifiers instead of a single ID:

  • Collects all available DMI serials and UUIDs
  • Collects all disk UUIDs
  • Collects MAC addresses from physical network interfaces only (excluding loopback and USB gadget mode)
  • Falls back to machine-id only if no hardware IDs were collected

The combined ID string increases uniqueness and prevents collisions on systems with duplicate serial numbers.

Description of Changes

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Hostname should be

  1. unique from device to device
  2. stay the same on GHAF reboots
  3. stay the same on GHAF image rebuilds

@vadika vadika added the Needs Testing CI Team to pre-verify label Nov 24, 2025
@vadika vadika force-pushed the fix-darter-hostname branch from abd5829 to 226f64c Compare November 24, 2025 09:19
@vadika vadika force-pushed the fix-darter-hostname branch from 226f64c to 3675901 Compare November 24, 2025 09:26
@vadika vadika force-pushed the fix-darter-hostname branch from 3675901 to fff15c0 Compare November 24, 2025 09:29
@vadika vadika force-pushed the fix-darter-hostname branch from fff15c0 to dc00c32 Compare November 24, 2025 09:33
@vadika vadika force-pushed the fix-darter-hostname branch from dc00c32 to 095d37f Compare November 24, 2025 10:14
@vadika vadika force-pushed the fix-darter-hostname branch from 095d37f to 1c7cfbf Compare November 24, 2025 10:23
@vadika vadika force-pushed the fix-darter-hostname branch from 1c7cfbf to f67af7b Compare November 24, 2025 10:33
@milva-unikie
Copy link
Copy Markdown

There is an issue with the laptops, the Device ID does not stay the same. Each time a laptop is booted with a new image built from this PR it gets a new Device ID. This is happening with Lenovo X1, Dell 7330 and Darter Pro. For the Orins the ID is persistent.

Please also update the Testing Instructions

@milva-unikie milva-unikie added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR bug on rugged laptop Bug on System76 and removed Needs Testing CI Team to pre-verify labels Nov 24, 2025
Darter Pro laptops have identical system board serials, causing hostname
collisions. This change refactors the hostname generation to use a
combination of multiple hardware identifiers instead of a single ID:

- Collects all available DMI serials and UUIDs
- Collects all disk UUIDs
- Collects MAC addresses from physical network interfaces only
  (excluding loopback and USB gadget mode)
- Falls back to machine-id only if no hardware IDs were collected

The combined ID string increases uniqueness and prevents collisions
on systems with duplicate serial numbers.

- Removed VM machine-id generation. VMs will now generate their own machine-id on first boot

Signed-off-by: vadik likholetov <vadikas@gmail.com>
@vadika
Copy link
Copy Markdown
Contributor Author

vadika commented Nov 25, 2025

There is an issue with the laptops, the Device ID does not stay the same. Each time a laptop is booted with a new image built from this PR it gets a new Device ID. This is happening with Lenovo X1, Dell 7330 and Darter Pro. For the Orins the ID is persistent.

Please also update the Testing Instructions

Updated testing instructions, found and fixed the issue.

@vadika vadika added the Needs Testing CI Team to pre-verify label Nov 25, 2025
@milva-unikie
Copy link
Copy Markdown

Tested with 2 Lenovo X1 laptops and 2 Darter Pro laptops

  • Each device has an unique persistent device ID and hostname

Note: Dell 7230 build is failing. Adding a "bug" tag for that.

@milva-unikie milva-unikie added bug Something isn't working Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76 and removed Needs Testing CI Team to pre-verify bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR bug on rugged laptop Bug on System76 labels Nov 25, 2025
@vadika
Copy link
Copy Markdown
Contributor Author

vadika commented Nov 25, 2025

Tested with 2 Lenovo X1 laptops and 2 Darter Pro laptops

  • Each device has an unique persistent device ID and hostname

Note: Dell 7230 build is failing. Adding a "bug" tag for that.

Is build falure related to PR?

@milva-unikie
Copy link
Copy Markdown

Is build falure related to PR?

No, it is part of the issue I sent a message about in Slack an hour ago

@brianmcgillion
Copy link
Copy Markdown
Collaborator

merging as the build failure was unrelated. and hopefully fixed, by previous PR.

@brianmcgillion brianmcgillion merged commit 84e9ff0 into tiiuae:main Nov 26, 2025
28 checks passed
@milva-unikie milva-unikie removed the bug Something isn't working label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants