Linux

  1. Home
  2. Computing & Technology
  3. Linux

Linux Filesystems How-To

From Authors, for About.com

2.1 PC Partitions

GNU parted

GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the filesystems on them.

This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks, and "disk imaging" - replicating installations over many computers.

Parted has support for these operations:


Filesystem detect create resize copy check
ext2 * * *1 *2 *3
fat * * *4 *4 *
linux-swap * * * * *

NOTES:

(1) The start of the partition must stay fixed for ext2.

(2) The partition you copy to must be bigger (or exactly the same size) as the partition you copy from.

(3) Limited checking is done when the filesystem is opened. This is the only checking at the moment. All commands (including resize) will gracefully fail, leaving the filesystem in tact, if there are any errors in the file system (and the vast majority of errors in general).

(4) The size of the new partition, after resizing or copying, is restricted by the cluster size for fat (mainly affects FAT16). This is worse than you think, because you don't get to choose your cluster size (it's a bug in Windows, but you want compatibility, right?).

So, in practise, you can always shrink your partition (because Parted can shrink the cluster size), but you may not be able to grow the partition to the size you want. If you don't have any problems with using FAT32, you will always be able to grow the partition to the size you want.

Summary: you can always shrink your partition. If you can't use FAT32 for some reason, you may not be able to grow your partition.

Repairing corrupted partition table

Fixdisktable

This is a utility that handles ext2, FAT, NTFS, ufs, BSD disklabels (but not yet old Linux swap partitions) ; it actually will rewrite the partition table, if you give it permission.

gpart

  • Homepage: http://home.pages.de/~michab/gpart/
  • Download: ?
  • Author: ?
  • Access: ?
  • License: ?
GPART is a utility that handles ext2, FAT, Linux swap, HPFS, NTFS, FreeBSD and Solaris/x86 disklabels, minix, reiser fs; it prints a proposed contents for the primary partition table, and is well-documented.

rescuept

  • Homepage: util-linux ?
  • Download: ?
  • Author: ?
  • Access: ?
  • License: ?
Recognizes ext2 superblocks, FAT partitions, swap partitions, and extended partition tables; it may also recognize BSD disklabels and Unixware 7 partitions. It prints out information that can be used with fdisk or sfdisk to reconstruct the partition table. It is in the non-installed part of the util-linux distribution.

findsuper

  • Homepage: e2progs

* License

* Linux Filesystem How-To Index

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux HowTos
  5. Linux Filesystems How-To
  6. Linux Filesystems How-To - 2.1 PC Partitions

©2009 About.com, a part of The New York Times Company.

All rights reserved.