Sunday, November 16, 2008

Non destructive partition resizing / Drive Imaging

I have a need about once a month to resize a hard drive partition without loosing data. I've been using a bootable Partition Magic disk for years but it is not a free application and I am a huge freetard, so I went looking for alternatives.

The First step is to always backup your existing data before doing anything with your disks partitions. I recommend DriveImageXML for standard Windows partitions, it will create an exact image of the partition to a local drive or over the network. One of the nice features is the ability to browse the image file and extract files that you need, this is brilliant were you have an infected system that you are going to wipe and re-install. Create an image and store it, wipe the system and re-install, then pull out the docs, images etc that you require, while leaving anything nasty in the archive.

This is also available on the Ultimate Boot CD for Windows, a must have for anyone who works on windows based PC's, giving you a wealth of diagnostic and repair tools that run off of a bootable CD running a BartPE shell so you have access to your network too.

For Linux and Mac users there is Clonezilla which also features unicasting and multicasting for huge network clone jobs, of course it supports NTFS and FAT as well and has many boot options.

EASEUS Partition Manager (Home Edition)
This bills itself as a direct Partition Magic replacement and I have to say the user interface is damn near identical, which is great because I always found PM's to be the best. It is an installable application that runs from within windows only.
You make changes and they are added to the change queue before you commit to them so you can play around and change your mind before taking the plunge. Anything major will require a reboot and the EPM wizard will run before the OS and make the required changes. The web site also lists it as being able to work with hardware raid which is something my old copy of PM could not. The 32bit version is free for home users, while the x64 is a pro feature that you need to pay for.

GParted
The GNOME Partition Editor has been around for a long time as part of the Gnome desktop project and has come a long way. It supports a huge range of partition types. It has its own live cd distribution so its a quick boot and your away. Again this is very similar to the PM interface so use is nice and easy.

Visopsys Partition Logic
This is a bootable CD that uses the Visopsys OS. There are some limitations :
  • Does not work with some SATA hard disks
  • No hardware support for non-USB SCSI hard disks
  • Supports only DOS/Windows-style MBR partition tables (used on nearly all IBM PC-compatibles). No support for Sun or BSD disk labels, or EFI/GPT tables used on Itanium and Intel Mac platforms.
  • Cannot format partitions as NTFS or EXT3. Can format as FAT (12/16/32), EXT2, and Linux swap.
  • Cannot resize FAT or EXT filesystems. Can resize NTFS (Windows XP) and Linux swap.
In general it works with no problems, if it cant do something it wont even try, so you wont accidentally break your OS. It works with Vista as well, but again with some caveats :

Partition Logic (version 0.66 and later) can be used with Windows Vista. However, you should not move your system partition using Partition Logic, and in some cases you will need your Vista installation CD/DVD to update the boot configuration before Windows will start. Vista uses a new boot process that is sensitive to changes in the boot sector and partition layout:

  • Vista NTFS partitions (including the system partition) can be resized without any problems. Resizing will automatically schedule disk checking for the next boot -- this is normal.
  • The Vista system partition should not be moved using Partition Logic at the present time. More information will be posted as it becomes available.
  • The Partition Logic "Write basic MBR" operation and "MBR boot menu" can be used, however Vista will report that it cannot boot, and needs the installation media for repair. Follow the instructions and allow it to 'repair' itself. The repair only takes a moment.
It is a project under active development so these things will be ironed out.

For Mac OsX you can use the diskutil resizeVolume command as detailed here

0 comments: