Ubuntu 16.04: Can only boot in recovery mode
What happened:
- Ubuntu 16.04 works fine.
- Emergency in our building → computer was forced to shut down immediately.
- Since then: Ubuntu doesn't boot properly:
- Screen stays gray not black before login screen appears
- Recovery mode →
fsck
→ Resume boot → Everything works fine
What I found in journalctl
boot logs:
/dev/sda2 contains a file system with errors, check forced.
/dev/sda2: Resize inode not valid.
/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
I guess I need to run:
fsck -a /dev/sda2
Can it harm my system in any way? Do I need to unmount sda2
first?
fdisk -l
says:
/dev/sda1 2048 1126399 1124352 549M EFI System
/dev/sda2 1126400 3174399 2048000 1000M BIOS boot
/dev/sda3 3174400 35942399 32768000 15.6G Linux swap
/dev/sda4 35942400 7501475839 7465533440 3.5T Microsoft basic data
Solution 1:
Your filesystem is inconsistent, so you need to run fsck
as you write. It's best to unmount /dev/sda2
if possible, or boot from a Live media, and then do fsck
.
Will it harm? It will bring your filesystem back to a consistent state, clearing dangling inodes and blocks. You will probably not lose data, unless your disk is severely crashed, but then data is probably lost anyway.
A good backup from yesterday is always a good asset to have.