Updated: 28 September 2026 · Applies to: GRUB 2 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10 (with grubby), Ubuntu 24.04 and 26.04, Debian 13
A wrong kernel parameter, for example a bad root= value or a driver option, can stop a server from booting. GRUB lets you change the parameters for one boot, without editing any file, so you can start the system and then fix the setting properly. The CentOS 7 steps in older guides (the linux16 line and /boot/efi/EFI/redhat/grub.cfg) no longer apply to current systems.
Before you start
- You need to see the boot screen: the physical console, the IPMI or KVM console of a dedicated server, or the VNC console of a VPS. An SSH session cannot reach GRUB.
- If an older kernel is still listed in the boot menu, try booting it first. That often gets a server running without edits.
Change parameters for one boot
- Restart the server and wait for the GRUB menu. On Ubuntu and Debian the menu may be hidden: press Esc repeatedly (UEFI) or hold Shift (BIOS) while the machine starts.
- Select the kernel with the arrow keys and press e.
- Find the line that starts with
linux(on some UEFI systemslinuxefi). It holds the kernel parameters, for exampleroot=... ro crashkernel=... rhgb quiet. - Move with the arrow keys and add, change or delete parameters. Useful examples: remove
rhgb quietto see boot messages; addsystemd.unit=rescue.targetfor single-user rescue mode; addnomodesetfor display problems. - Press Ctrl+X (or F10) to boot. The change is not saved; it applies to this boot only.
Make the change permanent
AlmaLinux, Rocky Linux and RHEL 9 and 10 keep one file per kernel in /boot/loader/entries/. Change them with grubby:
grubby --update-kernel=ALL --args="nomodeset" # add a parameter grubby --update-kernel=ALL --remove-args="rhgb quiet" # remove parameters grubby --info=ALL # check the result
Kernels installed later take over the parameters of the current kernel. Only if you also run grub2-mkconfig for other reasons, update GRUB_CMDLINE_LINUX in /etc/default/grub too, then run grub2-mkconfig -o /boot/grub2/grub.cfg. On RHEL 9 and 10 this same path is correct for both BIOS and UEFI systems.
Ubuntu and Debian:
- Edit
/etc/default/gruband changeGRUB_CMDLINE_LINUX_DEFAULT(normal boots) orGRUB_CMDLINE_LINUX(all boots, including recovery). - Rebuild the menu:
update-grub
Check after the reboot
cat /proc/cmdline
This shows the parameters the running kernel was started with.
Common problems
- Pressing e asks for a user name and password: a GRUB password is set. Enter it, or ask whoever set it.
- The change is gone after a kernel update (Ubuntu, Debian): the setting was typed at boot only. Put it in
/etc/default/gruband runupdate-grub. - The server still does not boot: start from rescue media and repair GRUB; see how to reinstall GRUB2 from rescue mode.
Official documentation: Configuring kernel command-line parameters (Red Hat) and GNU GRUB manual.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
