PDA

View Full Version : Lost XP Parition on Resize in Knoppix 4.0.2: What happened?



ajwreinhardt
06-14-2006, 04:28 PM
Hey. I just wanted to ask for your guys thoughts about a mistake I made. Ok here's what happened. I wanted to make space for a linux distribution on a system with one big NTFS partition, and so I booting my Knoppix Live CD. I had planned to use ntfsresize from www.ntfs-tools.org (I think). When I got into Knoppix (v4.0.2), I tried to use QTParted, which didn't seem to work (I would resize the Ntfs partition and after a while get a blank message box with only an ok button, and after I pressed Ok it returned to the original screen, having done nothing. I'm only guessing that this was an issue of needing to be root.

But then, I went to the command line (as root) to use ntfsresize manually. Everything seemed to go fine, but I was surprised when the utility told me I had to "delete" the original partition and "re-create" the partition with the new parameters. I decided, rather than use the "expert" fdisk, to use Qtparted to do this. I deleted the original partition in qtparted and recreated it with the new size...but it didn't work!!! All I got was a blank new partition! I messed around more than once with the cylinder, thinking that maybe I didn't have the correct starting cylinder, but I never got it. In the end, I had to take it into the shop in order to recover the data (my bad, that I didn't backup the data).

What went wrong? Was it that I used Qtparted, because it "automatically" formatted the partition when all I really wanted to do was to "update" the partition table to have the new end cylinder??? Should've I just used fdisk?? Any thoughts on what happened here? Was there an easier way to solve thiS than to take it into the shop???

Thanks

ckamin
06-16-2006, 04:29 AM
What went wrong?

Usually when you "DELETE" a partition, you also "DELETE" the data! I have absolutely no idea why people have this absolute need to use Linux to mess with their NTFS partitions. They then complain that something went wrong, etc. The best advice is to first back up all of your data before doing ANYTHING! Then use a commercial partitioning tool that is intended to resize NTFS partitions. Linux sometimes has serious issues with NTFS and sometimes an inexperienced user can do more damage than good.

malaire
06-16-2006, 09:54 AM
Usually when you "DELETE" a partition, you also "DELETE" the data!

Actually, that's not true. Deleting (i.e. overwriting) the data would take a lot of time, and deleting a partition is really fast, because that only removes the partition from the partition-table. All data is still intact after partition is deleted.

ckamin
06-16-2006, 03:45 PM
malaire:

The data may still be on the drive, but it's lost to the user unless it's recovered. It depends on your definition of DELETE. Overwritten data is still on the drive and may be recoverable also. That does not mean it's not lost to the user. I will stand by the statement. When the partition is removed, the partition then is reformatted or redefined, the data is not accessible, then so defined it's deleted. It then requires extraordinary means to recover the data.

Does it also mean that when the partition was deleted, it's still there? Since the area on the drive still exists, then it's NOT deleted? When you remove the information that defines or makes a partition available or data available, that process is called deletion. To wipe a drive clean is another process.

See here for the definition of Delete: http://www.sharpened.net/glossary/definition.php?delete

Now if I had said "ERASE", then it might be correct to question the terminology.

ajwreinhardt
06-16-2006, 03:51 PM
Ckamin, honestly the reason that I turned to Linux to do partitioning is because I am just unwiulling to buy a copy of a commerical parititioning program that in the EULA will tell me that if I'm going to comply with their terms (which are legal and, as a Christian, sinful to violate) I can use that program on only one PC in my house. I am speaking primarilly of PartitionMagic, but I suspect that nearly all commerical programs will be like this...but I would be open to find out about something else.

I guess, malaire, that is what I'm counting on. The whole procedure did not take but 2 minutes. I know my data was not "deleted", but something did not work. But I guess, I'm curious as to why this didn't work. Is it that I needed to use fdisk to do the "deleting" and "recreating"? Is there anyone who knows/has used ntfsresize that could enlighten me???

ckamin
06-16-2006, 04:27 PM
I made a statement about NOT using Linux tools to resize NTFS partitions, or to write to an NTFS partition for a reason. The chances of corrupting what is there is too great a risk. Many people have used Linux tools to do so and have not suffered for it, or at least not until later. NTFS is a proprietary format that belongs to Micro$oft. They have not licensed their drivers, nor do they share the information for the system with the general public or the Linux communities. Therefore, ANY Linux tool would have to be reverse engineered or developed by alternative methods. The capabilities of Linux have greatly improved, but are still not as reliable as Windows itself. Maybe one day Linux will handle these partitions better than Windows, but we can only hope.

I strongly recommend that you try using a tool that is Windows compatible, and if it means breaking down and paying for something like a partitioning program, it's worth not having to pay for the recovery of your data. Partition Magic is one that has worked for me well enough. There are OEM versions of it available from time to time. I have seen them at the Computer shows. They are not unreasonably expensive either. You could reformat the entire drive using Windows, leave part of the drive unused, and then partition and format the additional space using Linux. I would just not use Linux to do ANYTHING to an NTFS partition. All you need to do is search through this forum to find examples of people in misery to support my claim. If you still insist on going ahead with using Linux to potentially damage your NTFS partitions, then be my guest. You have been forewarned! Just make a good backup of your data, if it's still recoverable.

malaire
06-16-2006, 05:14 PM
I made a statement about NOT using Linux tools to resize NTFS partitions, or to write to an NTFS partition for a reason. The chances of corrupting what is there is too great a risk.
Maybe you should check out The Ntfsresize Frequently Asked Questions (http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html)

Is it reliable? link (http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#reliable)
Yes, it is reliable. ... No destroyed filesystem was reported who followed the instructions correctly. ...

But isn't NTFS write experimental and dangerous? link (http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#write)
Not the usage of ntfsresize. There are many totally different NTFS implementations for Linux and people tend to confuse them. ... The changes needed to resize an NTFS are well understood furthermore ntfsresize has rigid safety checks, including a basic NTFS consistency check, and refuses to do the resize operation if it meets an inconsistent state, unsupported or suspicious condition.


All you need to do is search through this forum to find examples of people in misery to support my claim.
Did they read that FAQ above, and use recommended method? (i.e. an easy-to-use front-end and not command-line)


I guess, malaire, that is what I'm counting on. The whole procedure did not take but 2 minutes. I know my data was not "deleted", but something did not work. But I guess, I'm curious as to why this didn't work. Is it that I needed to use fdisk to do the "deleting" and "recreating"? Is there anyone who knows/has used ntfsresize that could enlighten me???
That link above also includes exact step-by-step instructions on how ntfsresize should be used from command-line:
How to use ntfsresize from the command line? (http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#cli)
But they recommend using e.g. GParted LiveCD instead:
How to resize NTFS without data loss? (http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#example)

That page also includes this warning about cfdisk:
We choose fdisk as the partitioning tool because it's very mature. If you choose cfdisk, be extremely careful! Cfdisk may round down enough the partition size you specified to be in the middle of NTFS and you won't be able to boot.

Personally, I don't have NTFS partitions and havn't used ntfsresize.


Ckamin, honestly the reason that I turned to Linux to do partitioning is because I am just unwiulling to buy a copy of a commerical parititioning program that in the EULA will tell me that if I'm going to comply with their terms (which are legal and, as a Christian, sinful to violate) I can use that program on only one PC in my house.
Nice to know that there are still people who take this seriously.
Still, IMHO, EULAs usually say that you can only use the program on a single computer at any one time. So if you remove if from one computer, you can then use it on another computer. (But to be sure, you should still read the EULA carefully.)

rcook
06-16-2006, 05:15 PM
There is a NTFS file recovery for about $60 that will recover lost NTFS partitions and files. I have purchased and used it. I had to bit copy the partition in question over to another machine, to recover my files and directories. I had a lot of family photos on the drive in question. They were worth it.

GPartEd is a free downloadable iso that will provide the functionality of Partition Magic. I have used it to resize NTFS partitions. It will force NT to do a check on the partition when it next boots to ensure the validity of the partition.

You could try to patch the partition table to its original values with fdisk, but . . .

like ckadmin, I recommend extreme caution, paranoia, when messing with NTFS partitions in Linux. Backup first, etc. etc.

ckamin
06-16-2006, 06:07 PM
Yes, it is reliable. ... No destroyed filesystem was reported who followed the instructions correctly. ...
There are many totally different NTFS implementations for Linux and people tend to confuse them. ...
Did they read that FAQ above, and use recommended method? (i.e. an easy-to-use front-end and not command-line)
That link above also includes exact step-by-step instructions on how ntfsresize should be used from command-line:


The keys here are:

Following Directions

Using the correct tool correctly

Doing reaserch before doing damage

Finding good information BEFORE doing anything AND following exact instructions, exactly.


Maybe you should check out The Ntfsresize Frequently Asked Questions

I simply do not believe everything I read on the net. Anyone can make claims as to the safety of a procedure or program. I have seen otherwise. The most important part of any prodedure is the backup. If it was so simple to do, why did the original poster have issues with it? An advanced user might have better luck with it, but I'm sure an inexperienced user will have difficulty. This post is evidence of such. It is far wiser to purchase the right tool for the job, or learn how to use something in it's place. The Key is learn! That much the original poster did. What did he learn? Backup what it is you do not wish to lose AND to get it back, it would have been more cost effective to purchase the proper tool in the first place. I have seen many stories such as this one and will NOT recommend using a Linux tool to do ANYTHING to an NTFS partition. That is my personal opinion, AND I have had very few issues working with NTFS partitions. When it comes to free tools, you sometimes get what you pay for. Documentation and support are sometimes absent and you are left to your own resources to work it out. Most of the tools you mention are still a work in progress and would be considered unfinished.

I have read that FAQ and countless others. I am rather well informed on the issue. I am also cautious and not foolhardy when it comes to preserving data and the integrity of a storage device. I have worked with computers since the dark ages and have learned one thing. You will eventually lose data at some point and that you need to back up what you don't wish to lose and then back it up again. I don't see the need to make the data loss self-inflicted. The simple fact is that two people have posted in this thread claiming that they have lost data. One using Linux tools and the other did not explain.

You are entitled to your opinion on the subject, and likewise, I am entitled to mine. We can then agree to disagree, since this can be discussed to eternity with no resolution.

ajwreinhardt
06-17-2006, 03:18 PM
Rcook, would you give me a link to that recovery tool for $60? Thanks.

Ckamin, in response to your last post, I do agree much with what you are saying. For example, anyone indeed CAN claim that their product is reliable. Also, the issue of backing up is the one that I have never done and really, have gotten burned on here. :oops: Hopefully I have learned my lesson. Additionally, I did not read anything like a FAQ. I, when I ran ntfsresize, did not know that I was going to have to edit the parition table, either. :oops: So now, hopefully I have learned my lesson

I do also understand what you're sayingabout Linux and NTFS and that Microsoft's refusal to release info on NTFS makes any Linux NTFS tool sketchy anyway.

So, i do appreciate you all for responding at all, and for all your thoughts (varied as they may be).

Jake

Irgu
06-17-2006, 11:47 PM
This problem has nothing to do with NTFS. Ajwreinhardt incorrectly deleted the partition with qtparted instead of resizing and failed to recreat it at the same sector. The latter is required if one wants his data to appear intact again. However I don't know how qtparted works but if it also formated the partition then ajwreinhardt destoryed not only his partition table but also his NTFS filesystem as well due to his own faults by not following the FAQ instructions.

If Qtparted didn't format the partiton then the TestDisk utility should find the still healthy NTFS and hopefully recovery the partition table so it will be visible again. I've resized well over a hundred NTFS partitions in the last three years and never lost any data.

ckamin
06-19-2006, 02:48 AM
I've resized well over a hundred NTFS partitions in the last three years and never lost any data.

Good for you. There are many beginners or inexperienced users that have not been able to do so and have lost data. It is usually self inflicted and caused by using a tool that they do not know how to use. If you read the thread and get the gist of my message, that is what has been said. NTFS partitions are something I simply do not recommend an inexperienced user to use Linux ANYTHING on. That is, unless it is mounted read-only. Writing to an NTFS partition is risky, and using unfamiliar tools with little documentation supplied, can cause trouble for someone with limited experience. They are encouraged by some people that recommend them to do it using Linux tools and provide a little direction. Just enough direction for them to really do some damage. Doing so does a disservice to the person you might be advising. It would be much better to recommend a less risky way to go about it, even if it means purchasing a commercial program to do the procedure. If you were talking about working on a Linux based partition, it might be a different story. With Windows, there are other options besides Linux. The back up is the most important part of the operation and often never discussed. I have a few more than your three years experience formatting and modifying drives, partitions, etc. I have seen failures that should have been a success, had the right tools been used in the first place, rather than something that "Should" work. That includes the use of Linux based tools to modify partitions that are not of Linux origins.

rcook
06-19-2006, 08:11 PM
Use Linux to read the data for salvage or backup as best you can. Beyond that "Here be there monsters!"

Irgu
06-20-2006, 08:31 PM
There are many beginners or inexperienced users that have not been able to do so and have lost data.
It's impossible to lose data today during repartitioning unless the user directly instructs the program to destroy his own data. One uses either a filesystem resizer+fdisk OR a GUI partitioner to resize the partition (gparted, qtparted, etc). Here are the mistakes ajwreinhardt did:

1) He used the combination of the two methods which itself wouldn't be a problem but he also did it incorrectly.
2) He used ntfsresize without fdisk. This never results data corruption. His data was still fine, accessible, the filesystem having the new size but not the partition.
3) He DELETED then CREATED a new partition instead of RESIZING the existing one with qtparted. This step is completely filesystem independent, he would have destroyed ext3, reiserfs, fat32, anything. This is not how one should non-destructively repartition with qtparted.

In short, your NTFS rant is totally irrelevant here and that's not how one should educate people because you're actually misleading them badly.


Writing to an NTFS partition is risky,
This is again incorrect and proves you're quite out of picture on NTFS support on Linux. There are many NTFS drivers for Linux with different functionality and reliability. Some safe, some crap. I also encourage you to RTFM, as others already did. You need it.


and using unfamiliar tools with little documentation supplied, can cause trouble for someone with limited experience.
http://man.linux-ntfs.org/ntfsresize.8.html
http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html

90 kB documentation with step by step instructions, moreover both suggest using one of the Partition Magic Linux clones if the user is uncertain how to do the low level resizing.


They are encouraged by some people that recommend them to do it using Linux tools and provide a little direction.
I fail to see how GParted would be more difficult to use than Partition Magic. But surely, user should RESIZE the partition, not FORMAT, like in this case, if he wants to resize it. Qtparted just did what it was told, it destroyed the partition.


I have a few more than your three years experience formatting and modifying drives, partitions, etc.
I nowhere wrote I have three years of partitioning experience. I have over twenty. What I wrote was that that I'm using ntfsresize (based Linux partitioners) for over three years without trouble.


I have seen failures that should have been a success, had the right tools been used in the first place, rather than something that "Should" work. That includes the use of Linux based tools to modify partitions that are not of Linux origins.
All problems I've seen here over the last three years were due to partition table corruptions, independently of the filesystems, which were cause by broken Parted, or user error. Like this one, where user reformatted instead of resized his partition. But clueless people indeed sometimes blamed Microsoft instead of explaining newbies how to do repartitioning correctly.

Anyway, please feel free to demonstrate how you can destory NTFS on Linux with the safe Linux NTFS tools. You don't even need Windows to do so, you can use mkntfs or ntfsclone to create/transfer an NTFS image to your Linux then loopback mount it or try to trash with ntfsresize. You will fail to do so, I'm sure. Non-sense talk is cheap, that's what you showed so far.

ckamin
06-21-2006, 07:05 PM
Irgu:

And precisely, What is your point?

You failed to recognize the issues for what they are. I have many years in the industry as well as many years in education, technical training, technical manual development, and curriculum development. There are many basic rules that are ignored by your statements. I have referenced tools and procedures for a beginning/inexperienced Linux user. Number one, you are asking someone to use an unfamiliar environment (Linux) to perform potentially damaging tasks. Then to compound the folly, you are directing that same person to use an unfamiliar tool, within that environment. Further compounding the issue is the fact that documentation may be limited by the lack of it, the user not knowing how/where to access it, or the fact that much of it originated in another language and has been poorly translated or not translated at all. Also many times the effective documentation for some of these tools resides buried in some separate source or forum. Loading the deck in such a negative manner almost guarantees failure of the procedure. If a solution is presented that works within a familiar environment (in this case Windows) and has included documentation in the language of the user. It will have a much better chance of success. In the case of a commercially distributed solution, there is usually some access to technical support at a higher level than the open source solutions you have offered. That fact alone may make the commercial solution the better choice. That was the first issue.

Second issue. Linux simply is not 100% reliable for writing to an NTFS partition. You may present whatever links that claim to the contrary and you may have had success with it personally. I am presented with a failed drive on an almost daily basis. Over twenty percent were corrupted by someone writing to the NTFS partition with Linux. These failures generate incident reports and are comfirmed by IT. They have done the forensics. It is now against policy to use ANY live/alternate OS in our machines for that reason. We have many students that decide to try bypassing management's controls by using Live Linux disks. This has also resulted in waves of drive corruptions being presented for remedy after someone decided to write to the disk with something other than Windows. Less than 2% of our incidents are related to Windows corrupting the drives. Do the math and decide which has a better chance for success in writing to an NTFS partition. Windows or Linux? We did our homework and have developed the metrics in these situations.

We spend countless thousands of dollars producing Technical Manuals and Documentation in standardized formats and will transform documentation into standard formats if supplied by outside vendors. It is done simply to enable a technician to find the information they need in a familiar format. We use standardized diagnostics procedures and have done so for decades. There is a reason for it and it relates directly to the first issue I described. It presents a higher percentage of success.

Now I don't think I claimed it was an error in the tools the original poster used, but rather a self inflicted disaster that came about for the reasons I described in the first issue above. Him being UNFAMILIAR with the OS AND the TOOLS he attempted to use. If you have experience with an environment and the tools you are using, it is a moot point. You have a greater chance of success for those reasons alone, since you don't need the hand-holding that an inexperienced user might require.

Your statements.....


It's impossible to lose data today during repartitioning unless the user directly instructs the program to destroy his own data. One uses either a filesystem resizer+fdisk OR a GUI partitioner to resize the partition (gparted, qtparted, etc). Here are the mistakes ajwreinhardt did:

1) He used the combination of the two methods which itself wouldn't be a problem but he also did it incorrectly.
2) He used ntfsresize without fdisk. This never results data corruption. His data was still fine, accessible, the filesystem having the new size but not the partition.
3) He DELETED then CREATED a new partition instead of RESIZING the existing one with qtparted. This step is completely filesystem independent, he would have destroyed ext3, reiserfs, fat32, anything. This is not how one should non-destructively repartition with qtparted.

....have actually made my point. An inexperienced user is prone to making mistakes that will sometmes have disastrous results.

I'm sorry that you are obviously upset that someone disagrees with your point of view. Linux is NOT a cure for the common cold. Nowhere in my posts did I bash Linux or the tools described. My reference is to inexperienced users being directed to use unfamiliar tools within an unfamiliar environment, by people who just don't care to look outside the box. If you are narrow minded and determined enough, you might even get Linux to brew your cup of tea or coffee. I'd rather use something intended to do so in the first place. Continuing to direct and expect inexperienced users to use the same tools with the same proficiency as an experienced user, without some VERY detailed instruction, does them a disservice. Unfortunately, all you need to do to give advice in most forums, is register. They will then allow someone to misdirect people using the medium of a "Post" to do so. If I were to "err" in giving advice, I would certainly prefer to "err" on the side of caution.

My first piece of advice would be to back up important data. The second is to be careful who you listen to and do your research BEFORE doing any procedure. The third is to keep it simple and use what you are most familiar with. If that is Windows, why not use it?

Your rudeness has been noted. Not only have I Read TFM, in some cases I wrote, or helped to write it.