0

Update 24hrs, took all day. Thanks for all your help. New hard drive, Ubuntu install & then testdisk & maybe e2fsck gained almost full accesss to the failed/blocked ext4 partition (which had lost its ext4 format description in Gparted). I have yet to see whether the ext4 partition OS might now even boot up. Doubt it. Unfortunately I am not sure at exactly what point access was fully regained, whether the first part of testdisk worked, or e2fsck which followed it. I gave up some way through e2fsck .............regarding testdisk, one frustration was that it wasn't obvious to me beginner that this is a terminal operated programme, so I wasted loads of time trying to find the installed programme. Hope this all helps someone.

####################

details................ Made no progress using Ubuntu live CD and the suggested methods - the terminal tasks suggested did not make any progress with accessing/repairing the ext4 partition. A new hard drive was in order, I loaded up Ubuntu, and then looked further at the old hard drive. Its NTFS partition was still fine, but nothing would access the ext4 partition.

However I then tried the test disk programme , and this went through various processes and suggested a certain way of using e2fsck .

Then the ext4 partition became accessible ?????? so testdisk got me there I know not how, and I could copy all my data across to the new hard drive. I think I'm missing my bookmarks and passwords as I can't find them, but I have them elsewhere.

One problem suggested online that this can happen when the partition gets very full, but this doesn't appear to my case. Knowing very little about OS etc, I just imagine the ext4 format / top of the file 'tree' got corrupted. The disc only had max 2 bad sectors. I reckon upgrading through various Ubuntu versions over the years introduced some problems which I was ignoring, or maybe the hard drive has failed in this sector.

#

ORIGINAL PROBLEM,,,,,,,I've been using Ubuntu for a few years on a laptop and external hard drive which has two partitions, one for back-up duties (still works fine) and one for Ubuntu. Suddenly Ubuntu 14.04 won't boot and I am doing this from Ubuntu on CD drive. The Ubuntu partition shown in Gparted has no file system or mount point defined, and is marked black.

Gparted

fdisk, reinstall halt, more Gparted info

My questions are what may have happened, is the data and Ubuntu OS in this partition likely to still be present or has this partition been cleared, maybe by malware (is that likely?)? How to proceed? I imagine it's not a simple matter of redefining its file system to ext4?

Most of my data is backed up, and I have spent a couple of hours looking at this, although have limited knowledge of partitions and Grub etc.

$ sudo e2fsck -n /dev/sda2
Fix? no
Directories count wrong for group #320 (0, counted=1361).
Fix? no
Free inodes count wrong for group #321 (8192, counted=8184).
Fix? no
Free inodes count wrong for group #322 (8192, counted=4039).
Fix? no
Free inodes count wrong for group #323 (8192, counted=3958).
Fix? no
Free inodes count wrong for group #324 (8192, counted=4022).
Fix? no
Free inodes count wrong for group #325 (8192, counted=4061).
Fix? no
Free inodes count wrong for group #326 (8192, counted=4172).
Fix? no
Free inodes count wrong for group #327 (8192, counted=4093).
Fix? no
Free inodes count wrong for group #328 (8192, counted=4076).
Fix? no
Free inodes count wrong for group #329 (8192, counted=4048).
Fix? no
Free inodes count wrong for group #330 (8192, counted=4056).
Fix? no
Free inodes count wrong for group #331 (8192, counted=4119).
Fix? no
Free inodes count wrong for group #332 (8192, counted=4001).
Fix? no
Free inodes count wrong for group #333 (8192, counted=4035).
Fix? no
Free inodes count wrong for group #334 (8192, counted=4057).
Fix? no
Free inodes count wrong for group #335 (8192, counted=3895).
Fix? no
Free inodes count wrong for group #336 (8192, counted=5).
Fix? no
Directories count wrong for group #336 (0, counted=844).
Fix? no
Free inodes count wrong for group #337 (8192, counted=6023).
Fix? no
Directories count wrong for group #337 (0, counted=47).
Fix? no
Free inodes count wrong for group #352 (8192, counted=2302).
Fix? no
Directories count wrong for group #352 (0, counted=698).
Fix? no
Free inodes count wrong for group #368 (8192, counted=0).
Fix? no
Directories count wrong for group #368 (0, counted=1025).
Fix? no
Free inodes count wrong for group #369 (8192, counted=5634).
Fix? no
Directories count wrong for group #369 (0, counted=334).
Fix? no
Free inodes count wrong for group #384 (8192, counted=3342).
Fix? no
Directories count wrong for group #384 (0, counted=1358).
Fix? no
Free inodes count wrong for group #400 (8192, counted=106).
Fix? no
Directories count wrong for group #400 (0, counted=1142).
Fix? no
Free inodes count wrong for group #401 (8192, counted=0).
Fix? no
Directories count wrong for group #401 (0, counted=135).
Fix? no
Free inodes count wrong for group #402 (8192, counted=7820).
Fix? no
Directories count wrong for group #402 (0, counted=82).
Fix? no
Free inodes count wrong for group #416 (8192, counted=0).
Fix? no
Directories count wrong for group #416 (0, counted=1313).
Fix? no
Free inodes count wrong for group #417 (8192, counted=6760).
Fix? no
Directories count wrong for group #417 (0, counted=49).
Fix? no
Free inodes count wrong for group #432 (8192, counted=2182).
Fix? no
Directories count wrong for group #432 (0, counted=1362).
Fix? no
Free inodes count wrong for group #448 (8192, counted=1575).
Fix? no
Directories count wrong for group #448 (0, counted=1362).
Fix? no
Free inodes count wrong for group #464 (8192, counted=289).
Fix? no
Directories count wrong for group #464 (0, counted=1318).
Fix? no
Free inodes count wrong for group #480 (8192, counted=0).
Fix? no
Directories count wrong for group #480 (0, counted=1280).
Fix? no
Free inodes count wrong for group #481 (8192, counted=4735).
Fix? no
Directories count wrong for group #481 (0, counted=83).
Fix? no
Free inodes count wrong for group #496 (8192, counted=2610).
Fix? no
Directories count wrong for group #496 (0, counted=1287).
Fix? no
Free inodes count wrong for group #512 (8192, counted=3470).
Fix? no
Directories count wrong for group #512 (0, counted=1272).
Fix? no
Free inodes count wrong for group #528 (8192, counted=3466).
Fix? no
Directories count wrong for group #528 (0, counted=1262).
Fix? no
Free inodes count wrong for group #544 (8192, counted=3333).
Fix? no
Directories count wrong for group #544 (0, counted=1295).
Fix? no
Free inodes count wrong for group #560 (8192, counted=1314).
Fix? no
Directories count wrong for group #560 (0, counted=1312).
Fix? no
Free inodes count wrong for group #576 (8192, counted=38).
Fix? no
Directories count wrong for group #576 (0, counted=1211).
Fix? no
Free inodes count wrong for group #577 (8192, counted=7500).
Fix? no
Directories count wrong for group #577 (0, counted=75).
Fix? no
Free inodes count wrong for group #592 (8192, counted=2756).
Fix? no
Directories count wrong for group #592 (0, counted=1297).
Fix? no
Free inodes count wrong for group #608 (8192, counted=397).
Fix? no
Directories count wrong for group #608 (0, counted=1275).
Fix? no
Free inodes count wrong for group #624 (8192, counted=2240).
Fix? no
Directories count wrong for group #624 (0, counted=1327).
Fix? no
Free inodes count wrong for group #640 (8192, counted=1989).
Fix? no
Directories count wrong for group #640 (0, counted=1263).
Fix? no
Free inodes count wrong for group #656 (8192, counted=407).
Fix? no
Directories count wrong for group #656 (0, counted=1330).
Fix? no
Free inodes count wrong for group #657 (8192, counted=7387).
Fix? no
Free inodes count wrong for group #672 (8192, counted=3049).
Fix? no
Directories count wrong for group #672 (0, counted=1324).
Fix? no
Free inodes count wrong for group #688 (8192, counted=0).
Fix? no
Directories count wrong for group #688 (0, counted=952).
Fix? no
Free inodes count wrong for group #689 (8192, counted=6532).
Fix? no
Directories count wrong for group #689 (0, counted=376).
Fix? no
Free inodes count wrong for group #704 (8192, counted=3494).
Fix? no
Directories count wrong for group #704 (0, counted=1327).
Fix? no
Free inodes count wrong for group #720 (8192, counted=3238).
Fix? no
Directories count wrong for group #720 (0, counted=1333).
Fix? no
Free inodes count wrong for group #736 (8192, counted=3468).
Fix? no
Directories count wrong for group #736 (0, counted=1310).
Fix? no
Free inodes count wrong for group #737 (8192, counted=5388).
Fix? no
Free inodes count wrong for group #752 (8192, counted=4234).
Fix? no
Directories count wrong for group #752 (0, counted=1317).
Fix? no
Free inodes count wrong for group #753 (8192, counted=4523).
Fix? no
Free inodes count wrong for group #768 (8192, counted=2632).
Fix? no
Directories count wrong for group #768 (0, counted=1311).
Fix? no
Free inodes count wrong for group #769 (8192, counted=4607).
Fix? no
Free inodes count wrong for group #784 (8192, counted=3858).
Fix? no
Directories count wrong for group #784 (0, counted=1310).
Fix? no
Free inodes count wrong for group #800 (8192, counted=3195).
Fix? no
Directories count wrong for group #800 (0, counted=1309).
Fix? no
Free inodes count wrong for group #816 (8192, counted=94).
Fix? no
Directories count wrong for group #816 (0, counted=1061).
Fix? no
Free inodes count wrong for group #817 (8192, counted=3151).
Fix? no
Directories count wrong for group #817 (0, counted=248).
Fix? no
Free inodes count wrong for group #832 (8192, counted=2173).
Fix? no
Directories count wrong for group #832 (0, counted=1309).
Fix? no
Free inodes count wrong for group #848 (8192, counted=3180).
Fix? no
Directories count wrong for group #848 (0, counted=1310).
Fix? no
Free inodes count wrong for group #864 (8192, counted=1128).
Fix? no
Directories count wrong for group #864 (0, counted=1138).
Fix? no
Free inodes count wrong for group #865 (8192, counted=7546).
Fix? no
Free inodes count wrong for group #880 (8192, counted=2464).
Fix? no
Directories count wrong for group #880 (0, counted=1342).
Fix? no
Free inodes count wrong for group #896 (8192, counted=0).
Fix? no
Directories count wrong for group #896 (0, counted=1281).
Fix? no
Free inodes count wrong for group #897 (8192, counted=7746).
Fix? no
Directories count wrong for group #897 (0, counted=69).
Fix? no
Free inodes count wrong for group #912 (8192, counted=3639).
Fix? no
Directories count wrong for group #912 (0, counted=1313).
Fix? no
Free inodes count wrong for group #928 (8192, counted=2391).
Fix? no
Directories count wrong for group #928 (0, counted=1362).
Fix? no
Free inodes count wrong for group #944 (8192, counted=3038).
Fix? no
Directories count wrong for group #944 (0, counted=1362).
Fix? no
Free inodes count wrong for group #960 (8192, counted=2423).
Fix? no
Directories count wrong for group #960 (0, counted=1087).
Fix? no
Free inodes count wrong for group #976 (8192, counted=8007).
Fix? no
Directories count wrong for group #976 (0, counted=1).
Fix? no
Free inodes count wrong for group #992 (8192, counted=8191).
Fix? no
Directories count wrong for group #992 (0, counted=1).
Fix? no
Free inodes count wrong for group #1008 (8192, counted=8190).
Fix? no
Directories count wrong for group #1008 (0, counted=1).
Fix? no
Free inodes count wrong for group #1024 (8192, counted=8186).
Fix? no
Directories count wrong for group #1024 (0, counted=3).
Fix? no
Free inodes count wrong for group #1040 (8192, counted=436).
Fix? no
Directories count wrong for group #1040 (0, counted=330).
Fix? no
Free inodes count wrong for group #1041 (8192, counted=7091).
Fix? no
Directories count wrong for group #1041 (0, counted=73).
Fix? no
Free inodes count wrong for group #1056 (8192, counted=7786).
Fix? no
Directories count wrong for group #1056 (0, counted=3).
Fix? no
Free inodes count wrong for group #1088 (8192, counted=8039).
Fix? no
Directories count wrong for group #1088 (0, counted=1).
Fix? no
Free inodes count wrong for group #1120 (8192, counted=8183).
Fix? no
Directories count wrong for group #1120 (0, counted=8).
Fix? no
Free inodes count wrong for group #1136 (8192, counted=8191).
Fix? no
Directories count wrong for group #1136 (0, counted=1).
Fix? no
Free inodes count wrong for group #1152 (8192, counted=7849).
Fix? no
Directories count wrong for group #1152 (0, counted=5).
Fix? no
Free inodes count wrong for group #1184 (8192, counted=8191).
Fix? no
Directories count wrong for group #1184 (0, counted=1).
Fix? no
Free inodes count wrong for group #1344 (8192, counted=8100).
Fix? no
Directories count wrong for group #1344 (0, counted=3).
Fix? no
Free inodes count wrong for group #1360 (8192, counted=8191).
Fix? no
Directories count wrong for group #1360 (0, counted=1).
Fix? no
Free inodes count wrong for group #1408 (8192, counted=5).
Fix? no
Directories count wrong for group #1408 (0, counted=1299).
Fix? no
Free inodes count wrong for group #1409 (8192, counted=7288).
Fix? no
Directories count wrong for group #1409 (0, counted=4).
Fix? no
Free inodes count wrong for group #1424 (8192, counted=4415).
Fix? no
Directories count wrong for group #1424 (0, counted=680).
Fix? no
Free inodes count wrong for group #1472 (8192, counted=638).
Fix? no
Directories count wrong for group #1472 (0, counted=591).
Fix? no
Free inodes count wrong for group #1473 (8192, counted=84).
Fix? no
Directories count wrong for group #1473 (0, counted=550).
Fix? no
Free inodes count wrong for group #1474 (8192, counted=5668).
Fix? no
Directories count wrong for group #1474 (0, counted=201).
Fix? no
Free inodes count wrong (12222453, counted=11367656).
Fix? no
/dev/sda2: ********** WARNING: Filesystem still has errors **********
          11 inodes used (0.00%, out of 12222464)
         722 non-contiguous files (6563.6%)
         495 non-contiguous directories (4500.0%)
             # of inodes with ind/dind/tind blocks: 2/2/2
             Extent depth histogram: 517155/125
      815037 blocks used (1.67%, out of 48876800)
           0 bad blocks
           1 large file
      418807 regular files
       79999 directories
          57 character device files
          26 block device files
           0 fifos
           9 links
       80790 symbolic links (62315 fast symbolic links)
           5 sockets
------------
      579654 files
  • Looks like the file system on sda2 is very broken. What's the output of sudo e2fsck -vn /dev/sda2 (-n means to no alter the file system in any way)? – David Foerster Feb 8 '16 at 11:20
  • Please edit your question, when you want to add information. Especially file or program output listings (with the help of the {} button in the editor toolbar) are much more readable there and overall it's best to have everything relevant in one place. Also, comments may be deleted for various reasons. – David Foerster Feb 8 '16 at 11:28
  • 1
    Possible duplicate of Tool for recovering deleted data from a flash drive – same as for any drive. – David Foerster Feb 8 '16 at 11:44
1

Edit: Reading the full e2fsck output, I don't believe that the file system is salvageable. You will need to perform data recovery, format the partition and re-install Ubuntu.

From the e2fsck output, it looks like the file system was damaged badly. The super-block is lost but the back-up super-block is still usable. You can try to fix the issue (see later), but you may lose data in the process. That's why you should back up the whole partition first.

  1. Perform a back-up to a suitably large target medium of your choice. The simplest way is cloning with the dd command.

  2. Repair the file system inside sda2:

    sudo e2fsck -p /dev/sda2
    
  3. Cross your fingers and try to mount the partition. See whether it looks fine. Then decide what to do next based on the outcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.