Grub: Boot frozen

The boot process with grub may be frozen at different stages, for a variety of reasons. This page aims to list possible scenarios, and redirect the user to a proper fix, according to scenario.

Frozen at "GRUB" after nvidia driver upgrade

boot computer, but before any grub boot menu is displayed, the monitor is black with the only letters "GRUB" written on it.
This happened just after a broken nvidia driver upgrade.

The general steps to fix the problem were:
1- boot into the system using a rescue disk.

Debugging grub

Table of Contents

Here are some tips for debugging strategies for grub.

During the boot process, you can press the Pause|Break key on your keyboard, and press Return to resume.


See in the manual: 14.3.13 echo.

Use echo statements:

echo    'Loading initial ramdisk...'


if [ -e /boot/grub/example/test1.cfg ]; then
    echo "Here"
    echo "There"

configuration file

See also in the official manual the section: "5.4 Embedding a configuration file into GRUB".


Kernel boot parameters

Official documentation

See: man bootparam.
For up-to-date information, see the kernel source file Documentation/kernel-parameters.txt (usually within /usr/src/linux/).

Getting started

Understanding your system

There are 3 types of boot parameters:
1) linux kernel parameters, e.g. log_buf_len=1M
2) module parameter, with the module name and the parameter separated by a dot, e.g. nvidia-drm.modeset=1



This script generate the following in grub.cfg:

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
### END /etc/grub.d/41_custom ###

It references /boot/grub/custom.cfg, a custom file which can be used to add additional entries.

Where is ${config_directory} set?

man grub-editenv

Syndicate content