This past weekend I decided to do some rewiring of my home lab and accidentally pulled the power to the host that my VCSA was running on. While booting my VCSA 6 was booting back up I received the following error:
1 2 |
fsck failed. Please repair manually and reboot. The root file system is currently mounted ready-only. To remount it read-write do: bash# mount -n -o remount,rw |
When I logged in and attempted to launch the BASH shell (shell.set –enabled True), I got a message saying unknown command. Turns out on this CLI you are not able to launch the BASH shell.
To launch the BASH shell reboot your VCSA by hitting CTRL+D. On the menu screen below hit the arrow up or down to stop the countdown. Then on the second option hit p and type your root password to unlock additional options.
Ensure the second line named kernel is selected then hit e to edit the line.
Add the following to the very end of this screen then hit Enter:
init=/bin/bash
Now hit b to boot the edited kernel line:
Note: This change is a one time thing. Once the VCSA is rebooted that line will not be there and will boot as normal. To boot back into BASH you will have to repeat the steps above.
Once booted you can now run the fsck command to fix the troubled directory.
fsck /dev/sda3
For Connect to /lost+found<y>? enter Y
On the questions enter y to resolve any issues fsck finds. Once finished type reboot to let the VCSA boot normally.
fsck should have fixed your issues and VCSA should boot as normal!
If this worked as advertised or had any further issues post below!
This article really helped me a lot. Thank u.
You are the man!
Thank you for this nice article. helped me a lot!
This is what I needed! Thanks, going nuts trying to figure out why the commands were not working!!
great article bro, thank you
This worked as advertised. Great article.
Thank you for posting this. Very helpful.
world needs people like you Even though I was frustrated and was ready to give up and create another vcenter.. and I came across this article
My only question how did you get to this ? Appreciate it
Thank you very much, this article was very helpful!
Thanks you’re a lifesaver!!
as above great stuff
my man.
simple, helpful and on point.
thank you very much
The reboot command is not recognized, not /sbin/reboot.
‘exit’ causes kernel panic 🙁
I rebooted the machine via vm reboot
Thank you!