rsnt_translations
56,420
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
<!--T:3--> | <!--T:3--> | ||
If the VM can't be accessed anymore via | If the VM can't be accessed anymore via SSH or via a local user, the OS can be booted into single user mode or a recovery kernel can be launched, which provides privileged access to the OS image. The only requirement is that the boot manager is accessible and can be modified. | ||
== Debian10 recovery == <!--T:4--> | == Debian10 recovery == <!--T:4--> | ||
<!--T:5--> | <!--T:5--> | ||
The recovery procedure is not that easy and convenient as you would expect from CentOS | The recovery procedure is not that easy and convenient, as you would expect from CentOS; the functionality is the same or at least similar. Most cloud images have the root account locked, so just booting single user won't help us. However, when a Linux-based system boots, regardless what flavor it is, the kernel gives up the control into userspace for all things related to userspace, like running daemons, etc. That is done as soon as all the hardware is initialized, then the kernel runs a single userspace binary, called the <code>init</code> process which always has PID1; in most recent distributions it is either <code>systemd</code>, <code>systemV</code> or <code>upstart</code>. Via the bootmanager we are able to modify that and tell the kernel to execute a shell instead and manually mount the image filesystem and do our recovery operations. The debian10 image comes with grub2 as well, but the menu looks a little different; however, the keys and key combinations we need to use are all the same. Reboot or boot the system until you see the grub menu then hit <code>e</code> for edit and remove the serial consoles and add <code>init=/bin/bash</code> to let the kernel know the new <code>initprocess. | ||
<!--T:6--> | <!--T:6--> |