Wednesday, 27 June 2018

windows - How to resize an NTFS volume to fill the partition?


Having only the Windows ISO file I installed Windows XP to a virtual machine, and moved it successfully to a physical partition on my machine.


Because I did a direct partition copy, from the virtual parition to the physical, Windows thinks it has still 10GB size, but the partition it sits in is 59GB.


Is there any way or hack to make it recognize the entire partition? Without data loss of course, respecting my ext4 or other linux partitions Windows XP does not know about.


Diskpart simply reject the extend command on it.


EDIT: I also heard people experiencing the same, when resizing the partition with GParted.



Answer



You cannot resize the a partition that's mounted. That's why diskpart refuses the extend.


You need to boot an Ubuntu live CD or pendrive.


And run ntfsresize


Here is a little tutorial: http://linuxtechres.blogspot.hu/2007/08/how-to-use-ntfsresize-from-command-line.html


Basically it says:


You need to do the following commands:



  • fdisk -l to find out which partition to touch.

  • ntfsresize --info /dev/ to get partition info.

  • ntfsresize --no-action --size to do a dry run. (you can use units in the size eg. 12000M)

  • ntfsresize --size to do the resize. This will schedule a chkdsk check so boot the Windows to finish it.


You need to be in disk group to carry out the action or run it as root.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...