Find largest folder in ssh

cPanel server booting to grub menu

So you recently updated and you rebooted and now your cPanel server is not booting and instead booting to a Grub prompt?:




This is typically due to the system not being able to find the root partition in Grub, so it boots to the Grub menu to allow you to further diagnose why it is not booting.

How do I fix this?

First, you need to find the partition Grub is located. Using the "ls" command to list the current partitions you can find it:




This will list the partitions, such as (hd0,1) (hd0,2) (md/md2), etc.

In this example, we will assume the partition is "(md/md2)".

We can then look further for "grub" by running:


ls (md/md2)/


That will list all folders in " / " on that partition.

In this example, grub was located in "/boot/grub".

Now we need to set the boot parameters using the above info we just got and then boot normally (Enter each line at the grub prompt and press enter after each line):


set prefix=(md/md2)/boot/grub
set root=(md/md2)
insmod linux
insmod normal


If you entered the above correctly and set the correct path to Grub, the system should now boot normally!

If the above does not work, check your syntax and check that your path to Grub is correct. There are several "flavors" of Linux, so your path to Grub may be different than the above example.

Good luck!