Sponsored Content
Top Forums UNIX for Advanced & Expert Users Resizing and repartitioning NTFS with gParted? Post 302261762 by koppe on Tuesday 25th of November 2008 01:56:56 PM
Old 11-25-2008
Question Resizing and repartitioning NTFS with gParted?

Sorry that this is slightly OT, but in my defence, I intend to install Linux (and probably others).

I just bought a new computer with Windows Vista preinstalled; and though there is no love between me and MS, I would like to keep it (I paid for it after all). I have 2 x 500GB HDD. The extra disk has one large NTFS partition, but as it's empthy, so I can handle that one. The main disk however, has one large partition (455GB) with Vista, and one small partition ("Recovery") of 10GB -- all in NTFS.

As the large partition is mostly empthy; I would like to resize (shrink) it, and put one or two new partition(s) between the two existing one -- one of them being the extended partition.

I have a gParted live CD, so I was thinking about using that.

My questions:
*Is it possible to shrink a NTFS partition with gParted, and create a new (extended) partition between the existing ones?
*Must I prepere the partition I want to shrink... e.g. defragment it?
*Do I risk (with gParted) to shrink it too much, and corrupting my files?
*Are there any pitfalls I should be aware of?

I've googled it, and it seems that often Vista refuses to boot after it's partition has been resized...:
*Is this a problem? Personal experiences...
*Can I prevent it from happening?
*If it happen, how can I recover from it (preferbly without reinstalling everything)?
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

repartitioning

Hi. I am working on a Sunblade with Solaris 8 installed. 2 hard disks, not mirrored or striped. The person who set it up originally had not given /usr it's own partition. The second disk is one large partition with a directory mounted on it. We are running Apache on this machine to work with... (4 Replies)
Discussion started by: cmh
4 Replies

2. Solaris

Repartitioning hard drive on Solaris10

Hello, Is it possible to repartition hard drive on Solaris10 without deleting all the content of the drive? I have a workstation with 40G drive that has two partitions 4G and 36G. The big partition is allocated for /export/home and small for everything else (don't ask me why, I did not set it up... (1 Reply)
Discussion started by: pn8830
1 Replies

3. UNIX for Dummies Questions & Answers

Why do I have partitions with one command but not in gparted

Hi, I used gparted in ubuntu to re partiton my slave hard drive so according to it I just have a logical drive with one partition in it. But when I do sfdisk -l I get: Device Boot Start End #cyls #blocks Id System /dev/sdb1 0+ 9728 9729- 78148161 83 Linux... (3 Replies)
Discussion started by: mojoman
3 Replies

4. Ubuntu

Gparted, NTFS, Partitions, and power failures.

Having just installed mint on my new raptor, I decided I was going to removel the old unix partition from my NTFS back up drive, and resize the NTFS partition to fill the full 500gigs instead of just 300. While resizing the 300 gig to fill the full drive my computer shut off. When I booted back... (1 Reply)
Discussion started by: Methal
1 Replies

5. Solaris

Metaset repartitioning

Dear all, This metaset stuff drive me crazy. The story begin with the Solaris 8 upgrade.... We have a pair of Solaris 8 with Sun Cluster 3.1, to prevent a long downtime, the Live Upgrade was chosen. As metadb cannot use LU to upgrade directly, we remove the diskset before upgrade, and put it... (0 Replies)
Discussion started by: donaldfoo
0 Replies

6. UNIX for Advanced & Expert Users

Live Linux Cd's with gparted

Which Live Linux Cd's have gparted? (1 Reply)
Discussion started by: cokedude
1 Replies

7. Ubuntu

Ubuntu very slow after repartitioning

Good evening, i don't know if this is the right section, so forgive me if it's wrong. i have an Asus Gl503v in dual boot w10-ubuntu18. hard disk is hybrid ssd-hhd. w10 is the native system and it is on ssd. I partitioned the hdd left a part ntfs and a part ext4. In the ext4 part i created... (15 Replies)
Discussion started by: Marcov
15 Replies
dkio(4) 						     Kernel Interfaces Manual							   dkio(4)

Name
       dkio - disk interface

Syntax
       #include <sys/fs.h>
       #include <sys/ioctl.h>

Description
       This  section  describes  the ioctl (input/output controller) codes for all disk drivers.  The basic ioctl (input/output controller) format
       is:

       #include <sys/fs.h>
       #include <sys/ioctl.h>
       ioctl(fildes, code, arg)
       struct pt *arg;

       The applicable codes are:

       DIOCGETPT       Indicates to the driver to store the information in the current partition table in the address pointed to by arg.  The file
		       descriptor must be opened on the raw partitions, a or c.

		       DIOCGETPT does not change the partition table, but it does provide access to the partition table information.

       DIOCSETPT       Indicates to the driver to modify the current partition table with the information pointed to by arg.

		       The file descriptor must be opened on the raw partitions, a or c.

		       If  the a or c partition is not mounted, only the partition table in the driver is modified.  This temporarily modifies the
		       partition table of the disk.  The modifications are overwritten with the default table when the disk is turned off and on.

		       If the a or c partition is mounted, both the partition table  in  the  driver  and  the	partition  table  in  the  primary
		       superblock are modified.  This permanently modifies the partition table of the disk.  This is not recommended.  To change a
		       partition table permanently, use the command.

       DIOCDGTPT       Indicates to the driver to store the default information of the current partition table in the address pointed to  by  arg.
		       The file descriptor must be opened on the raw partitions a or c.

		       DIOCGETPT does not change the partition table, but it does provide access to the partition table information.

       DKIOCGET        Allows the user to receive generic disk information as defined in structdevget.

       DKIOCACC        This code is defined in It is currently unused.

Restrictions
       These restrictions apply when using the DIOCSETPT ioctl code:

       o   You must have superuser privileges.

       o   You	cannot	shrink	or change the offset of a partition with a file system mounted on it or with an open file descriptor on the entire
	   partition.

       o   You cannot change the offset of the a partition.

Examples
       This example shows how to use the DIOGETPT ioctl code to print the length and offset of the a partition of an RZ23 disk:
       #include <sys/types.h>
       #include <sys/param.h>
       #include <sys/fs.h>
       #include <sys/ioctl.h>

       main()
       {
	    struct pt arg;
	    int fd, i;

	    /* Open the "a" partition of the disk you want to see */

	    if ( (fd = open("/dev/rz0a",0)) < 0 ) {
		 printf("Unable to open device
");
		 exit(2);
	    }

	    /* Get the partition information */

	    if ( ioctl(fd,DIOCGETPT,&arg) < 0 )
		 printf("Error in ioctl
");

	    printf("Length		Offset
");

	    for ( i = 0; i <= 7; i++ ) {
		 printf("%d		%d
",arg.pt_part[i].pi_nblocks,
			     arg.pt_part[i].pi_blkoff );
	    }
       }

Files
See Also
       rz(4), disktab(5), fstab(5), chpt(8), diskpart(8), fsck(8), MAKEDEV(8), mkfs(8), tunefs(8)

								       RISC								   dkio(4)
All times are GMT -4. The time now is 05:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy