Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linux partition (Ubuntu 12.10 upgraded to 13.4) on a machine that originally came with Windows 7. Windows 7 was working unusually slow (still is, and was still running slow after reinstallation) and some lowlevel disk utilities apparently show some problem in the HD.

I mainly mounted Ubuntu to check if I could still access some data, and Ububtu was working fine, so I kept using it. I made a lot of symbolic links to the NTFS partition and most of my work was being saved in the Windows partition. However there are a couple of important files that are in the Ext4 partition (plus hours of configuration I'd hate to lose)

Yesterday morning I was unable to load Ubuntu. Windows was still too slow to mount the Ext4 partition or to perform any work. Now I'm working from the Ubuntu 12.10 live CD, with all limitations a Live CD have. From the Live CD I see easily the NTFS partition but not the Ext4 partition.

Manual mount commands

sudo mount /dev/sda4 /mnt

fail. I have tested with options -t ext4 and -o data=writeback. Running

dmesg | tail

I get

[78760.734556] end_request: I/O error, dev sda, sector 1649683273
[78760.734570] ata1: EH complete
[78760.752290] JBD2: Failed to read block at offset 104
[78760.752972] JBD2: recovery failed
[78760.752978] EXT4-fs (sda4): error loading journal

So now: if I can reconstruct the journal (or fix the Linux partition by any means) it would be my preferable solution.

If I cannot, at least I need a method to access information in the ext4 partition so I can backup it. I suspect that I have to buy a new hard disk.

Thank you in advance.

share|improve this question

migrated from serverfault.com Jun 9 '13 at 0:02

This question came from our site for professional system and network administrators.

    
Bad sectors is normally hardware error :( –  Bolli Jun 9 '13 at 0:11
    
In case you like the features of the "VERY DANGEROUS" category you can make hdparm write this sector. You will lose its data but if the sector cannot be read anyway that should not matter. See the man page of hdparm, option --write-sector. After that you should run e2fsck -f before trying to mount. –  Hauke Laging Jun 9 '13 at 0:22
    
Which sector should I have to write? –  Carlos Eugenio Thompson Pinzón Jun 9 '13 at 1:07

1 Answer 1

up vote 0 down vote accepted

If you have an external drive, you can do a dd of the entire drive, to say an ISO file, and mount the ISO afterwards.

But it will be the same size as your drive, so you need a lot of space (on another drive) to do this.

Look here: http://serverfault.com/questions/4906/using-dd-for-disk-cloning

share|improve this answer
    
Wouldn't the ISO clone the corrupted journal, and therefor having the same problem as I have now_ –  Carlos Eugenio Thompson Pinzón Jun 9 '13 at 1:06
    
@CarlosEugenioThompsonPinzón Maybe, but you could now try a lot of things on that ISO without being afraid to loose data. Also I have done exactly the above, from a drive with many more bad sectors, and the ISO mounted fine. –  Bolli Jun 9 '13 at 9:08
    
Done. Using ddrescue. I could mount the image and apparently the info I need is there. The next step would be to recreate the partition from the image (or to reinstall and used the image as backup for the data). –  Carlos Eugenio Thompson Pinzón Jun 9 '13 at 14:50
    
Glad it worked out. :) –  Bolli Jun 9 '13 at 16:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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