When aptitude removes the kernel and you accidentally reboot

1's picture



it's not necessary to panic.

Installing any small distro on a USB or CD will solve the problem, providing it is of comparable age to your current system.

Once you boot in the rescue distribution, mount --bind all the volatile and living data like /dev /proc and /sys (perhaps even some subdirs
from var, although i got away without this) to corresponding directories of the non-functioning system, then chroot /mnt/kernelessdistropath
and install the kernel, or any other fundamental building block of a Unix system which made it inaccessible.