PDA

View Full Version : More on Qtparted, ntfsresize and WinXP partitions



alert5
09-26-2003, 03:25 AM
Bottom line first...resizing NTFS volumes with Knoppix booted from CD works flawlessly!

I had two WinXP boxes that needed partitioning and did not do my homework before destroying one of them. Shame on me.

The test PCs:

1. A 500MHz PIII, 384MB RAM, 30GB NTFS HD. WinXP Pro using the entire volume.
2. A 2.53GHz PIV, 1024MB RAM, 60GB HD. A 39 MB Dell utility partition (hidden with no drive letter assigned) and the rest an NTFS volume running WinXP Pro.

Test1 (PIII): Use Knoppix to delete partitions and increase the size of the NTFS volume.

After wrecking the PIII, I used Knoppix qtparted and fdisk to set up a 12GB NTFS, 12GB FAT32, 3GB Linux and the balance as a Linux swap file. Rebuilt the WinXP system utilizing about 3.5GB of the NTFS partition.

Learned my lesson and imaged this system to CD using Norton Ghost 2002. With this quick recovery insurance, I proceeded with caution and deliberation. Studied the manuals and paid particular attention to Szabolcs Szakacsits beautifully written procedure for using ntfsresize.

1. Booted Knoppix, sudo passwd, su to run qtparted. Attempted to delete all partitions. I could not delete the swap partition with qtparted (Is this normal?). Used fdisk to delete the swap.
2. I used qtparted to resize the deleted NTFS partition to take up the entire hard drive. Then recreated the partition as NTFS type 7 and made sure it was set active.
3. Reboot brought up WinXP with a message that new hardware was found. Reboot again and everything was normal.

Test2 (PIII): Use ntfsresize to reduce the size of the NTFS volume and free up space for whatever. I took no prior preparation on this hard drive other than to run Diskeeper with the default defrag settings on the NTFS partition.

1. Booted Knoppix, sudo passwd, su and then used Szaka's method for reducing the NTFS volume to 20GB. I must note I did receive a message "The read-only test run ended successfully". Fdisked to delete and recreate as NTFS type 7 and boot active. Left the balance of the drive as unused.
2. Reboot again brought up WinXP with no problems. I used WinXP disk manager to format the free space as FAT32.

At this point I'm wondering what all the concern is about Microsquish somehow locking the last block or clusters on an NTFS volume. Coulda fooled me until my next resizing effort on the PIV.

The PIV, as I mentioned had two of the four allowed primary partitions in use. That Dell utility thing and the rest NTFS. So taking the same approach, I did a Diskeeper defrag and noted some locked system files about half into the NTFS volume. Just to be on the safe side though, I decided to use my old trusty Norton SpeedDisk to have a look. Sure enough there were a bunch of "seldom used" files stacked up at the end of the drive. I used the SpeedDisk options to force all moveable files to the front of the disk. Now for the acid test. By the way, I Norton Ghosted this drive to CD as well in case I screwed up again.

Test1 (PIV): Use ntfsresize to reduce the NTFS volume.

1. Booted Knoppix, sudo passwd, su and then used Szaka's method again. Tried -s20000M /dev/hda2. No go..."Volume end is fragmented".
Tried -s30000M /dev/hda2. Again, no go with the same warning.
Tried -s35000M /dev/hda2. Successful test.
2. Let 'er rip and used fdisk to delete and recreate the NTFS volume now at roughly 35GB. I again left the free space as is.
3. Rebooted into WinXP with the new hardware found message and subsequent normal operation.
4. Formatted the free space with XP disk manager as FAT32.

Everything is fine on the PIV with one strange anomaly: the new FAT32 partition is hidden from XP and I cannot turn the hidden flag off with Linux cfdisk. That partition (hda3) is fully useable from an XP command prompt and I can Ghost to it from true DOS, but XP refuses to show it in "My Computer". XP disk manager sees it just fine and it does have an assigned drive letter. Weird.

Anyhow I hope this reassures folks that Knoppix is a terrific option to PartitionMagic or other non-destructive partitioning tools.

Test2(PIV): TBD, but once I figure out how to use GRUB, install Knoppix for a dual boot system.

Lessons learned:

a. Don't believe everything you hear about devious M$.

b. If you ntfsresize, delete partitions first before increasing volume size and decrease the NTFS size first, then delete and recreate the volume.

c. Evidently WinXP systems with lots of hours of use do in fact reposition seldom used files to the back end of the drive. These files must be moved out of the way because that message from ntfsresize is not indicating the actual volume end as fragmented but rather a part of the disk that has files on it and you could not "see" or at least your defragger of choice did not "see" or care to deal with. I base this on my test results. The PIII was a fresh XP install and did not have enough running time on it to declare files old enough to be put at the back of the bus so to speak, whereas the PIV has been running for many months without a rebuild. I'd be interested if someone could explain these results by drawing a different conclusion.

Thanks to all the great contributors to this forum.

didac
09-26-2003, 06:07 PM
different story for me.

My friend bought a HP pavillion with XP home preinstalled. (60 Gig in one big NTFS partition)
I tried to reduce the partition size using qt parted on knoppix(version september 26 if I remember correctly) and rescue-cd-0.2.4 (they appear to use different ntfs libraries according to the rescuecd website) both failed because of errors on the ntfs partition (even after full defrag). He had played with XP for a couple of days at that point. A few days later XP crashes and I do a reinstall of the backup CD's provided by HP. On the "clean" partition QT parted complains again and refuses to reduce the partition size.
I downloaded Bootit-ng, it resized without problems. It costs 35 EUR, but northon ghost also costed money I suppose.

Possibly command line options are able to do it, but the qt parted application as it is didn't cut it.

Now the XP partition serves his wife until he can convince her she can do much more using knoppix. He runs knoppix off course.

j.drake
09-26-2003, 06:18 PM
I could not delete the swap partition with qtparted (Is this normal?). Used fdisk to delete the swap.

I'm not sure if it's normal, but it's the same experience I had. The difference with me is that I had already deleted the entire drive. I finally had to log int the console as root and run cf disk to delete the empty swap. QTParted is amazing, but I do not understand why it seemingly cannot delete a swap partition. It did not help to type sudo qtparted in the console, BTW.

alert5
09-26-2003, 08:14 PM
didac,

I think what happened is you resized with qtparted. What you really need to do is run the ntfsresize test first as described by szaka. If you do not get the indication "The read-only test run ended successfully." you are sure to mess up the NTFS files on your system.

By the way my not seeing the new PIV partition was because in XP Powertools I had the viewable drives turned of except for the ones currently in use. The partition was not hidden just told not to display in "My Computer".

linuxpopper
02-01-2004, 09:03 AM
Probably the swap partition is in use, by knoppix. You probably need to unmount the swap partition with "swapoff"

swooshtika
04-26-2004, 06:17 PM
I have a Windows 2000 Server with 2 partitions - a 20GB and 60GB. The 20GB partition only has 20% left and is starting to become sluggish. I want to use Knoppix to stretch this 20GB partition. How is this done?