Showing posts with label Windows XP. Show all posts
Showing posts with label Windows XP. Show all posts

Saturday, May 21, 2011

Image backup of Windows XP with diskdump - dd

Today I set up a Thinkpad T60 with a clean install of Windows XP SP3. Because there ar no real nice built-in features for backing up the whole disk as an image file in XP, I used the famous dd for that. I took an gparted live cd, but any live linux should do the trick.
First mount the media where the image should be copied to
me@linux:~>mount /dev/sdb1 /mnt
and create a folder where you want to store the image file
me@linux:~>mkdir /mnt/Backup
and now copy the whole disk with dd
me@linux:~>dd if=/dev/sda1 bs=1M | gzip -c > /mnt/Backup/sda1.gz
To save a lot of disk space I piped the dd output through gzip. This stored the image of an 60GB hard disk with 14GB of used space into a 10GB image file. Without zipping one would store the whole 60GB. To restore the backup to the disk you could use
me@linux:~>cat /mnt/Backup/sda1.gz | gzip -d | dd of=/dev/sda bs=1M
Finally just out of precaution I also saved the MBR of the hard disk to a file
me@linux:~>dd if=/dev/sda of=/mnt/Backup/mbr.img bs=512 count=1
In case of emergency I would copy it back with
me@linux:~>dd if=/mnt/Backup/mbr.img of=/dev/sda bs=512 count=1

As always, be very careful if you don't know what you're doing and RTFM. Messing with dd and hard disks can easily kill your weekend.

cheers

Thursday, February 25, 2010

RoboShot - my little backup tool

OK,

I finally made it. I created my first software project on Sourceforge.net. I was very much inspired by Rsnapshot which I use extensively under Linux. You can also use it under Windows with Cygwin but it's not that convenient.

The program is called RoboShot and it's basically a Powershell script for creating automated backup snapshots. Therefor it uses Robocopy, the advanced Microsoft copying tool and hardlinks for saving storage capacity. Under Windows hardlinks ar only supported on NTFS partitions so that at least the partition where you save your backups has to be NTFS. It's a pre-alpha release so expect nothing fancy.
It's intended to be used with automated tasks which you can run daily, weekly, monthly or whatever interval you prefer. Only new files will be copied. Files that didn't change since the last backup are stored with hardlinks which basically means you only store the file once but reference it as often as possible (as long as it is changed).

You can directly download it from here .

Currently it only runs on Windows XP and you have to install the Powershell and Robocopy (at least version 026 - follow the link above) manually (in Windows 7 they are both built-in). The next release will also run under Vista and Windows 7.


The picture shows how to call RoboShot from the Powershell command line. Here the interval is daily. For automation you would put this call into an automated task to run it on a per day basis obviously.

Future plans are to create a GUI for creating the backup jobs and setting up the automated tasks. We'll see.


Cheers

Friday, January 15, 2010

Clean Install with Windows 7 upgrade license - from Windows XP to Windows 7

This one describes the little trick with which I could upgrade from Windows XP to Windows 7 with an upgrade license and nevertheless doing a clean install. I don't need to mention that you can do this only legally if you own a valid Windows XP license (I don't know if this is working for Vista too, but it should).
When getting my hands on a Windows 7 upgrade license a while ago I didn't know how much trouble it would be to upgrade my Windows XP SP3. After purchasing the license I was able to download my Windows 7 upgrade media. I was surprised that this was not a bootable iso-file. Instead I got two box-files and one exe-file, which when started simply extracts the box-files onto my harddisk into a folder named expandedSetup. In this folder I found five folders (boot, efi, sources, support and upgrade) and four files (autorun.inf, bootmgr, bootmgr.exe and setup.exe). Looks like a DVD structure, doesn't it?
Normally the upgrade policy from Microsoft wants people to start the upgrade process by starting the setup.exe out of a running Windows session. But this was inherently impossible because I wanted to upgrade from a 32bit Windows XP to a 64bit Windows 7. The setup.exe simply wouldn't start because it doesn't support the 32bit platform (actually it brought an error message). I read that this issue is now solved by Mircosoft and they now let you download an iso-file. Thank you ba******.
But I had these files on my laptop now. So what did I do? First I made a bootable iso out of the expandedSetup folder. Therefor I needed a valid Vista or Windows 7 bootable media from which I extracted the BootImage. I used the "Windows 7 RC - iso" which I could download legally from the Mircosoft servers last year. If you ask the unholy G. for it you will definitly find a description of how to get you hands onto a working BootImage and how to burn it together with the expandedSetup folder onto a DVD (Didn't I tell you it looks like a DVD?! ;-)).The fun part started when I finally had my bootable Windows 7 media.
The thing is that all Windows 7 install medias are mostly the same and only the product key which you enter during installation holds the information about the license. The trick was that I didn't gave the product key during the installation I just finished it without it. After the installation was finished and I logged in for the first time I had 30 days to activate my Windows 7. When I had logged in I opened the registry editor with typing regedit into the search field of the start menu and pressed ENTER. There I looked for the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OOBE
There I set the entry
MediaBootInstall to 0.
After that I reset the license status of Windows 7. I typed cmd into the search field of the start menu and confirmed with pressing Ctrl+Shift+ENTER and klicked OK on the appearing UAC window.
This just opened me a command prompt with administrative privileges. There I typed
slmgr -rearm
and hit ENTER. After a short while I was asked to restart. After restart and login I hit Windows+Pause buttons and on the bottom of the opening window I could enter my product key and finally activate my copy of Windows 7.
And I was done.
Again. This works and should only be done with legal copies and valid licenses of Windows XP and Windows 7.

cheers

Thursday, May 8, 2008

Remote shutdown of Windows XP

I just needed to do that...and so for you all to know...because the day will come when you need to shutdown XP... ;-)
shutdown /m \\Name-of-PC-to-shutdown /f /s

/m \\Remote-PC --> obviously the option to call the remote computer by name
or IP
/f             --> forces closing of all running applications
/s             --> shutdown of PC
alternative options:
/r --> reboots the PC
/t --> set time limit for shutdown in [s]
for more info just type
shutdown /?
at the command prompt

cheers