To partition your hard disk again, you will need a live cd and boot on it.
You can use two methods
- Use gparted: gparted is a gnome tool that allow to resize partitions. I have tried this version on the Feisty Fawn live cd but there are some bugs: partition are automatically mounted and it is impossible to partition a disk while its partitions are mounted. To umount them, you need to start the terminal and run the command:
df
You will see that a partition is mounted like /mnt/disk or /mnt/disk-?, you will need to unmount it: to do this:
umount /mnt/disk
After that you will be able to modify your partitions - Use command-line: To do this, you have some useful commands:
- resize2fs can resize an ext2 filesystem, if you do not set the size, it will fill the partition to the available space. If you set a size it will reallocate the filesystem to the size specified.
- fdisk creates, removes or resize partitions.
To change your partitions, you will need to- resize your filesystem with resize2fs
- resize your partition with fdisk and create new partitions.
- resize your original filesystem to fill the available partition with resize2fs
How to partition?
A disk contains 4 partitions that can be of type primary or of type extended.
- A primary partition is a partition that contains a filesystem
- An extended partition is a partition that contains other partitions, that allows to have more than 4 partitions
- create at least one extended partition
- define its size
- create logical partitions that will be in this new extended partition.