Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've decided to convert my NTFS partition to ext3 and use it for backup of some important data
As a result of this operation - I'm no more able to access my data :-(
/dev/hda is primary "system" disk with Ubuntu on it, hdc is "home" disk : hdc1 NTFS (40GB), hdc2 ext2 (80GB) end hdc3 swap (500M).
hdc1 was not mounted so I executed:
# fdisk /dev/hdc1
delete partition 1, recreate new primary 1 using same sectors (1 to 5000), set it to 83
did "w"
got message with something like "kernel will use the old table since reboot" but haven't take care of it :-(
tried
# mkfs.ext3 -v /dev/hdc1 - with no problems
# mount -t ext3 /dev/hdc1 /home/backup
copied loads of important data from /dev/hdc2 into it (20GB)
a bit after problems started : unable to delete files from hdc2 partition (got strange message "can't delete, system is read-only") so I decided finally to reboot and - the catastrophe !!!
/dev/hdc1 is unrecognized
/dev/hdc2 was impossible to mount,
-> I can't find my important data, both hdc1 and hdc2 seems to be destroyed !
-> fsck problems on /dev/hdc2 .... try to run fsck manually, so i did
# fsck -y /dev/hdc2 .... lot of errors / corrections, ....
once system rebooted again, I've find only
575595 inodes used (5%)
50943 non-contiguous inodes (8.9%)
# of inodes with ind/dind/tind blocks: 44798/2952/1017
14229853 blocks used (71%)
0 bad blocks
0 large files
on the other side
# fsck.ext3 -f /dev/hdc1 gives me
e2fsck 1.38 (30-Jun-2005)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/hdc1
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
I really couldn't help if there was a way through linux to get your stuff back, but if you want you could try out steve gibsons Spin Rite program. You'll need access to a windows box to make the boot CD/disc and it will scan your hard drive (it supports almost all formats) and try to fix and recover your data.
Its 89 dollars though, so there is a price and no guarantee it works.
So what made you think you could just reformat and convert your NTFS to EXT3 and expect no data loss? Windows by default doesn't or can't recognize EXT3 filesystems so depending on how you formmatted this partition and whatever tool you used, all of your data is most likely gone. You'd need some type of data recovery program to get your data back from the sounds of it.
Unfortunately I see that I've not explained correctly the problem (sorry for my english :-(
I expected that data on NTFS (hdc1) will be removed, that's fine.
What I've not expected is that this operation will corrupt my existing ext2 partition (hdc2) !
I will try to find s.one with steve gibsons Spin Rite program - thanks for that.
Could someone also help me repair it using linux ?
Thanks, V.
and before you start any attempt at forensics you should get a blank HD (if the blank drive is not new, you should 'zero' out the drive before copying an image to it.. ) mount the damaged HD READ ONLY and make a bit for bit image (hint in Linux use dd for this) of the drive you are planning to work on. and then work on the copy or image you created, not the original drive.
Well if you formatted the drive as ext(n) the data is toast. You may recover some files here and there but the vast majority are likely zeroed out. The MFT is definitely going to be toast so you may want to try R-Tools as that software will be your very best chance of recovering data. Check it out at http://www.r-tt.com/
It is the ONLY data recovery software I've had success with. Whatever you do stay away from Stellar Phoenix (I've posted about that piece of *&%@ company previously in other threads). It will not work and they WILL refuse to refund your money.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.