Grubby is a utility in Fedora that helps manage the bootloader configuration. It allows you to modify various settings for the GRUB bootloader, such as kernel arguments. In this article, we will focus on how to override grub_arg in grubby for non-default grub entries in Fedora 38.
By default, Fedora uses GRUB as the bootloader, which presents a menu of available operating systems during startup. Each entry in this menu is called a grub entry. You can have multiple grub entries for different kernel versions or configurations.
When you select a grub entry from the menu, the kernel arguments specified for that entry are passed to the Linux kernel during boot. These arguments can be used to modify the behavior of the kernel or enable/disable certain features.
However, there may be cases where you want to override the kernel arguments for a specific grub entry. For example, you may need to disable a certain feature for a specific kernel version. This is where grubby comes in handy.
To override the grub_arg for a non-default grub entry in Fedora 38, follow these steps:
- Open a terminal by pressing
Ctrl + Alt + Ton your keyboard. - Type the following command to list all the available grub entries:
- Look for the grub entry you want to modify and note down its index number.
- Next, use the following command to override the grub_arg for the desired grub entry:
- Finally, reboot your system for the changes to take effect. You can do this by typing the following command:
sudo grubby --info=ALL
sudo grubby --update-kernel=INDEX --args="NEW_ARG"
Replace INDEX with the index number of the grub entry you noted earlier. Replace NEW_ARG with the new kernel argument you want to set.
sudo reboot
That's it! You have successfully overridden the grub_arg for a non-default grub entry in Fedora 38. The new kernel argument will be passed to the Linux kernel during boot for that specific grub entry.
It's important to note that modifying kernel arguments can have significant effects on the behavior of your system. Make sure you understand the implications of the changes you make and proceed with caution.
If you ever want to revert the changes and go back to the default kernel arguments for a specific grub entry, you can use the same sudo grubby --update-kernel=INDEX --args="NEW_ARG" command and provide the original kernel arguments.
References: