1 (edited by jamesisin 2007-11-05 01:21:28)

Topic: Gparted has convinced Linux and XP that my NTFS is FAT32

I was working to expand an existing partition on a large harddrive, when GParted decided that my NTFS partition was FAT32.  It has "fixed" the partition and so my Linux box and my XP box all agree it's FAT32.  Problem is that the 300gb worth of files are no where to be found.

I'm not sure how this happened, but my best guess is that GParted used the wrong partition table to apply to this partition.  A little background...

This 500gb drive originally had three partitions: 1 20gb FAT32 partition, 1 300gb NTFS partition, and 1 180gb NTFS partition (sizes are approximate).  I transfered all the data off the 20 gb and 180 gb partition (onto the 300gb partition) and deleted both of those partitions.  This left me with a 300gb partition and about 200gb of free space.  This was all done on a Windows XP machine.

I then shut that machine down and pulled the harddrive out.  I moved the drive to a USB tray and attached that to my Fedora 7 machine.  Fedora said it couldn't mount the drive (though I now suspect it was trying to mount the deleted FAT32 partition).  GParted (v. 0.3.3 which comes with F7), however, showed the picture I expected to see: 1 300gb partition and about 200gb of free space.  I had GParted check the partition and it "fixed" it.

Now Fedora was able to mount the drive.  Only thing is that Fedora mounted a 20gb FAT drive.  GParted still showed the drive as being 300gb, but the properties dialog in Fedora clearly showed 20gb.  I double checked this with an XP machine and it also mounted a 20gb FAT drive (containing what the deleted partition contained: a recycled folder, a system volume information folder, and a pagefile).

Back to the Linux box.  I downloaded and burned the latest version of GParted Live (0.3.4-9) and used that to access the drive.  Same information as before.  I had this new version check the partition (I have read on this forum where old versions of GP have been buggy).  It "fixed" the partition--now my machines agree there is a 300gb FAT32 partition on this drive.

I am indifferent as to the exact path of the solution.  What I want is to get that 300gb worth of data back.  Currently it is MIA.

Is there a way to point the correct partition table at that partition?  Can I convince my machines that this space is occupied by files written in NTFS?  I have another 500gb drive I can move this stuff onto, but first I have to gain access to the files.

2

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

If Fedora mounted that 20GB partition, it seems that it wasn't really deleted. Deleted partition means that there is nothing about it in the partition table. Did you perhaps mounted this drive previously with Fedora so that it had retained any old info about its partitions? I don't know if Fedora does anything like this.

Anyway, there are no many partition tables on a drive, there is only one. Nevertheless, I know that some windows partitioning programs take a copy of the partition table somewhere (or a copy of the partition boot sector, in the first sector after the boot sector), as backup. I don't know if this can make Fedora read the wrong partition. How exactly did you delete these 2 partitions?

You can take reliable info on your actual partitions from Linux, with fdisk (as superuser), or even with Gparted. If you have deleted the 1st and 3rd partitions, then you must have 2 separated unallocated disk spaces. Resized ntfs partitions need to be checked and "fixed" by windows just after resizing.

Version 0.3.3 wouldn't be so bad, It was (is?) 0.2.5 on Ubuntu that is very old and buggy. I don't understand how Gparted "fixed" the partition, as it doesn't make any changes itself (there is no automatic function).

One of the best tools to recover partitions is "TestDisk". It is contained in the Gparted livecd (from a terminal window), as well as in the Ultimate Boot CD
http://www.ultimatebootcd.com/index.html
It can check the disk and fix problems. Note that data structure in ntfs is very different than fat32.

If the disk sectors remain the same, you could perhaps recreate the partition table if you know *exactly* the start and end point of each entry. I'm   not at all sure that you have a backup of this info, nor if all disk data remain exactly the same. So, TestDisk would be the best solution.

You can use your free drive to make a backup copy of the drive under question.
It is better to take backup of the MBR before any partition modification. Working with partitions is always dangerous, for experts as well as for novices.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Yes, sorry, one partition table; but, what I want is for the information about partition two to point at partition two (and not the information about partition one pointing at partition two).

You are correct that, initially, there was free space to the left (deleted partition one) and right (deleted partition three) of the 300gb partition (partition two).  The space to the left was the FAT32 20 gb partition and the space to the right was the 180gb NTFS partition.  The free space to the right (deleted partition three) is still in tact and free.

Both of these partitions were deleted using the same technique.  I pulled up the Drive Manager in Windows XP Pro, right-clicked on the partition in question, and chose Delete Partition from the context menu that pops up.  At the time, the drive was internal to that machine.  Then the drive was pulled from that machine (as was the other drive which contained the OS) and placed into my external drive tray.  Since then I have used the tray to connect this 500gb drive to my machines using USB2.  The machines I have used have been an XP machine (a different machine) and a Fedora 7 machine (this machine was also used to run the Live CD of GParted 0.3.4-9).

Running the Check function in GParted .3.3 did change something on the disc, because initially Fedora could not mount the disc.  After running .3.3 (and reattaching the drive tray) Fedora mounted partition two but as FAT32.  This change also caused the XP machine to see partition two as FAT32.  At that time they agreed that partition two was FAT32 and 20gb.

Then I ran the Live CD and used the Check function again.  The Live CD was able to resize partition two (to the left), but instead of enlarging partition two across that area it enlarged the information about partition one (so now the area is FAT32 and 320gb).  So the files are still there it's just that they are, what?, hidden.  I don't exactly understand, but I'm confident that the problem only lies in the partition table and not in the data area.

What if I were to just tell the partition table that this entire area were NTFS?  Sure it wouldn't be able to read the files formerly in the FAT32 area (but for them I don't care), but would that enable it to read the 300gb of NTFS data?

Is there a way to determine the start sector of partition two (now that GParted has effectively changed that start information in the table)?

How do I go about running Testdisk from the terminal window?  I just tried that on the Live CD and get an error that a directory cannot be found.  Do I have to run testdisk with arguments?

4

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

So, perhaps it is windows disk manager that did the mess.

TestDisk scans the disk area to found any possible partition start point.

I remember I run TestDisk from the terminal black screen, at least with previous versions (it must be the same in the latest version too). I dont remember how exactly I spelled it: TestDisk, testdisk ... (without argument).

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Yeah, I tried that.  Running a term from the Live CD I typed testdisk and it returns an error telling me that it cannot find some library files (I don't have the exact text with me).

Is there a command by which I can tell it to assume that the partition it is looking at and claming is FAT32 is NTFS?  I wonder if that would be enough for my machines to then recognize the files.

Seriously though, this was clearly exacerbated by GParted.  I mean I had a hand in the matter, but the problem itself wasn't exactly spawned by Windows.  Dispise Windows though I may, GParted turned my unmountable (in Linux) NTFS volume into a FAT32 volume trying to "fix" whatever state it was in when Windows was through with it.

It would have been excellent if GParted would have provided a dialog about what it intended to "fix".

But enough about blame.

How can I convince the partition table that this partition is NTFS?

6

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

A way could be to write directly to the MBR or the partition boot sector, changing the partition code of the specific partition from fat32 to ntfs. I'm not at all master of this kind of works, to give any valid advice. sad

But I think the first step must be TestDisk.  I'll try my own gparted livecd.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

7

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

It worked with version 0.3.4-8.
You have to open a terminal and maximize it, or go to the terminal by CTRL+ALT+F1.
You give
testdisk

*** It is highly recommended to backup any important files before doing resize/move operations. ***

8

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Thanks.  I'll have a look at that when I get home.  I should be able to look up the necessary commands for the table in my Linux book.  I'll let you know if running testdisk works.

9

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

The error I get is:

testdisk: error while loading shared libraries: libreiserfs-0.3.so.0: cannot open shared object file: No such file or directory

That's it.  Won't run testdisk.  I looked in the /lib folder and sure enough no such file exists.

10

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Do you try to run it from Fedora? I talk about the liveCD 0.3.4-8 (I run it myself yesterday), not the installed Gparted. Fedora contains just gparted, nothing else. testdisk is an add-on in the gparted livecd. I'm not sure if it is included in 0.3.4-9.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

11 (edited by jamesisin 2007-11-07 04:20:44)

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Yep, that's from the Live CD.  Won't run testdisk.  As you can see from the error, the command tries to execute but fails because some library files are missing.  If the command did not exist, it would return a command not found error.

12

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

I have no 0.3.4-9 cd nearby, but I tested it myself with 0.3.4-8 and had it working. Are you sure the cd is well burned?

*** It is highly recommended to backup any important files before doing resize/move operations. ***

13

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Can you direct me to an ISO for 0.3.4-8 and I'll give that a whirl?

14

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

You can find any version here:
http://sourceforge.net/project/showfile … _id=173828

*** It is highly recommended to backup any important files before doing resize/move operations. ***

15

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

Hi,buddies, I'm a new with this of partitions and I have the following issue:
I have a pc with XP installed and a 40GB hard disk with only 1 partition and I want to create 2 more extended partitions, a friend gave me a gparted livecd 0.3.4-svn boot cd to do it, but I boot with the cd and I only get a menu and I don't know how to use it ! could you help me please because I've tried to a lot but I couldn't .+
Thanks a lot for you help....

16

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

@mariobier
Apparently you have a video issue.
What does 0.3.4-svn mean? The livecd has version numbers like 0.3.4-6, 0.3.4-7, ... 0.3.4-10 .
Try other boot options from the boot menu. You must go to the gparted graphics screen.
If you have further problems, give us details on your hardware, please.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

17

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

@class413
Thanks, I did what you advice me and it works fine the issue was in the video .
Thanks a lot !

18

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

smile

*** It is highly recommended to backup any important files before doing resize/move operations. ***

19

Re: Gparted has convinced Linux and XP that my NTFS is FAT32

I was not able to solve my issue with gParted.  I ended up using a Windows utility I found called Partition Find and Mount:

http://www.soundunreason.com/InkWell/?p=33

I still like gParted; I've just learned to be a bit more cautious.  Or not.