Help recovering my NTFS partition

I love openSUSE and I’ve had no serious problems with 11.0

So I moved to install 11.1

I did what I always do, boot off a gparted CD and format my / partition (sda6) while leaving my /home (sda7) intact. I also dual-boot Windows Vista and never had any serious problems with ntfs-3g. And then started the installer for 11.1 off the DVD.

After some fedangling I got the installer configured as needed, selected the packages I wanted, and changed from the default of resizing my NTFS partition (containing Vista) to mounting sda6 as / sda7 as /home and my NFTS partition as /windows/C. I did this with 10.3 and 11.0 and had no problems.

However, when I booted after installation I noticed that the my NTFS partition was missing from Dolphin. I checked /etc/fstab and it looked right. I rebooted and tried to get into Windows. Windows does have an entry in GRUB but it doesn’t boot into Windows.

The NTFS partition contains most of my data, as I do need to access it when I boot into Windows. So recovering it is crucial.

I installed gparted and got the error message displayed in the screenshot.

http://picasaweb.google.com/lh/photo/FSk2b1Ajv9XR2roRoHI-kQ?feat=directlink

Any ideas? I need to recover my data!

OK, so it looks like the picture didn’t display.

Here’s the URL: Picasa Web Albums - Angel Blue01 - Temp

Don’t have experience with that exact error as I use different partition tools… guessing Testdisk might be able to aid you here.

Have a good read though this FAQ section : NTFS Resize Frequently Asked Questions

The error you describe lines up with the ‘ntfsresize can’t find NTFS on the given partition’ bit. This would mean your data is still there, but the start and end of you partition aren’t defined correctly.

Again, I’ve had good results using Testdisk… but always try to proceed calmly before applying changes. If there is data on the other partitions to back up… do that first. Testdisk will probably want to reset the Vista partition back to the previous size… if you get that option when running Testdisk I’d advise to do that, but you’d lose the current layout.

Wishing you luck,
Wj

Agree:Testdisk is a great tool. I would like to know you partition table. Could you post the results of fdisk -l as root? It is needed to understand if the partition table is gone

Here’s the results of fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xeec4d366

Device Boot Start End Blocks Id System
/dev/sda1 1 192 1536000 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 192 8425 66136788+ 7 HPFS/NTFS
/dev/sda3 8623 19457 87029321+ f W95 Ext’d (LBA)
/dev/sda5 8623 8885 2101699 82 Linux swap / Solaris
/dev/sda6 8885 12771 31222296 83 Linux
/dev/sda7 12772 19457 53705263+ 83 Linux

sda1 is my Toshiba recovery partition (this is a laptop), sda5 is swap.

Here’s the contents of my /etc/fstab:

/dev/disk/by-id/ata-Hitachi_HTS541616J9SA00_SB2404SJJ770XE-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-Hitachi_HTS541616J9SA00_SB2404SJJ770XE-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-Hitachi_HTS541616J9SA00_SB2404SJJ770XE-part7 /home ext3 defaults 1 2
/dev/disk/by-id/ata-Hitachi_HTS541616J9SA00_SB2404SJJ770XE-part2 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

You could edit to this in fstab

/dev/disk/by-id/ata-Hitachi_HTS541616J9SA00_SB2404SJJ770XE-part2 /windows/C ntfs-3g defaults 0 0

It may work better and enable you to access the drive to copy it to something.

Or try a live dvd of knoppix, which is very good for this sort of thing.

Your fstab looks fine, so it could be a problem that vista wasn’t shutdown correctly.
You can either reboot vista first or try running as root:
mount /dev/sda2 /windows/c
and see what error message you get.

Alternately, when suse boots, press esc to ge rid of the splashscreen and check for errors when it mounts the ntfs partition.
I know I had to run the mount with the force option to get it mounted.

Also, have a look at this thread:
Fixing vista multiboot with openSUSE - openSUSE Forums

Your fstab looks fine, so it could be a problem that vista wasn’t shutdown correctly.
You can either reboot vista first or try running as root:
mount /dev/sda2 /windows/c
and see what error message you get.

Alternately, when suse boots, press esc to ge rid of the splashscreen and check for errors when it mounts the ntfs partition.
I know I had to run the mount with the force option to get it mounted.

I ran mount -t ntfs-3g /dev/sda2 /windows/C

And I got the following error:

Unexpected clusters per mft record (-1).
Failed to mount ‘/dev/sda2’: Invalid argument
The device ‘/dev/sda2’ doesn’t have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?

Which is the same error I get when the system boots. The problem is, that when I select Vista from GRUB nothing happens, I can’t boot into it.

I’ll try Testdisk

You have likely screwed up the Vista BCD

It will need repairing if grub is ever to boot it. The following thread deals with such: Winhoes no longer likes to boot after fresh install - Page 4 - openSUSE Forums

OK, so I’ll use the Vista CD to fix the MBR.

And then I can use the openSUSE DVD repair option to get GRUB back, I’d think.

In Testdisk when trying to use the list function, it says the file system (on the Windows partition) seems damaged.

Testdisk also says the boot sector on is fine and the backup boot sector is corrupt.

I’ll still try the Vista DVD to try to recover the MBR.

Teskdisk, when trying to detect partitions shows this message then continues normally:

Warning: Incorrect number of heads/cylinder 90 (NTFS) != 255 (HD)
HPFS - NTFS 0 32 33 191 89 26 3072000 [TOSHIBA SYSTEM VOLU
HPFS - NTFS 191 89 27 8424 190 55 132269537 [SQ004328V04]

I have not committed anything to disk yet.

In many cases reverting to the good copy as suggested by Testdisk, will recover the correct partition size and make the data accessible again. As cautious note: it will probably revert the Vista partition to it’s original size previous to the shrink and thus clear any access to volumes created on the previously freed disk space.

As added safety option:
If you have a disk of at least the same size of (or bigger then) your current one, you can use dd to make a clone of the disk in the state it is now. If it screws up… you have a copy of the current state.

If you are new to dd… it’s a great tool and works as simply as:


dd if=/dev/sda of=/dev/sdb bs=64k

In the example /dev/sda is the input stream (your original disk with data), /dev/sdb the disk that gets the copy written to (output stream). bs states the block size to use when copying… 64k is a more optimal value than the default 4k when copying disk drivers.

In this case I would put my money on Testdisk over the Vista repair/recovery option… but if you have the option, make the disk image first…

Also have a wait to see what others might suggest!

Wishing you luck,
Wj

Your partition table is fine. I think that the dirty bit on the windows side is set. So we should try to boot vista again and perform a scandisk from there. Now: how should we give it a try? Download Gag ( it is a small iso, just burn it on a cd) and reboot with the boot sequence set having cd first . Install it and setup windows boot. it is very simple. It did the job for me when i had a similar problem