Skip to content

Move NVIDIA kmods to drivers.target - #321

Merged
yeazelm merged 4 commits into
bottlerocket-os:developfrom
yeazelm:drivers_target
Nov 20, 2025
Merged

Move NVIDIA kmods to drivers.target#321
yeazelm merged 4 commits into
bottlerocket-os:developfrom
yeazelm:drivers_target

Conversation

@yeazelm

@yeazelm yeazelm commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

Related to : bottlerocket-os/bottlerocket#4218 (comment)

Description of changes:
This change moves the NVIDIA kmod package to load before drivers.target instead of preconfigured.target. This allows us to separate the state of loading all kernel modules from the rest of configuration.

Testing done:
Built NVIDIA variants for both arches and k8s 1.33 and ECS 2. Validated that the drivers come up for all 3 versions of the driver based upon hardware and fail as expected if no NVIDIA devices are present:

Failure on m6i.large:

[  OK  ] Finished Sets the hostname.
[  OK  ] Finished Bootstrap Commands.
[  OK  ] Finished Link Tesla kernel modules.
         Starting Load Tesla kernel modules...
[   28.104268] NVRM: No NVIDIA GPU found.
[   28.426169] NVRM: No NVIDIA GPU found.
[   28.745379] NVRM: No NVIDIA GPU found.
[   28.932771] driverdog[1535]: 02:34:25 [ERROR] '/usr/bin/modprobe' failed - stderr: modprobe: ERROR: could not insert 'nvidia': No such device
[   28.934905] driverdog[1535]: modprobe: ERROR: could not insert 'nvidia_modeset': No such device
[   28.936271] driverdog[1535]: modprobe: ERROR: could not insert 'nvidia_uvm': No such device
[FAILED] Failed to start Load Tesla kernel modules.
See 'systemctl status load-tesla-kernel-modules.service' for details.
[DEPEND] Dependency failed for Driver units.
[DEPEND] Dependency failed for Bottlerocket initial configuration complete.
[DEPEND] Dependency failed for Activate configured.target.
         Starting NVIDIA Persistence Daemon...
[FAILED] Failed to start NVIDIA Persistence Daemon.
See 'systemctl status nvidia-persistenced.service' for details.
[DEPEND] Dependency failed for Generate CDI specifications.
         Starting NVIDIA Grid Daemon...
	2025-11-15T02:35:39+00:00

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Matthew Yeazel added 4 commits November 15, 2025 00:06
The drivers.target is a more correct target for loading the NVIDIA
drivers. This shifts the Required target to drivers.target from
preconfigured.target.

Signed-off-by: Matthew Yeazel <yeazelm@amazon.com>
The drivers.target is a more correct target for loading the NVIDIA
drivers. This shifts the Required target to drivers.target from
preconfigured.target.

Signed-off-by: Matthew Yeazel <yeazelm@amazon.com>
The drivers.target is a more correct target for loading the NVIDIA
drivers. This shifts the Required target to drivers.target from
preconfigured.target.

Signed-off-by: Matthew Yeazel <yeazelm@amazon.com>
The drivers.target is a more correct target for loading the NVIDIA
drivers. This shifts the Required target to drivers.target from
preconfigured.target.

Signed-off-by: Matthew Yeazel <yeazelm@amazon.com>

@bcressey bcressey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This side of the change seems fine. However, we're missing a dependency to cause drivers.target to be reached before we'd initiate kernel lockdown.

I'd recommend adding Before=settings-applier.service to drivers.target, over in "release".

@yeazelm
yeazelm merged commit a01599a into bottlerocket-os:develop Nov 20, 2025
2 checks passed
@yeazelm
yeazelm deleted the drivers_target branch November 20, 2025 23:40
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.

3 participants