Resizing NTFS Partition with errors
Hi, I have the unfortunate situation of a hard disk with bad sectors, these showed up when I tried to resize my NTFS (WinXP) partition. I believe they're from a Partition Magic resizing gone bad (even though I've since completely wiped out that partition and reinstalled Windows). Anyway, GParted didn't want to resize because of these bad sectors, and recommended I run the chkdsk command under Windows and reboot. This I did, but still got the errors. Upon looking closer, I saw that the ntfsresize command needed to be run with the -b option. I did this manually, and successfully resized to 10240 MB (10 GB). BUT, now GParted shows the disk still at 20 GB, and says 15 GB are full! What to do??? When I ran the ntfsresize command it mentioned something about using fdisk to reduce the size of the partition, but I didn't understand.
As you can guess, I'm pretty much a newbie to command line stuff, I'm not afraid of it but if directing me to use such please give complete directions. Thanks pb |
hi,
To understand parition and file systems, read http://en.wikipedia.org/wiki/Disk_partitioning http://en.wikipedia.org/wiki/File_systems From man pages, Quote:
They are empty or raw partitions.Then u will format it with a file system like ext2 or vfat.Similarly when u resize u have to resize both of them. So u shrinked the file system and u have to shrink the partition now. I think u will understand it now. Take backup first to avoid data loss. regards, Nirmal Tom. |
Well, I understand that I need to shrink the partition, but I don't know how to do this. I've looked at the fdisk man page, but still can't understand. Please help!
|
The concept is simple - the partition table entry merely describes the partition; basically start and size. You delete the partition entry (doesn't affect the data), then define a new (smaller in your case) partition starting at the same location.
Needs to be no smaller than the filesystem you resized. Try the FAQ at linux-ntfs.org - seems to be offline at present, but has a bit more detail about how to do this safely. |
hi,
u can use both fdisk and parted for the purpose.parted is easy. like syg00 said, Quote:
when use fdisk note the start cylinder of the partition u wish to resize, then delete it and recreate the partition with the same cylinder as start and the end cylinder is ur desired size. parted on the other hand is too easy. give the command , parted /dev/sda where sda is ur hard disk name then give command print, it will print partition structure in easy format mine is, (parted) print Disk /dev/sda: 80.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 8225kB 10.5GB 10.5GB primary boot 2 10.5GB 80.0GB 69.5GB extended lba 5 10.5GB 31.5GB 21.0GB logical fat32 6 31.5GB 36.7GB 5239MB logical ntfs 7 36.7GB 36.8GB 107MB logical ext3 8 36.8GB 63.0GB 26.2GB logical lvm 9 63.0GB 63.1GB 82.2MB logical fat16 10 63.1GB 80.0GB 16.9GB logical No cylinder infn, for our easy doing.Then use resize command to resize the partition u like. from parted help, Quote:
suppose if i like resize mu 10th partition(10 63.1GB 80.0GB 16.9GB logical), i have to do, resize 10 63.1GB 70GB hope u understand regards, Nirmal Tom. |
Your suggestion (using parted) sounded good, but it turns out it won't work:
Code:
No Implementation: Support for opening ntfs file systems is not implemented yet. pb |
Well, I managed to get the partition resized using fdisk, here are the commands I used (from another page I found):
Code:
# fdisk /dev/hda pb |
hi,
i am not aware of that parted limitation.Glad to see u post back to help others.Good luck on your linux adventures. regards, Nirmal tom |
All times are GMT -5. The time now is 05:44 AM. |