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.
- boot your droplet with a Recovery ISO - TigerShark
- Network must be configured, either manually or via TigerShark script.
mount -rw -o remount /dev/vda1 /mnt
chroot /mnt
unlink /etc/resolv.conf && echo "nameserver 8.8.8.8" > /etc/resolv.conf
apt-get install init
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