GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
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.
My daughter was copying files over the network from her old computer (Win2K) to her new one (WinXP). Unfortunately she elected to use Cut and Paste rather than Copy and Paste. All her music files vanished from the old disc and did not appear on the new one.
I put the old disc (40GB ATA partitioned into 4 partitions, all NTFS formatted) into a Debian machine thinking to use ntfsundelete to recover the files. However the disc cannot be mounted and fdisk comes up with the partition table blank. Examining /dev shows that /dev/hda exists but there are no entries for hda1-4.
When I put the disc back into the Windows machine it refused to boot. Partition magic reports the first partition to be unformatted but can see the other three.
The lost files are (were) on the second partition and apparently only the d:\music directory was lost.
My question: How best can I get to mount the drive? If I recreate the lost partition will I lose data? Can I create /dev/hda2 manually?
Advice gratefully received. Teenager is devastated by her loss.
can you use partition magic's undelete feature?
i dont know but i wouldnt think creating a new partition would remove the old stuff, but i dont know if that would find it either.
if you _need_ the data that was on it i would take it to a professional and see what they can do. now a days with high speed internet if she just had music (not important documents, etc) then i would say just format it and download them again.
Partition Magic is not offering undelete on this disc. I assume that the corruption extends to not indicating that there was data on partition 0.
Yes, one could reformat etc but not until I've tried everything else. Next time I meet this problem it could involve vital data - and how many Windows users perform backups?
Try Acronis Recovery Expert, it has a powerful undelete feature.
You can try to recreate the partition, but then it needs to be identical with the one that was there - otherwise you risk overwriting the info about the files on the harddrive.
You say "ATA", I am assuming "IDE", but unfortunately "ATA" is becoming ambiguous. Unwillingly, I am beginning to think we must always say either "SATA" or "PATA" to avoid confusion.
Can you confirm the part. table is indeed blank (w/ the prob. drive in a GNU/Linux box):
Code:
dd if=hdx bs=512 count=1 |hd |less
If so, gpart may help if Acronis can't. BTW, their Partition Editor, now Disk Director has worked very well for me for several years.
You're quite right, the drive is PATA. Unfortunately(?) I have got into the habit of using IDE and SATA. Reply to the question will be later this evening, when I get home.
UPDATE: Weird happenings! I put the drive into a Debian Linux box. Same box as yesterday. The PC tried to boot from the drive (CMOS setup had IDE0 as first boot drive) Got a message "Error loading Operation System". However Linux can see and mount the partitions.
ntfsundelete found the missing MP3s
So without further ado I'm going to ntfsundelete the drive. Still would like to know if the Partition table is corrupt though.
I posted this as a Linux question. Windows trashed the disc. I don't trust Windows utilities to to fix it. Hence my posting here.
In fact, Linux fixed the problem in that I have recovered the files with ntfsundelete. However I would still appreciate input on the interpretation of the dump of the MBR and how to recover the first partition. The next time I encounter this problem it might be on more valuable data.
If I might make a suggestion, rather than fiddling about it yourself and risking wiping out or overwriting the raw data on the disk, I would suggest taking it to a professional data recovery expert.
It might cost a bit, but the end result might be well worth it...
As for "how to recover the first partition", all the recent suggestions have merit. I have played w/ both gpart & TestDisk, and certainly the idea of making a copy of the target is very sound. (We might tongue-in-cheek ascribe "Second, do no more harm." to Hippocrates, Jr.)
If you can at least mount that 1st part., you can dd it into a file & then mount the result via the loopback interface.
Last edited by archtoad6; 11-25-2006 at 07:54 AM.
Reason: typo
Testdisk recovered the partition in the sense that it now shows up in fdisk.
Code:
Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1148 9221278+ 7 HPFS/NTFS
/dev/hda2 1149 2423 10241437+ 7 HPFS/NTFS
/dev/hda3 2424 3698 10241437+ 7 HPFS/NTFS
/dev/hda4 3699 4982 10313730 7 HPFS/NTFS
However the partition cannot be mounted
Code:
davcefai:/home/david# mount /dev/hda1 /mnt/taradisc -t ntfs
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Code:
davcefai:/home/david# dmesg|tail
NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS volume.
NTFS volume version 3.0.
NTFS-fs warning (device hda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS volume.
NTFS-fs warning (device hda1): is_boot_sector_ntfs(): Invalid boot sector checksum.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS volume.
Well, since this has become a little bit of an academic exercise as I did manage to copy the lost files I shall run powermax on the disc in case it has been physically damaged.
Luckily the disc failed at the least critical time. Lecture notes etc were copied over OK. I'll post again with any test results in case anybody will find them useful in future.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.