Previous: Compiling, Up: Introduction


1.6 Using static binaries of GNU Parted

1.6.1 Introduction

If you want to run GNU Parted on a machine without GNU/Linux installed, or you want to resize a root or boot partition, you will need to use a boot disk.

Special boot disk images for GNU Parted used to be available, but with the emergence of a plethora of rescue disks and Live CDs that all include GNU Parted this is no longer necessary. However, please note that these disks often ship with out-of-date versions of Parted. To compensate for this a static binary of the latest GNU Parted version is available, which you can use thus:

1.6.2 Creating the Parted disk

  1. Boot your system
  2. Download parted-static-VERSION.tgz from ftp://ftp.gnu.org/parted/static
  3. Unpack the tarball, resulting in a file called “parted.static".
  4. Insert a floppy.
  5. Do a low-level format on it (on GNU/Linux this can be achieved with the tool “fdformat" from the “util-linux" package. This is basically a sanity check because floppy disks often contain bad blocks.
  6. Create a file system. Example:
              $ parted /dev/fd0 mklabel loop mkpartfs primary ext2 0 1.4
         
  7. Mount the floppy disk, e.g.,
              $ mount -t ext2 /dev/fd0 /mnt/floppy
         
  8. Copy parted.static to the floppy, e.g.,
              $ cp parted.static /mnt/floppy
         
  9. Unmount the floppy, e.g.,
              $ umount /mnt/floppy
         

1.6.3 Using the Parted disk

  1. Choose a rescue disk that suits you.
  2. Boot off your rescue disk. Mount the disk you copied Parted onto.
  3. Run Parted. For example,
              # cd /mnt/floppy
              # ./parted-static