LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Why can't qtparted resize my NTFS partition? (https://www.linuxquestions.org/questions/linux-hardware-18/why-cant-qtparted-resize-my-ntfs-partition-445144/)

xri 05-15-2006 06:55 PM

Why can't qtparted resize my NTFS partition?
 
I have a new Compaq P2000 with a 60G HD and about 40G of free space.

I started defragmenting the HD until there was 0% fragmentation.

Then I tried to resize the NTFS partition with qtparted (from Kanotix) and got this message:
Quote:

Filesystem check failed! Windows wasn't shut down properly.
Then I used ntfsfix on Kanotix and immediately CHKDSK on XP, and right after that, I tried again with qtparted. Again the same message!

By the way, the computer came with PC Recovery and a recovery partition on its HD. Could this be causing the problem? If it does, what is the best step here?

Any hint will be appreciated.

jschiwal 05-15-2006 07:10 PM

I see from your profile that you also have, or had, SuSE 9.0. You could boot up with the SuSE disk and use the installation program to resize the NTFS partition.

Use the Advanced Custom partitioning option. After the resizing is finished, you can abort the installation and install the distro that you want. I don't know if a recovery partition could be the problem. It might be because the partition is marked as hidden, but I'm just guessing. I've re-sized my XP partition during Mandrake and SuSE installs on two laptops and never had a problem loosing data, however backing up anything important would be a good idea.

I had to use a linux disk once to create a partition for an NT install, because the Windows NT installation program choked on drives over 2 GB.

xri 05-17-2006 05:56 AM

Thanks for your answer, jschiwal.

I got rid of the recovery partition, but the situation has not changed.

I have yet to try the SUSE tool. I'll let you know how it goes.

xri 05-17-2006 04:44 PM

I used the SUSE tool to resize the NTFS partition. It first gave me a message saying that it can resize the partition up to 0 MB only. Then I tried to resize it anyway and then the whole installation CD gave me an error message and kicked me out.

So far I don't see any way to repartition the disk to install Linux.

Electro 05-17-2006 05:44 PM

You do not need to do a full defrag because all you need to do is a space defrag so all the data is in the front of the hard drive. Sometimes disabling the swap in Windows will work on some systems.

SystemRescueCD is a good tool to have around.

If everything fails, try Partition Magic.

syg00 05-17-2006 06:44 PM

I flat out refuse to use *any* of the GUI ntfs tools - all of which I suspect call ntfsresize.
If you use ntfsresize itself (as in CLI) you see all the messages, and can react accordingly. Never had a problem, even on paritions that needed fixing.

xri 05-19-2006 01:35 AM

Thank you for your answers.
I am using SystemRescueCD now.
After ntfsresize -i /dev/hda1:
Quote:

ntfsresize v1.9.2
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 80023716352 bytes (80024 MB)
Current device size: 80023716352 bytes (80024 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 23327 MB (29.1%)
Collecting shrinkage constraints ...
ERROR: Your disk has bad sectors (manufacturing faults or dying disk).
This situation isn't supported yet.
I ran chkdsk c: /f on xp, and tried again ntfsresize: same error message as above.

I am going to boot a recent Knoppix, looking for a more recent version of ntfsresize.

By the way, do you recommend ranish for a case like this?

syg00 05-19-2006 02:12 AM

You have a bad disk. You can force ntfsresize to work despite the bad blocks.
Erk ...

See the manpage for the the --bad-sectors switch.
Get some (validated) backups (plural) of the entire partition first if you decide to try this.

xri 05-19-2006 03:17 AM

This time I tried from Knoppix 4.0.
After running chkdsk again, this time with the options /f /r, I entered ntfsresize -i /dev/hda1. Here, as you can see, the message is slightly different:
Quote:

ntfsresize v1.11.3-WIP
Device name : /dev/hda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 80023716352 bytes (80024 MB)
Current device size: 80023716352 bytes (80024 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 23327 MB (29.1%)
Collecting shrinkage constraints ...
WARNING: The disk has bad sector! This can cause reliability problems!
ERROR: The NTFS volume has at least 1 bad sector.
At this point, what are the chaces that I destroy my data by using the --bad-sectors option?

I highly appreciate your input here.

Wim Sturkenboom 05-19-2006 04:02 AM

Quote:

Originally Posted by xri
At this point, what are the chaces that I destroy my data by using the --bad-sectors option?

Don't tell us that you did not make a backup first. When fiddling with partitions, there's always a chance that something goes wrong and that you loose all data. It can be a lengthy process to get it all back.

xri 05-19-2006 05:06 AM

Thank you, syg00. I didn't read your previous post.
At this point I see two options:

1.
Quote:

Get some (validated) backups (plural) of the entire partition first.
Then use the --bad-sectors option.

2. Play it safe (as in chicken) and install a distro designed to work inside the NTFS partition. I'm thinking Topologilinux.

Electro 05-20-2006 08:20 PM

I always recommend backups when using utilities as reliable as Partition Magic. Unfortunately partimage can not be used to make an image of NTFS filesystems, so Norton Ghost or corporate level backup software needs to be used. Norton Ghost could be used if you do not want to spend time finding all the data that you value.

I suggest using either hard drives or DVD discs for cheap backups. CD are not reliable for backups because that do not include ECC information. DVD discs includes ECC so the data gets reconstructed when the data is partially corrupted. DVD and hard drives includes ECC.

You could use VMware if you pick your second plan. NTFS file and directory permissions suck. The part of Linux security is its file and directory permissions. VMware provides a machine that you can run another OS with out rebooting or setting up mult-booting.

xri 05-21-2006 02:22 PM

Thanks, Electro.
I'll follow your advice and take due precautions. I just went to partimage.org and confirmed what you just said: no good for NTFS (yet).
How about ntfsclone?

twilli227 05-21-2006 04:01 PM

xri, you could have a look at gparted:
http://www.gnu.org/software/parted/
http://gparted.sourceforge.net/features.php
http://sourceforge.net/project/showf...kage_id=173828

xri 05-21-2006 08:37 PM

Thank you, twilli227.
I see. Looks good. It seems to use ntfsprogs (http://linux-ntfs.sourceforge.net/).
There is also http://partitionlogic.org.uk/index.html.

gnowak 01-28-2007 07:07 AM

Hello, I had a similar problem with my 120 GB seagate disc which has 4 kb bad sectors.
I could not resize it with gparted-livecd-0.3.3-0 because of the bad sectors. I tried to run some chkdsk /f /r like suggested without luck. The solution was to use qtparted v0.4.5-cvs running from KNOPPIX 5.1.1 live CD. Qtparted ignored the bad sector problem and resized the disc. Running the same version of qtparted from kubuntu 2.6.15.27-386, generates an error when trying to resize.

I have also heard that you can use ntfs-resize with bad sector option selected.

Hope some of this can be used by others :)

Good luck.

Grzegorz Nowak, webdrive.dk admin.


All times are GMT -5. The time now is 10:58 AM.