Change boot settings, kernel options or timeout and then regenerate GRUB2 configuration safely. 16.11.2025 | reading time: 2 min You edited kernel parameters or want a faster boot; now update GRUB2 so the changes actually take effect, and verify the system still boots correctly. Quick hands-on change Edit the file `/etc/default/grub`, update the configuration, and regenerate the GRUB menu; for example change the timeout and rebuild: `sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=2/' /etc/default/grub` then run `sudo update-grub` (Debian/Ubuntu) or `sudo grub2-mkconfig -o /boot/grub2/grub.cfg` (RHEL/Fedora). A sample session looks like this: ```bash $ sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=2/' /etc/default/grub $ sudo update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-50-generic Found initrd image: /boot/initrd.img-5.15.0-50-generic Found Windows Boot Manager on /dev/sda1 done ``` When to reinstall the bootloader If you change the target disk, switch BIOS/UEFI modes or the MBR/EFI stub is damaged, run `sudo grub-install /dev/sda` after regenerating the config; on UEFI systems confirm the correct EFI path and use `grub2-mkconfig -o /boot/efi/EFI/yourdistro/grub.cfg` when required. Common pitfalls and fine tuning Remember that `/etc/default/grub` holds defaults and scripts in `/etc/grub.d` also influence output, so update both when adding menu entries; disable `os-prober` if you don’t want other OS entries, and always keep a rescue medium handy before changing bootloader settings. Related utilities to know Use `grub-install` to write the bootloader to disk, `grub-mkconfig` to generate a config file directly, and `efibootmgr` to inspect or change EFI boot order when working with UEFI firmware. Next steps for mastery Practice safely on a VM: change a kernel parameter, regenerate GRUB2 and reboot; then try reinstalling the bootloader to a partition to see error modes and recovery steps, which builds confidence for production maintenance; continue learning and consider formal certification to deepen skills and career prospects, for example CompTIA Linux+ or LPIC-1 with focused exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. boot-process setup utilities troubleshooting