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.
Add the line kernel.nomodeset=1 to the /etc/sysctl.conf file and run sysctl -p.
Edit the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub and then run update-grub.
Directly edit the /boot/grub/grub.cfg file and add the parameter to the linux line.
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .