How recover from a bad update and no /sbin/init

Never lose your hopes!

I've also faced a crash after apt-get install has installed some new packages... and at next reboot BANG! /sbin/init: No such file or directory. Also said /etc/init: Permission denied. Also said /bin/sh: 0: can't access tty; job control turned off.

Filesystem remained untouched at /dev/vda1 and fsck.ext4 returned: clean!

After a loooong research session, this worked for me: +1 to hill - a user from launchpad.

  1. boot your droplet with a Recovery ISO - TigerShark
  2. Network must be configured, either manually or via TigerShark script.
  3. mount -rw -o remount /dev/vda1 /mnt
  4. chroot /mnt
  5. unlink /etc/resolv.conf && echo "nameserver 8.8.8.8" > /etc/resolv.conf
  6. apt-get install init
  7. update-initramfs -u

After reboot your system. It will work fine. Enjoy!

References:

https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1652462 https://wiki.ubuntu.com/SystemdForUpstartUsers