I've got an interesting problem. Is it possible to resize an extended partition such that it is the only partition on a drive? Here's my current layout:
Code:
Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 64 514048+ 83 Linux
/dev/hda2 65 6438 51199155 83 Linux
/dev/hda3 6439 8988 20482875 83 Linux
/dev/hda4 8989 30401 171999922+ 5 Extended
/dev/hda5 8989 9434 3582463+ 83 Linux
/dev/hda6 9435 9561 1020096 82 Linux swap / Solaris
/dev/hda7 9562 30401 167397268+ 83 Linux
Disk /dev/hdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 7169 57584961 83 Linux
/dev/hdb2 7170 7297 1028160 82 Linux swap / Solaris
/dev/hdb is an old disk that I'm recycling, and it is not currently mounted. What I'd like to do is take /dev/hda7 and expand it across all of /dev/hda. The other partitions in place on /dev/hda would be resized and placed on /dev/hdb. I've seen several documents showing how to expand an extended partition within the /dev/hda4 group, but nothing about making one a standard partition covering the whole disk. What I think might be possible is to shrink/delete /dev/hda[1-3], grow /dev/hda4 to encompass as much space as possible, delete /dev/hda[5,6], and grow /dev/hda7 to take all of the space allocated under /dev/hda4.
Is this possible, or am I insane? The goal of this is to preserve the data currently present on /dev/hda7 while giving it more room. Of course, I couldn't do something logical like have this running on LVM, so I'm stuck using standard partitioning tools. I have a LiveCD of GParted available, so dealing with mounted filesystems is not an issue.
Thanks!