0

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.

  • 1
    As an extra comment, every tool I tried (fdisk, gparted, ...) seem to detect a valid partition and do not report any issue. I have only issues mounting the partition with grub-mount (and of course, booting). – user3121424 Jun 28 '18 at 14:29

1 Answers1

0

The easiest way is to copy your files, recreate the filesystem, format and then copy your files back. I don't think it worth trying to repair it.

Jonas Bjork
  • 376
  • 1
  • 4
  • Thank you. Would you recommend any tool in particular? dd, rsync or dump/restore? I have never backed up the whole root device (including dev, proc, sys, and so on...) – user3121424 Jun 29 '18 at 09:26
  • dd would transfer the bad parts as well so don't use dd. i would simply mount the volume in another linux machine and use cp – Jonas Bjork Jun 29 '18 at 10:06