Where can you set Linux kernel parameters (for example, to disable an NVIDIA graphics card)?
Asked at
AI answer
Kernel parameters are set in the bootloader's command line at startup. For GRUB, they are usually added to GRUB_CMDLINE_LINUX in /etc/default/grub, after which the GRUB configuration is regenerated and the system is rebooted. The commands for regenerating it depend on the distribution.
To prevent the NVIDIA driver from loading, you can add, for example, modprobe.blacklist=nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm. For Nouveau, use modprobe.blacklist=nouveau nouveau.modeset=0. If the driver is loaded from initramfs, you may also need an initramfs parameter (for example, rd.driver.blacklist=...) and to rebuild initramfs. Alternatively, you can add the module to /etc/modprobe.d/ and rebuild initramfs. Before making changes, verify that the system will be able to boot without this graphics card, and keep a rollback method available.
Also asked at RWB
- Why did you decide to change jobs / leave your current company?
- What is the key difference between TCP and UDP?
- What is the difference between git merge and git rebase? When should each approach be used?
- What is an inode in Linux?
- Which command is used to determine the route of a packet from your device to the target host?
Similar questions
- What kernel parameters and options can be added in the Linux bootloader’s interactive mode?
- How can you view the parameters with which the Linux kernel was started?
- Where are kernel parameters set at runtime (for example, memory for TCP packets), and how do you apply them?
- Where in Linux are kernel parameters set that should be applied at system startup?
- How can you view which kernel modules are currently loaded on the system?