A system administrator needs to permanently add the nomodeset kernel parameter to the GRUB 2 boot-loader configuration. Which of the following methods should the administrator use to ensure the change persists after a kernel update?
Append nomodeset to the end of the /proc/cmdline file.
Directly edit the /boot/grub/grub.cfg file and add the parameter to the linux line.
Edit the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub and then run update-grub.
Add the line kernel.nomodeset=1 to the /etc/sysctl.conf file and run sysctl -p.
The persistent way to add a kernel parameter in GRUB 2 is to edit /etc/default/grub and then regenerate the main configuration. Add nomodeset to the GRUB_CMDLINE_LINUX or GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub, save the file, and run the appropriate command to rebuild the menu: update-grub on Debian/Ubuntu systems orgrub2-mkconfig -o /boot/grub2/grub.cfg on RHEL-derived systems (UEFI systems use the /boot/efi/EFI/<distro>/grub.cfg stub). Editing /boot/grub2/grub.cfg (or /boot/grub/grub.cfg) directly is incorrect because those files are auto-generated and will be overwritten the next time the rebuild command runs-such as during a kernel update. /proc/cmdline only reflects the parameters of the currently running kernel, and /etc/sysctl.conf controls runtime kernel tunables, not boot-loader parameters.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the `nomodeset` kernel parameter?
Open an interactive chat with Bash
Why is editing `/etc/default/grub` preferred over directly editing `/boot/grub/grub.cfg`?
Open an interactive chat with Bash
What are the commands `update-grub` and `grub2-mkconfig`, and how do they differ?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access