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. :-)
- 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
)
- fix droplet config symlink
mount -rw /
unlink /etc/rc.digitalocean.d/droplet.conf
ln -s /etc/rc.digitalocean.d/* /etc/rc.digitalocean.d/droplet.conf
- https://wycd.net/posts/2017-05-19-fixing-freebsd-networking-on-digital-ocean.html
- set up networking
service netif restart
service routing restart
ifconfig vtnet0 | grep inet
looking better?cat /etc/rc.digitalocean.d/droplet.conf
-defaultrouter
route add default ...
- https://www.cyberciti.biz/faq/freebsd-setup-default-routing-with-route-command/
- fix other parts of the system
pkg install -y python27
- I had removed it but the cloud init scripts need itservice 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
https://www.digitalocean.com/community/tutorials/recommended-steps-for-new-freebsd-12-0-servers
https://cloudinit.readthedocs.io/en/latest/topics/network-config.html