Bookmark this page

Lab: Troubleshooting Boot Issues

Fix an issue where a system fails to boot past the boot loader screen.

Outcomes

You should be able to repair issues where a system fails to boot past the boot loader.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start boot-review

This command confirms that the required hosts for this exercise are accessible and provides a working kernel.

Instructions

Someone decided to shorten the boot process of the servera system. Doing this process, they broke the ability of servera to boot to its default target.

You are asked to make servera boot properly again.

  1. Open a console to your servera machine and troubleshoot the problem.

    1. What is displayed on the servera console? If a GRUB menu is displayed, attempt to boot the default (select) entry.

      error: ../../grub-core/loader/i386/pc/linux.c:170:invalid magic number.
      error: ../../grub-core/loader/i386/pc/linux.c:421:you need to load the kernel first.
      
      Press any key to continue...
    2. What can this message mean?

      This error message typically indicates that no kernel is defined in the menu entry, or that the ramdisk is being loaded before the kernel.

  2. Temporarily boot your servera system to a working configuration.

    1. What are the fix options? Verify whether a first entry boots, in this case the rescue entry, or manually edit the configuration in memory to temporarily solve the issue.

    2. Use the grub menu to boot another working entry.

  3. Permanently fix the issue.

    1. Log in to the servera system and switch to the root user.

      [student@workstation ~]$ ssh student@servera
      ...output omitted...
      [student@servera ~]$ sudo -i
      [sudo] password for student: student
      [root@servera ~]#
    2. Use the list of installed kernels to re-create a working /boot/grub2/grub.cfg file.

      [root@servera ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
    3. Use grubby to review the newly added entry and set it as the default boot entry.

      [root@servera ~]# grubby --info=ALL
      [root@servera ~]# grubby --set-default=/boot/vmlinuz-4.18.0-305.el8.x86_64
    4. Verify the solution by rebooting the servera system.

      [root@servera ~]# reboot

Evaluation

On the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the script until you receive a passing grade.

[student@workstation ~]$ lab grade boot-review

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish boot-review

Revision: rh342-8.4-6dd89bd