Sunday, March 01, 2009

Partition and Disk Management: Part II – Free and Useful Tools

In my previous post Partition and Disk Management: Part I – Dancing with Diskpart, I mentioned that I prefer to use Microsoft’s DiskPart Command-Line Options as my primary tool.

I do this for a number of reasons,

  • As I use WinPE 2.0 boot disks for primary system maintenance it is always at hand,
  • Our desktop/laptop systems are almost exclusively a single logical partition on a single system drive,
  • It’s fast and flexible for a variety of disk-prepping needs I have, and
  • because it is CLI, I look a lot smarter in front of customers than I really am.

Seriously, like I found out in the last post, sometimes when you get stuck in working with drives, volumes, formatting, and general partitioning, having an alternative tool or two is great in a pinch.

It’s even better when they are all free.

Power Reserves

When DiskPart just can’t deliver, or if I need to go to a backup plan, these are the partitioning tools I reach for first.

GParted (Linux LiveCD) 

From the project page: “GParted is an industrial-strength package for creating, destroying, resizing, moving, checking and copying partitions, and the file systems on them. This is useful for creating space for new operating systems, reorganizing disk usage, copying data residing on hard disks and mirroring one partition with another (disk imaging). See Features, before using it.

I extolled its virtues in a previous GSD post Drive Prep Made Simple: GParted.

It has a very simple purpose, a simple interface, nice GUI support, and is very powerful for most all disk-servicing jobs out there.

Take a look at these helpful how-to’s for more of its features.

Probably coming in at 2nd place for easy Linux partitioning solutions is

PartedMagic (Linux LiveCD),

Parted Magic is a Linux LiveCD/USB/PXE with its elemental purpose being to partition hard drives.

Optimized at approximately 30MB, the Parted Magic OS employs core programs of GParted and Parted to handle partitioning tasks with ease, while featuring other useful programs (e.g. Partition Image, TestDisk, fdisk, sfdisk, dd, ddrescue, etc.) and an excellent set of documentation to benefit the user. An extensive collection of fileystem tools are also included, as Parted Magic supports the following: aufs, ext2, ext3, ext4, fat16, fat32, hfs, hfs+, jfs, linux-swap, ntfs, ocfs2, reiserfs, reiser4, xfs, and zfs.

It’s juiced up with a number of additional applications and utilities that might make this a more convenient package than GParted offers.  Although that is what attracts me most to GParted.

Best of the Rest

Since I never know when and why a partitioning failure may occur, I always like to have additional options in my system administrator’s toolbox.  While I don’t use any of these regularly, they bring a lot of knuckle to a good hard-disk management rumble.

TestDisk – CGSecurity 

TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.  TestDisk can

  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3 Backup SuperBlock
  • Undelete files from FAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, NTFS and ext2/ext3 partitions.

HDAT2/CBL Hard Disk Repair Utility

This is a pretty advanced tool with a ream of bells and whistles.  I keep secretly waiting for a massive HDD failure on a system to occur so I can really put this utility through the paces.  Particularly with Host Protected Areas (HPA’s) and security overlay features of the drives themselves.

HDAT2 is program for test or diagnostics of ATA/ATAPI/SATA, SSD and SCSI/USB devices.

It will not execute in a DOS session under Windows. You should make a DOS boot floppy disk or CD-ROM and boot your system for it and execute this program from that floppy disk or CD-ROM.

HDAT2 program has 2 levels:

  • Drive level testing

    - main function is testing and repair (to regenerate) bad sectors for detected devices
    - you get many information about detected devices

  • File level testing

    - read/find/check items (MBR, boot, directories, etc.) of file system FAT12/16/32
    - check/remove (regenerates) bad sectors records, flags in FAT table

  • fully implemented commands: SET MAX, SET SECURITY, Device Configuration Overlay
  • device access with interrupt 13h, direct via ATA ports, with ASPI drivers
  • detects ATA/ATAPI/SATA devices with on-board and add-on controllers
  • detects USB devices via USB ASPI driver only
  • detects SCSI hard drives via INT13h or ASPI drivers
  • other SCSI devices are detected via ASPI drivers only (must be loaded before);
    with ASPI drivers you will get more information about SCSI devices
  • test and repair device for bad sectors
  • many different test-functions for hard drives
  • resize hard drives which supports SET MAX ADDRESS/EXT
    (supports 28/48-bits LBA addressing modes)
  • drive lock detection via security feature (Security Menu)
  • S.M.A.R.T. functions for ATA/SATA and SCSI drives only
  • information about devices (ATA/ATAPI, INT13h, ASPI)
  • sector viewer for devices (also for USB, ZIP, CD-data discs)
  • to access ATA/SATA CD-ROM drive you don't need any driver or MSCDEX
  • enable/disable some features for direct-access devices
  • Device Configuration Overlay (DCO) feature set
    (you can restore a full capacity or allow/disallow some feature sets of hard drive)

Partition Find and Mount – A neat and sweet GUI tool that allows you to scan drives for lost partitions.  Once you find them, you can them mount them to view/recover the contents.  What is also very cool is that create both binary drive images as well as volume images, and also mount images as a “virtual-drive.” Great options for data-recovery specialists as well as forensics types.

Cute Partition Manager

Partition Manager is an advanced hard disk partition management utility. Using Partition Manager, you can easily add, edit, delete and manage the partitions in your computer. Most of the hard disks have plenty of space and can store plenty of data and easily accommodate more than one operating system. In order to efficiently store large amount of data or install multiple operating systems, you need to partition your hard disk with a partition management utility like Partition Manager.

EASEUS Partition Manager Home Edition.  Latest version now also contains wizards for disk copying and volume/partition copying.  The only “drawback” is that the free version doesn’t seem to support off-line booting and operation of the system hard-drive(s).  Therefore you seem to have to install it on your live Windows system, and perform the disk operation changes.  To some disk-busters, this can be a bit risky.  Be sure you read the manual and understand it, then follow the guide carefully to avoid data loss.

As Partition Magic alternative, EASEUS Partition Master Home Edition is a FREE disk partitioning utility that offers a powerful range of functions such as resizing partitions, formatting partitions, copying partitions, creating new partitions, deleting partitions, hiding partitions, changing drive letters, setting active partitions, and a handful other functions.

Ranish Partition Manager

…is a boot manager and hard disk partitioning tool. It gives users high level of control for running multiple operating systems, such as Linux, FreeDOS, FreeBSD, and Windows 98/2k/XP on a single disk. It could create, format, copy, move, and resize up to 32 primary and extended partitions. It has command line interface similar to gdisk and a simulation mode that works with the large files instead of messing with the real disks.

Partition Logic

Partition Logic is a free hard disk partitioning and data management tool.  It can create, delete, erase, format, defragment, resize, copy, and move partitions and modify their attributes.  It can copy entire hard disks from one to another.

Partition Logic is free software, available under the terms of the GNU General Public License.  It is based on the Visopsys operating system.  It boots from a CD or floppy disk and runs as a standalone system, independent of your regular operating system.

Partition Logic is intended to become a free alternative to such commercial programs as Partition Magic, Drive Image, and Norton Ghost.

Terabyte's BootIt Next Generation (NG) (not free but too good not to be included)

BootIt NG is a partition and multi-boot manager with a powerful and simple-to-use set of tools for partitioning, imaging, and multi-booting your computer. It combines the features of several standalone products costing hundreds of dollars more.

Take a look at the product page and see all the tricks it can handle.  Well worth considering.

Trinity Rescue Kit (Linux LiveCD) because one can never ever have too many specialty Linux boot disks at hand…

Ultimate Boot CD (UBCD) – So many tools and utilities…so few disks to use it on….

Partition Resizer – Hasn’t been updated for quite along time, but might be useful for folks with older and simpler systems who don’t need all the bells and whistles.  I felt compelled to share it anyway.

Roadkil's Boot Builder – Small and tiny application.

Boot builder allows you to create your own custom boot sector from scratch. This utility allows you to recreate or restore boot sectors lost due to virus or other damage to a drive. Boot sectors can be imported/exported to a disk or created from a template. This program supports FAT and NTFS boot sector types.

Dimio's HDHacker – Another classic tiny application dead useful in a pinch.

a stand-alone micro-utility that saves, visualizes, and restores the MBR (from a physical drive), the BootSector (from a logical drive) or any specified sector from any disk (even removable disks).

HDHacker can be used, for example, to save and restore a particular boot manager (such as LILO, for example) before a new Windows setup (which, obviously, overwrites it).

An MBR and BootSector backup can also be useful for simple precautionary purposes too, since sometimes viruses or other OS setup (like Linux) could overwrite and/or alter the MBR/Boot Sectors, making it impossible to start up previous OS and/or access datas stored on the disk. HDHacker can provide "insurance" against all these types of loss.

Be aware, that depending on what volume/partition manipulations you do, you might render an otherwise working system non-bootable.

A common issue is that the boot.ini file is no longer valid as it points the boot loader to a (now) incorrect partition reference.

For additional NTFS and partition homework reading:

--Claus V.


cdman83 said...

GParted rocks! But you have to be aware of one little quirk: it tries to be extra-safe, so it first "simulates" the operation that you want to perform (like moving a partition) and then actually performs it, which doubles the time it takes to perform an operation.

Claus said...

@cdman83 - No I wasn't aware of the dual-run operation. Thank you for passing that tip along.

On most of our "modern" systems, it hasn't taken a terribly long time to run, but I can generally beat it by taking an ImageX image of the partition(s), wiping the partition information and rebuilding "complete" in DiskPart, then putting the captured image back.

For quick and fast drive partitioning and formatting is indeed an awesome tool once one gets familiar with it.

Thanks for taking the time to comment!


--Claus V.

Mahendra said...

Its a wonderful article . When I lost my partition I went for hard rive recovery software named.