If your Linux operating system has booted into the GRUB console (rescue mode), it's likely that it couldn't find the bootloader configuration file, or the file system is corrupted. Below, we'll explain how to manually boot your system from this console.
1. List the available partitions
First, load the necessary GRUB modules by running the following commands (they are usually already loaded):
# insmod normal
# normal
# insmod linux
Then you need to list the partitions to identify which one contains the system:
# ls
# ls (hd0,gpt2)/
Look for one that contains paths like /boot/, /vmlinuz, or /initrd.img.
2. Set the root partition
Once you've found the partition with the system, set it as the root. For example, if it's (hd0,gpt2):
# set root=(hd0,gpt2)
3. Load the kernel
Use the ls
command to see which kernel version is available:
# ls /boot/
Then, load the kernel (replace with the actual version and partition):
# linux /boot/vmlinuz root=/dev/sda2
4. Load the initrd image
Load the corresponding initial RAM disk image:
# initrd /boot/initrd.img
5. Boot the system
Finally, boot the system:
# boot
What next?
If you're able to boot, you should update GRUB to prevent this from happening again. From a terminal in your system, run:
# update-grub
And if needed, reinstall GRUB:
# grub-install /dev/sda
This should restore your system's normal boot process and allow it to boot properly on the next restart.
We hope this article has been helpful. And remember, if you have any questions about this or any other issue related to your servers at Clouding, don’t hesitate to reach out to soporte@clouding.io. We're here to help you with whatever you need!