NWA-PCUG Newsletter Article, September 2012
Parted Magic
By Dick Maybach,
April 2012 issue, BUG Bytes,
Brookdale Computer Users’ Group, NJ
http://www.bcug.com
n2nd (at) charter.net (click to email author)

Although modern operating systems are robust, sometimes they need maintenance, either to repair problems or because we want to make changes. And many times the things we want to do are not possible within the operating system, either because the tools aren't available or because the operations can't take place while the system is live. One solution is to use a live-CD, which is an operating system that boots directly from a CD-ROM or a USB memory stick and doesn't use the hard disk at all. This has the advantage that you can perform any operation you like on the dormant hard disk. The situation is similar to doing an autopsy. Doing the same thing in an operating system that is running from the hard disk is like trying to operate on a patient who is awake. My current favorite maintenance tool is Parted Magic, http://www.partedmagic.com. which is small enough (187 Mbytes) to fit comfortably on a CD-ROM or a USB memory stick. See the Web page for instructions on how to create either.

Parted Magic requires a computer with at least an Intel PII compatible processor and 175MB of RAM, although it will run much faster if there are 400 MB or more. You will have problems if your computer has peripherals that need proprietary drivers, for example, some wireless keyboards and mice. As it boots, you will be asked a couple of questions, but I've found that accepting the defaults works, then you will see the screen below.

A few tools appear as desktop icons, but most are in menus that you can access through the start button in the lower left corner. To its right are icons to mount devices, use the command line, get help, and switch between desktops. At the far right of the menu bar are icons for the network status, sound volume, and clock. The display on the right of the main screen shows the load on the PC, CPU and RAM usage, as well as the programs that are using the most processor and RAM resources. Two of the tools on the desktop are particularly useful: the File Manager and the Partition Editor (GParted). The screenshot below shows the latter in operation.

Here we've selected an NTFS partition, which (among other things) we could resize. GParted can operate on Microsoft, Apple, and Linux partitions. Other partition tools allow you to create a file containing an image of an entire partition or to clone a disk, copy everything on a disk to different one (usually done when you want to replace your hard disk with a larger one). An important tool that few people use is one that securely erases a hard disk. You should always do this before disposing of a PC, since deleting files and even partitions does not really remove the information. A determined person, with a lot a time could recover your passwords and other sensitive data. (See the next paragraph.)

There are many tools to recover deleted files, rescue files from damaged disks, and replace boot loaders and boot records, but only for Linux and Microsoft file systems. Some of these are quite specialized, and it will take some study to determine the best one for each case. Many are called from the command-line, which means further study before you can use them effectively. Since all the documentation is on-line, using Parted Magic requires Internet access. Be careful, especially when trying to correct serious problems; the safe approach here is to clone the disk and perform the surgery on the copy. There is also a virus detector, but it detects only; it can't disinfect files.

An important program is chntpw, which resets Windows passwords. It's not uncommon for people to forget their passwords, which locks them out of their own PCs; I've done this myself. The safe way to use this is to remove the password completely, and then log back into Windows to set a new one. Note that some of the upper-end Windows versions include the ability to encrypt files and folders and resetting their passwords will render these unreadable. If you need only to recover a few files, you needn't reset the password. All of Windows' files are accessible from Parted Magic, unless they've been encrypted; just copy them onto a different medium. (Keep this in mind before you leave your laptop alone.) A similar program, cmospwd, recovers CMOS setup passwords, which can be helpful for dealing with used PCs. By the way, you don't need special tools to reset Linux passwords, which you can do from the command line with standard commands.

Also included are programs to identify, benchmark, and test the hardware, including comprehensive RAM and disk tests. The screenshot below shows the peripheral devices (top) and details on the Host bridge (bottom). You can learn a lot about your PC just by poking about (and, of course, searching the Internet for what the terms mean).

I recently gave my 10- and 11-year-old grandchildren netbooks. The computers came with Windows 7 installed, but I wanted to install Linux, because there are many educational programs for it and because it’s much more resistant to malware. (My 9 year-old grandson, at the advice of one of his friends, installed a free game on his mother's laptop, and it took her a lot of effort to remove the free virus that was included. I'd like him to survive to see 10.) The netbooks had 350-GByte hard disks, so there was plenty of room for both Windows and Linux. It would have easy to replace Windows with Linux, but the genes I inherited from my Scotch grandmother wouldn't let me delete the Windows I had paid for. Since the netbooks have no CD/DVD drive, I installed Parted Magic on a USB memory stick and used GParted to reduce the Windows partition to 100 GBytes, leaving 200 GBytes for Linux; the remaining 50 GBytes is for a recovery partition. After configuring Windows and installing Linux, I made images of both partitions using the command-line program fsarchiver. (There are several partition imaging tools available, but this one was the best for my use, because it could handle both NTFS and Linux file systems.)

For another example, a friend's son, by downloading pirated songs, infected his folks' PC to the extent that it wouldn't boot. Booting Parted Magic and using the ClamAV anti-virus tool I identified the infected song files, but Windows was hopelessly corrupted. I was able to move all the user data onto an external disk, so after the PC was restored to its as-delivered state, I could restore the data (minus the infected songs), thus converting a disaster into a nuisance.

If you're reading this, you probably serve as the computer support person for your friends and family. Parted Magic provides many tools to help you do this, but it's up to you to learn how to use them.

Click here to return to top



==================================================================