Question

My Droplet wont boot, goes directly to grub rescue (Ubuntu 18)

Posted September 5, 2020 536 views
UbuntuConfiguration ManagementSystem ToolsUbuntu 18.04

Hey!

All I get is
“Booting from Hard Disk…”
“error: symbol ‘grub_calloc’ not found”
“Entering resuce mode…”

and then
grub rescue>

I’ve tried everything, including booting from recovery and tried to reinstall grub and stuff but nothing works, im panicking cause destroying the droplet and creating a new one would mean I have to rebuild my mongoDB that has alot of data in it..

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

Hi,
First things first, if the environment configuration of your droplet is difficult to replicate, I recommend you to wait for a response from DO support team, and to not perform any action unless they instruct you to do that.

However, if you would like to get the risk, you can try to go through with it. So…

1. Using DO control panel, turn off your droplet and take its snapshot, just in case, to preserve your data.

2. Then, switch to recovery environment (Boot from Recovery ISO), turn your droplet on, and launch recovery console.

3. Choose from menu Mount Your Disk Image, and then enter Interactive Shell

4. Change root for your mounted disk. But before that, bind some system resources. Execute following commands

mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt

Now, your are in your droplet’s root directory

5. Create GRUB config file.

/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg

6. Check what your droplet’s disk is

fdisk -l

It will be a message displayed, looking like that:

Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8A3333D6-33B3-4335-985-A3522504889E1

Device     Start      End  Sectors Size Type
/dev/vda1   6144 52428766 52422623  25G Linux filesystem
/dev/vda2   2048     4095     2048   1M BIOS boot

In that case, droplet’s disk is /dev/vda

7. Install GRUB on your disk (replace /dev/vda with your droplet’s disk)

/usr/sbin/grub-install /dev/vda 

8. Exit your chrooted environment.

exit

9. Shutdown recovery environment

shutdown -h now

10. Turn on starting from your image hard drive, and turn on your droplet.

Let us know if it works, pls.

Hi @kimmymonassar,

It seems like you have updated your kernel and didn’t recreate your grub config, or atleast something similar. The best solution and step forward here would be contacting DigitalOcean’s support. They should be able to help you with booting up your droplet. You can find them on the following link :

https://www.digitalocean.com/support/

Regards,
KFSys

Tried to do it myself but it seems like the config is completely gone..

Thank, this work for me!!

Submit an Answer