|
GNU Parted is a useful tool for create and manipulate partitions on the harddisk, it can be used as a null-cost tool for resizing partitions eventually present on the harddisk before beginning a Linux installation; this is really important for all the users who get to Linux from the (horrible) windows world and decide to keep (at least for the first times) the old operating system. The steps to follow, to achieve this, requires though a basic knowledge of Linux (or other Unix) and that's why this problem was treated, during the course, in the last hours of the lessons.
I want to present here kind of a mini-HOWTO to explain how to resize a hypothetical windows partition, making room for Linux, using Parted; being the course based on Slackware Linux, I'll suppose to use the setup cdrom for this distribution.
Note #1: There are some tools that allow to resize partitions directly from the windows environment, some of them, like Partition Magick, are sometimes included in some commercial-version distributions (Mandrake for example), but that's commercial software that needs its own licenses and the pourchase from the user. Parted is instead distribuited free of charge and available at the GNU site: http://www.gnu.org/software/parted.
Note #2: Partition resizing is dangerous, data can really get corrupted (light can go out during the operation for example) so it's a good idea to backup important data before starting.
First of all you need to burn this iso image on cdrom:
parted-1.6.5.iso
It contains a statically linked version of Parted (so it can be run from Slackware ramdisk without matter of shared-libs); it obviously links against glibc2 but that comes with Slackware.
Once you have booted from Slackware cdrom and logged in as root, before start fdisk or setup, you can change Slackware cdrom with the one with Parted and mounting it under /cdrom (a # dmesg | more can show you the right device, if you don't know; let's say it's the classical /dev/hdc, a # mount /dev/hdc /mnt/cdrom will mount the device).
In the /mnt/cdrom directory you have now Parted ready to use (# ./parted); you can use "resize" option to resize your partition, other options are available and the use is straightforward reading Parted online documentation.
When resizing is over (it can last minutes or hours depending on the system) you can unmount the /cdrom (# umount /mnt/cdrom), put back Slackware cdrom in the drive and continue with the setup.
|