LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NtfsResize? (https://www.linuxquestions.org/questions/linux-newbie-8/ntfsresize-460692/)

Entheos 07-03-2006 06:02 PM

NtfsResize?
 
Trying to free space in my Windows XP thats formatted in NTFS to install Linux. I supposely have 200Gigs and running a NVDIA Geforce 7900 GTX with a Pentium 4 and Dual 512mb ram

Ok I read the instructions about 5 times already still don't get it!
(kinda new to the Linux scene) This is what I did, I downloaded the latest G-Parted Live CD 0.2.5-2 ran it etc, etc, told it to run in full X server and got an error, got send to native Linux, so I said F it ill do it here:


Code:

ntfsresize -n -s 80G /dev/sda1 : ok the simulations worked
Code:

ntfsresize -s 80G /dev/sda1 : it worked
I got out, booted windows and windows ran dskchck
then the instructions told me to do this:

Code:

dd if=dev/sda of =sda.mbr bs=512 count=1
:

well I did this in G-Parted I just replaced the hda with sda (wheres my memory is stored) because in the instructions the memory is stored in hda

Code:

sfdisk -d /dev/sda > sda.pt
:

I had to download Knoppix to do this because for some reason G-Parted live didn't have fdisk or cfdisk in it

ok after this whats next? What do I do? Did I do anything wrong?
becuase Slackware for some reason still can't detect any free space :/

O yeah I ran G-Parted in mini X server after partitioning Windows XP and it didn't let me partition my drive and it looked like my sda now consumes 80 gigs than having 80 gigs of unallocated space

homey 07-03-2006 07:52 PM

The knoppix cd should have a nice gui partitioning tool called qtparted . You will probably need to un-mount things first. The command: ( umount -a ) should do it.

If you still want to do it from the command line, here are my notes...
The command umount -a is still good.
Code:

When decreasing the size of a partition, do the file system first. This is true for Windows or Linux partitions.
When increasing the size of a partition, do the partition first.

To resize an NTFS partition to a smaller amount:
I run defrag and scandisk before proceeding
Boot up with the Linux cd

# Backup the partition table with the command:
sfdisk -d /dev/hda > /mnt/images/w2part

# This will show how much space can be gained.
ntfsresize --info /dev/hda1

# In this case, I'm resizing the file system to an available amount of 8000M (8GB).
ntfsresize --size 8000M /dev/hda1

# Run the fdisk utility to resize the partition.
# Delete the old partition and create a new one.
# Make sure to use the original starting point and make any changes only at the end of the partition.
# Don't forget to set the partition type to 7 (NTFS) and write the changes.
fdisk /dev/hda

# Reboot and let Windows do the chkdisk thing.
# Reboot with the rescue cd and run the resize with no options to make sure the file sytem matches the partition size: ntfsresize /dev/hda1


Entheos 07-03-2006 10:46 PM

Code:

# Run the fdisk utility to resize the partition.
# Delete the old partition and create a new one.
# Make sure to use the original starting point and make any changes only at the end of the partition.
# Don't forget to set the partition type to 7 (NTFS) and write the changes.
fdisk /dev/hda


could u show me the steps I gotta take or put in fdisk to do this?:scratch:


All times are GMT -5. The time now is 11:07 AM.