Interview Prep/Linux/Boot, time, cron and kernel

A server shows a `grub>` prompt instead of booting.

AdvancedTroubleshootingBoot, time, cron and kernel
Answer

Likely causes → GRUB can't find its config (grub.cfg missing or wrong partition), often after disk changes, a failed update or a resized/moved /boot.

Diagnose → At the prompt:

grub> ls
grub> ls (hd0,gpt2)/

Find the partition with /boot/vmlinuz-* or /grub2/grub.cfg.

Fix → Boot manually:

grub> set root=(hd0,gpt2)
grub> linux /vmlinuz-<ver> root=/dev/mapper/vg0-root ro
grub> initrd /initramfs-<ver>.img
grub> boot

Then regenerate: grub2-mkconfig -o /boot/grub2/grub.cfg (BIOS) or the EFI path, and reinstall GRUB if needed (grub2-install /dev/sda on BIOS).

Prevent → Keep a tested rescue procedure and don't touch /boot layout without a snapshot.

All Linux questions Roadmap: Linux

More on Boot, time, cron and kernel