Thursday, September 24, 2015

boot - ext4 corruption leading to unbootable disk. Partition is mountable, but grub detects unknown filesystem

I'm trying to recover from a system disk corruption issue without having to reinstall the OS, which would be super-painful currently.



I'm using Ubuntu 18.04, the affected partition is ext4 and on a SSD disk.



Summary:





  • Root partition gets remounted read-only after some error.

  • df -h shows a huge partition (ZB) instead of the 800GB it should be.

  • Boot with a live USB.

  • Repair partition with fsck -v. Fixed some errors (orphaned inode and size is xxx should be 0).

  • Mount the partition, looks fine. Can navigate, edit files, everything seems to be there and looking good.

  • Reboot, the partition is now unbootable. I get the grub console, I can't grub> ls the partition; error is "error: unknown filesystem.". I get the same error from the live USB with "grub-mount /dev/sdb2 /mnt"

  • I try to repair using Boot Repair. Unsuccessful, but now I have this log with a report.




Any ideas? To me the inconsistency between successfully mounting the partition with mount and unsuccessfully with grub-mount seems really strange. I guess if I could fix this I would be able to boot normally again.



Thank you a lot.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...