|
Move /dev/hda2 to end of disk and grow /dev/hda1
My root partition is on /dev/hda1 and my swap partition is on /dev/hda2.
I want to write a script that will move the swap partition to the end of the disk (or delete it and recreate it at the end of the disk) and then resize the root partition to fill the entire space in between. Script should not require any user input. Disk can be any size from 2GB to 40GB. Script will be executed while booted from SystemRescueCD.
How can I do this? I assume parted could be used in the resize step. Any help would be much appreciated. Thanks.
|