rsnt_translations
56,420
edits
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
<!--T:8--> | <!--T:8--> | ||
That will boot the kernel, initialize <code>initrd</code> and execute <code>/bin/bash</code> as the <code>init</code> process. Now, we basically landed in memory and are mounted r/o, since the userspace <code>init</code> process is supposed to take care of the root filesystem; the kernel just needs to know where to find it before it hands over the control. To do a useful recovery, the next steps will be to remount the initrd filesystem r/w, mount the OS image disk, chroot into it, set a root password and restart the VM. After a successful restart, we can | That will boot the kernel, initialize <code>initrd</code> and execute <code>/bin/bash</code> as the <code>init</code> process. Now, we basically landed in memory and are mounted r/o, since the userspace <code>init</code> process is supposed to take care of the root filesystem; the kernel just needs to know where to find it before it hands over the control. To do a useful recovery, the next steps will be to remount the initrd filesystem r/w, mount the OS image disk, chroot into it, set a root password and restart the VM. After a successful restart, we can log in as root. Take note that bash has no <code>reboot</code> or any power control mechanism, so we have to unmount everything cleanly and stop the VM. | ||
<!--T:9--> | <!--T:9--> | ||
Line 41: | Line 41: | ||
<!--T:16--> | <!--T:16--> | ||
After the VM has started, you can now | After the VM has started, you can now log in as user root with the password you have chosen. Once completed, remove the root password again, or disable direct root logins via SSH. | ||
== CentOS7 recovery == <!--T:17--> | == CentOS7 recovery == <!--T:17--> |