Linux Tools to Repartition a Hard Disk

GNU parted

GNU parted allows you to create, destroy, resize and copy partitions. It currently supports ext2 and fat (fat16 and fat32) filesystems, Linux swap partitions, and MS-DOS disklabels, as well as Macintosh and PC98.

ext2resize

ext2resize is a program capable of resizing (shrinking and growing) ext2 filesystems. Checks whether the new size the user gave is feasible (i.e. whether the fs isn't too occupied to shrink it), connected to the parted project.

fixdisktable

Something was recently published on the <linux-kernel@vger.rutgers.edu> mailing list about a partition recovery program. I have not used this, nor examined it, nor read much about it (except for the HTML page.) It may be useful to some of you if you have problems with FIPS, Ranish Partition Manager/Utility or Partition Magic destroying your partition information. You can find information on this partition-fixer named "fixdisktable" at his pages . It is quite a ways down in that page. Or look for it via ftp and locate the latest "fixdisktable" in that ftp directory. (Source and binary dist should be available.)

Caveats

Before repartitioning your harddisk take care about the disk layout. Especially look for hidden disk space or certain partitions used for suspend to disk or hibernation mode. Some laptops come with a partition which contains some BIOS programs (e.g. COMPAQ Armada 1592DT). Search the manual carefully for tools like PHDISK.EXE, Suspend to Disk, Diagnostic TOOLS.

Patrick D. Ashmore has recently released a Linux utility to prepare hibernation partitions for use with laptops and notebooks using Phoenix NoteBIOS. This utility isn't needed to utilize the APM "Suspend-To-Disk" feature ... if you already have a valid hibernation partition, you should be able to use it from any operating system that can handle APM suspends.

However, if one ever upgrades hard drive, memory, or repartitions their hard drive, they discover that they either have to do without the suspend-to-disk feature or boot to DOS and use the PHDISK.EXE program provided with their laptop or directly from Phoenix Technologies.

Now, Linux users are free from this restriction. lphdisk is a Linux utility that properly prepares these partitions for use. Not only does this eliminate having to boot to DOS, but my utility does not exhibit some of the nastier bugs that its DOS counterpart has.

Please see chapter DOS Tools to Repartition a Hard Disk, too.

By Nathan Myers from LL - LinuxLaptops: "I partitioned a 10G Thinkpad drive last week and then none of fdisk, cfdisk, or sfdisk would read the partition table any more. It turns out I had created a partition that started on cylinder 1024, and there's a bug common to all three programs that makes them fail in that case. (I didn't try Disk Druid.) So, maybe you should add some advice about not starting partitions on that cylinder."

Multi Boot

Please see the Different Environments chapter, for information about booting different operating systems from the same harddisk.