Skip to content

Instantly share code, notes, and snippets.

@orangecms
Last active June 11, 2021 16:24
Show Gist options
  • Save orangecms/0395cb46eb0220224ed67b9495c00cd1 to your computer and use it in GitHub Desktop.
Save orangecms/0395cb46eb0220224ed67b9495c00cd1 to your computer and use it in GitHub Desktop.
Fix FreeBSD Digital Ocean droplets

Digital Ocean FreeBSD droplet recovery

About

One of my DO droplets was no longer reachable. It was powered on, I could see the console in the DO web UI, but I had only set up the system to only allow logging in via SSH / key. I tried recovering from a few backups (weekly backups were set up), but non of them did the trick. It's nothing too important, just my personal blog that could really use another entry by now, and a little page introducing myself. Anyway, I hope these notes here may help other people at some point, including my future self. :-)

What I did

  1. boot into recovery
  • reboot => GRUB (Ctrl + Alt + DEL works, may be useful later also to recheck)
  • edit Load Hard Disk Bootloader
  • set root=(hd0) only, remove partition!
  • in FreeBSD bootloader: boot into single user mode (2)
  1. fix droplet config symlink
  1. set up networking
  1. fix other parts of the system
  • pkg install -y python27 - I had removed it but the cloud init scripts need it
  • service digitalocean restart
  • doboot_enable="YES" in /etc/rc.conf? Something else...?
  • reboot to check if it works, possibly repeat
  • when desperate: cat /etc/rc.digitalocean.d/droplet.conf >> /etc/rc.conf

Additional references

https://www.digitalocean.com/community/tutorials/recommended-steps-for-new-freebsd-12-0-servers

https://cloudinit.readthedocs.io/en/latest/topics/network-config.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment