Thursday, August 25, 2011

Backing up NTFS partitions

The reasons for backing up your NTFS filesystem vary but the task is quite simple (if you don't use NTFS advanced features such as bitlocker or compression). You can do it with "ntfsclone" (part of ntfs-3g package) that runs on many operating systems - it is also included in System Rescue CD mentioned in earlier posts.

It's usage is quite simple: ntfsclone -s -o [output file] [input device]
The "-s" switch enables a "special format" that ignores empty space, so the output file is smaller. Without it the file is bigger (it uses sparse file function so it is not THAT big) but you can mount it as a loopback device and access its contents (you can't do that with the "special format").

You can also use compression but better have a fast processor or enough time:
ntfsclone -s -o - [input device] | pigz > [output file]
pigz is a parallel gzip compressor that uses all your CPU cores for compression and is preferred over gzip. But you can also use bzip2, xz or any other compressor that works with standard input/output.

Next article: how to restore the backed-up NTFS partition.

Tuesday, August 23, 2011

HotSwap!

Have you ever wanted to hot-swap a SATA drive in your PC but you didn't know how to turn it off safely? Or Windows didn't show your USB drive in "safely remove hardware" list?

There is a simple solution for that: HotSwap! http://mt-naka.com/hotswap/index_enu.htm
It is a very small and simple program that runs in tray and allows you to safely turn off your storage devices. Of course it is free and runs on x86 and x64 Windows platforms. It requires no installation (just run it) but you need administrative permissions to shutdown a device.

Thanks, Kazuyuki!


Monday, August 22, 2011

System Rescue CD

The Swiss army knife for PC admins. A live Linux (CD, USB etc.) distribution with lots of utilities. It is useful for deployment, backup, recovery etc. More on how to use it in the upcoming posts.

http://www.sysresccd.org/Main_Page

Sunday, August 21, 2011

Booting Windows XP on different disk controller

So you made a virtual machine from the real one with disk2vhd (see previous blog) and now you try to run it inside VirtualBox (or another virtual PC engine) but all you get is a BSOD during the boot? With the error code 7b? The problem is in the disk controller driver - the old machine had a different one that the new has. The solution is to force Windows to use "default" disk drivers. All it requires is a registry hack that is explained here: http://www.biermann.org/philipp/STOP_0x0000007B/
There is also another option if you can boot (WinPE, Winternals ERD etc.)into doomed Windows XP - replace the aaaa\ with SYSTEM\ in the merge reg file and apply it with double clicking (or import in regedit).

Create virtual PC from real computer (Windows)

There is a nice utility from Microsoft called disk2vhd (http://technet.microsoft.com/en-us/sysinternals/ee656415) that converts disk paritions (or whole disks) to VHD image files. It works for NTFS (Win XP and later) and does not require installation - just download and run. They can be later used inside VirtualBox or other virtual PC engines.