Boot drops to a (initramfs) prompts/busybox
Solution 1:
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
If reboot
doesn't work, try exit
.
and that's it, I got back into the filesystem without any errors.
Solution 2:
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y