GRUB2
Kernel command line parameters passed in on boot can be queried during runtime:
cat /proc/cmdline
Tasks
Resetting root password
- Append rd.break to the list of command-line parameters to GRUB.
Once the shell is ready, run the following commands
mount -o remount,rw /sysroot chroot /sysroot passwd root
Text-mode installation
- RHEL can be installed from the console by providing inst.text as a kernel parameter on boot by pressing ++Tab++ on the GRUB splash screen.
GRUB rescue prompt
-
When GRUB2 is unable to find the GRUB folder or its contents are missing or corrupted, it displays the prompt
This means it failed to load thegrub rescue>
normal
module. howtoforge.comFrom GRUB rescue prompt:
After booting the system, GRUB should be updated and reinstalled:set prefix=(hd0,1)/boot/grub set root=(hd0,1) insmod normal normal
Update GRUB config file
Reinstall GRUBupdate-grub
grub-install /dev/sdx
Commands
grub-mkconfig
- Generate GRUB configuration
grub-mkconfig -o /boot/grub/grub.cfg
grub2-mkconfig
-
grub2-mkconfig is used to create a GRUB2 config file from the settings defined in /etc/default/grub
grub2-mkconfig -o=/boot/grub2/grub.cfg
grub2-editenv
-
Disable the Nouveau display driver while installing the proprietary Nvidia display driver on Fedora
grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) nouveau.modeset=0"
update-grub
- Update GRUB config file
update-grub