1 (edited by matthew_exon 2007-05-05 22:19:24)

Topic: How do I change partition numbers?

Hi,

Right now my disk looks like this:

Number  Start   End    Size    Type      File system  Flags
1      32.3kB  149GB  149GB   primary   ext3         boot
2      159GB   160GB  1184MB  extended
5      159GB   160GB  1184MB  logical   linux-swap

I want to renumber the extended partition number 2 so that it becomes partition number 3.  Then I want to create a new partition number 2 in the 10GB of space from 149 to 159.

The reason I want to do this is that I want to install Windows 2000 into the space I've created.  But when I try that, the Windows install fails when it tries to format the space, even if I use parted to create a FAT32 filesystem so that it doesn't have to.  I've just realised that the reason must be that it can't cope with a "funny" partition ordering.

Does anyone know how to do this?

Thanks,
Mat

2

Re: How do I change partition numbers?

I posted the above too soon.  As soon as I read what I had written, I realised that it's just a swap partition, so I could easily delete it and recreate it.  In fact, I could just delete it, let Windows have its wicked way with the space, and clean things up afterwards.

But when I tried that just now, Windows still failed when trying to format the space.  I have no idea why, and Windows isn't telling.

So it looks like Windows just isn't going onto this disk, not no way.  Probably what I really need is the ability to move a partition where the source and destination overlap, so I can make the Windows partition be the first one on the disk.  But of course parted doesn't support that, so that's not going to happen.  For now, it looks like I'm giving up.

I'd still be interested in knowing how to renumber the partitions though, because sometimes excessive use of parted can leave things in a very weird state, and it'd be nice to know how to get things back to sanity.

3 (edited by matthew_exon 2007-05-19 20:47:42)

Re: How do I change partition numbers?

And just to follow up even more on a topic that obviously no-one cares about, a good way to renumber the partitions is using the Ranish partition manager, which is available on the ultimate boot cd.  A very nice interface for that sort of thing.

Ranish partition manager: http://www.ranish.com/part/
Ultimate Boot CD: http://www.ultimatebootcd.com/

4

Re: How do I change partition numbers?

That numbering has no purpouse.. You just had to create a new partition (NTFS maybe) in the empty space (from 149 to 159 from what i see) using gparted for example

5

Re: How do I change partition numbers?

matthew_exon wrote:

I'd still be interested in knowing how to renumber the partitions though, because sometimes excessive use of parted can leave things in a very weird state, and it'd be nice to know how to get things back to sanity.

Which file system ?
e.g. : you wanna change sda1 with sda4 ?

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

6

Re: How do I change partition numbers?

Numbers 1-2 are reserved for the 4 principal partitions or 3 principal partitions and 1 extended partition. Numbers 5 and above are for logical drives within the extended partition. If you delete one partition, the remaining partitions are automatically renumbered.

If you want to change numbers for specific partitions, you can move them, or make new partitions and delete the old ones. This can be sometimes very very slow (with high risk in the case of power failure), so do it only if it is absolutely necessary.

*** It is highly recommended to backup any important files before doing resize/move operations. ***