1

Topic: resize vista partition

Dear all,

  I have a problem. I got a laptop with already installed Vista, hard drive is 160 Gb. I would like to install Linux on this computer and before that I need to resize a hard drive; ~40 Gb for Vista and the rest for Linux. Vista's own disk management could only shrink the Vista partition by 50% (80 Gb), which I don't like. I googled this topic and found that new 'ntfsresize' program could do it without any problems. As I understand, Gparted is based on this utility, however I don't see any words about it on the website. So before performing something  I would like to know is it safety to resize Vista partition using Gparted?

thanks,
   Jess

2

Re: resize vista partition

There is more than one word ! There is one topic smile
http://gparted-forum.surf4.info/viewtopic.php?id=431

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

3

Re: resize vista partition

Dear Larry,

Thanks for the link. Could you please tell me new version of gparted is based on 1.13.1.11 version of ntfsresize which is supposed to resize vista correctly?

thanks,
jess

4

Re: resize vista partition

Yes i can ! And I do smile
But it seems to be more safe to run command line, like it is said in the topic.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

5

Re: resize vista partition

OK. Thank you.

One last question concerning this part:
"Create a new partition, with the same number of the Vista partition we just deleted
Set size to the same start sector that it was
Set end size to 26 go ( well, more than 25go !, maybe 25,5 go should work)"

As I understand, I have to input end size in number of blocks (cylinders), not in Gb. Is it correct? How to know what corresponds 1 Gb in term of blocks?

thanks,
  jess

6

Re: resize vista partition

Well, basically here is what happens :
you first shrink the file system.Then you shrink the partition.
Common users don't even know there is a file system : they though there is only one think, which is partition.

That said, what you have to do is to be safe smile. so it is much more safe to set the partition a little bit bigger than the file system, so you are sure the file system is hold in the partition, so there is no risk it overflows.
Right ?

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

7

Re: resize vista partition

Thank you. Sorry for such stupid questions. You are right - I want to play safe.

What I have in my case is a hard drive 160 Gb. I already run Gparted and see the following partitions:
                     Boot Start            End
/dev/sda1                1                 4               Dell Utility
/dev/sda2                5                1310          NTFS
/dev/sda3      *       1310           19157         NTFS

First 2 partitions are reserved for DELL purposes (I don't know why), so I want to shrink the /dev/sda3 (now the size is 137 Gb, I want to have 35 Gb for Vista).

I already run 'ntfsresize' with the option:

ntfsresize -s 35G /dev/sda3

It finished (seems to be correctly) and I run 'fdisk /dev/sda' next.

Following your posts, I have to delete this /dev/sda3 partition and create a new one with 36 GB (35 +1 Gb). Correct?  First question - what is number I have to put in the "End" for this new partitions:

before:

/dev/sda3      *       1310           19157         NTFS

and after should be like:
/dev/sda3      *       1310           ????         NTFS

i.e. what should I  put instead "????" to have 36 Gb?

did I make myself clear?

thanks,
   jess

8

Re: resize vista partition

Look at this. Here is an example :

Partition number (1-4): 1
First cylinder (1-15, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-15, default 15):

Like you see i can set 14 (it is a usb-key, so very small), or set +120M or +120000K. Okay ?
For you it is the same !
Try to set 36 go for "end".
Anyway, since you don't type "w" it won't write anything !
After you type 36G, just type "p" to print the output and compare with the old value if you want (it should be less :-p).

right ?

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

9

Re: resize vista partition

If it fails after reboot, this usually means that you have a file system overflowing the partition ! That is the reason why i prefer to set partition really bigger than the fs.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

10

Re: resize vista partition

Larry,
thank you for your help.

I followed your instructions (I put "+36000M" at the 'End') and I have :

before:

/dev/sda3      *       1310           19157         NTFS

and after should be like:
/dev/sda3      *       1310           5687   35162299+         83  Linux

Was it correct? Does it look like I have now 36 Gb for Vista, and the rest for Linux?

11

Re: resize vista partition

One question about this line:

/dev/sda3      *       1310           5687   35162299+         83  Linux

Why this partition is labeled now as "Linux"?

12

Re: resize vista partition

I found the answer on the last question in your post. So, I have now the following:

/dev/sda3      *       1310           5687   35162299+         7  NTFS

What sign "+" in "35162299+" mean? If it is OK, could I save the changes?

thanks,
  jess

13

Re: resize vista partition

oh yes !
I forgot to mention that i my doc ? Can't believe it !
nice shot anyway !
Yes i did sad
By default the partition type is linux. To change it to ntfs, just type "t" like "type", choose the partition you want to change the type, and choose 7 (it is ntfs). You may have to tag the boot toggle, just like it was.

Happy you pointed this out !
I now must release asap :-/

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

14

Re: resize vista partition

Dear Larry,

Thank you very much for your help. I rebooted the computer and it works! Everything is safe and working.

jess

15

Re: resize vista partition

wink

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

16

Re: resize vista partition

One last question - now the rest of resized partition  is now marked as Unallocated. As a result, Linux installation (Fedora) fails when tries to format this partition. Can I use gparted to format this partition without any problems for Vista?

thanks,
  jess

17

Re: resize vista partition

I am a bit surprised !
Could you please post the out put of fdisk -l
BTW, what is the exact message that fedora returned ?
I use fedora since years (it was red hat), and never had this kind of problem...
I am intersting by your reply.
thx

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

18

Re: resize vista partition

fdisk -l give me the following:

                   Boot Start            End
/dev/sda1                1                 4               Dell Utility
/dev/sda2                5                1310          NTFS
/dev/sda3      *       1310           5808          NTFS
/dev/sda4               19197         19458         W95 Ext'd (LBA)
/dev/sda5               19197         19458          Unknown

So, I don't see here the rest of my partition I resized yesterday (~100 Gb). Did I miss something during yesterday operation?

jess

19

Re: resize vista partition

Excuse me, could you add :
# cat /proc/partitions
please ?

BTW, this will probably answer your question smile

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

20

Re: resize vista partition

# cat /proc/partitions

major   minor     blocks     name
7           0            44616     loop0
8           0        156290904   sda
8           1               32098   sda1
8           2          10485760   sda2
8           3          36134232   sda3
8           4                       1  sda4
8           5             2096128  sda5

I don't see here 'unallocated' partitions which is the rest of resized /dev/sda3.  Moreover, even Disk Managment of Vista could not format 'Unallocated space' - gave me an error "No enough space for that operation'. What should I do?

21

Re: resize vista partition

Two things before :
first you didn't give the complete output of fdisk. here is an example :

Disk /dev/sda: 100.2 GB, 100256292864 bytes
255 heads, 63 sectors/track, 12188 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       12188    97795687+   f  W95 Ext'd (LBA)
/dev/sda5              14        2993    23936818+  83  Linux
/dev/sda6            2994        3491     4000153+  82  Linux swap / Solaris
/dev/sda7            3492        4482     7960176   83  Linux
/dev/sda8            4483        4495      104391   83  Linux
/dev/sda9            4496       10869    51199123+  83  Linux

Since i can see what is the *last cylinder* of your drive , it is difficult to guess something.

And could you post somewhere a screen shot of the gparted layout, please.
I would like to know what gparted says about this unallocated space...

I think we will end up creating what you want using gparted. But first I would be happy to see what gparted says, and how many sylinder is your hard drive.

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

22 (edited by jk 2007-03-15 17:00:17)

Re: resize vista partition

Thanks for the help. Here is the full output from fdisk:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start             End      Blocks           Id    System
/dev/sda1                1                 4             32098+   de    Dell Utility
/dev/sda2                5                1310    10485760     7      NTFS
/dev/sda3      *       1310           5808     36134232     7      NTFS
/dev/sda4               19197         19458     2097152      f      W95 Ext'd (LBA)
/dev/sda5               19197         19458     2096128     dd     Unknown

I don't know how to post output of Gparted - cannot save somehow. Was output from fdisk helpful?

23

Re: resize vista partition

Gparted also shows this partition like 'unallocated'

24

Re: resize vista partition

Okay ! the problem is easy to see. Someone reported the same, but I can't remember when and where.
Like you see your hard drive is 19457 cylinders ; but the last partition go up to 19458.
this is bad.
are you able to delete sda5 ? and then  sda4 ?

Larry
GParted-project Admin
Former GParted-LiveCD maintainer (2007)

25

Re: resize vista partition

Should I do it using 'fdisk' or gparted?