Fixing a corrupted partition on a virtual machine

If you ever find the following error while using vagrant or simply when booting a virtual machine, we’ll later see how to solve it.

Couldn't remount RDWR because of unprocessed orphan inode list.
Download an Ubuntu ISO Boot the virtualmachine from the ISO file: Settings -> Storage -> Add CD/DVD Device -> Choose disk

Umount /dev/sda1:

sudo umount /dev/sda1
Check damaged partition
fsck /dev/sda1
You’ll see some questions, you should answer yes to everything. When if finishes, we’ll boot the vm from the hdd. It’s could happen that it asks us for the login, in that case you should login using a visual interface. Once we log in, we save the state of the vm and the next time we’ll be able to use vagrant just fine.

Resources