Resizing NTFS Partition with errors

Forum rules
Before you post please read this
Post Reply
User avatar
pashabear
Level 3
Level 3
Posts: 109
Joined: Fri Jan 05, 2007 11:59 pm
Location: Moscow, Russia

Resizing NTFS Partition with errors

Post by pashabear » Mon Apr 16, 2007 9:43 am

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

User avatar
Boo
Level 7
Level 7
Posts: 1634
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo » Mon Apr 16, 2007 11:35 pm

It sounds like you resized the ntfs file system but the partition it is on is still the same size.
ie the partition is 15GB and the file system on it is now 10GB.
and it sounds like you are using a 20GB disk?
so fdisk would have been saying to reduce the size of the partition to the same size as the file system you just resized. ie to 10GB.

so now the dangerous part of using fdisk to resize the partition to the same size as the ntfs file system.

I haven't done that before. I think you have to destroy the partition and make a new one since i don't think you can resize partitions.

good luck, backup data, and hope windows stays...
:D
Image
Now where was i going? Oh yes, crazy!

User avatar
pashabear
Level 3
Level 3
Posts: 109
Joined: Fri Jan 05, 2007 11:59 pm
Location: Moscow, Russia

Post by pashabear » Tue Apr 17, 2007 11:18 pm

Well, I managed to get the partition resized using fdisk, here are the commands I used (from another page I found):

Code: Select all

# fdisk /dev/hda
Command (m for help): p

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (8-3648, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (8-3648, default 3648): +10240M

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1246 10008463+ 7 HPFS/NTFS

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Command (m for help):q
Just thought this might be useful for someone else, searching though the forums...
pb

NiksaVel
Level 5
Level 5
Posts: 771
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia
Contact:

Post by NiksaVel » Fri Apr 20, 2007 2:28 pm

you might fix the bad sectors with a low-level format... the utilities to perform it are usually produced by the manufacturer of your hdd... I fixed a couple of HDDs gone wild this way...
Windows is extremely fast after a fresh install. If you want to make it stay that way: - don't use it.
-Clem

User avatar
pashabear
Level 3
Level 3
Posts: 109
Joined: Fri Jan 05, 2007 11:59 pm
Location: Moscow, Russia

Post by pashabear » Fri Apr 20, 2007 10:05 pm

Thanks for the suggestion, I suppose I won't be doing that for a bit since this is my main disk (and it's not giving me problems otherwise).
pb

Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Post by Husse » Thu Apr 26, 2007 9:03 am

@NiksaVel
low-level format
Unless you did that before the age of IDE you have not done it - it's nothing we can do - it's done once and for all at the factory :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

NiksaVel
Level 5
Level 5
Posts: 771
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia
Contact:

Post by NiksaVel » Thu Apr 26, 2007 9:13 am

lol... I know it's not REALLY a low-level format in the true sense of the word... but more like an unformat that changes every "sector"? or something to value 0 on the hdd... every manufacturer has a proggy to do this with their hdd... and I even had this option in the bios with some brand computers... it really did help me fix a disk that refused to work on several occasions.
Windows is extremely fast after a fresh install. If you want to make it stay that way: - don't use it.
-Clem

Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Post by Husse » Fri Apr 27, 2007 5:26 am

:) different story.....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

Post Reply

Return to “Mounting Partitions”