Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Apr 2014, 11:17
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to Backup, Restore and Clone a Windows Partition
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 8551
Location: Stratford, Ontario

PostPosted: Sat 03 Apr 2010, 18:16    Post subject:  How to Backup, Restore and Clone a Windows Partition  

See the updated Gnost system here.
Last edited by rcrsn51 on Fri 20 Apr 2012, 11:12; edited 4 times in total
Back to top
View user's profile Send private message 
N3ON.SAMURAI

Joined: 27 Feb 2011
Posts: 9

PostPosted: Mon 28 Feb 2011, 22:26    Post subject: Brilliant  

This was shown to me the other day when i was looking for a cloning solution on puppy and just wanted to say thanks. It is a nice piece of work. i have just restored 2 different win7 images to disks at the same time from 2 different image files. worked nicely. both booted happily afterwards without issue.
Back to top
View user's profile Send private message 
Fishak

Joined: 01 Mar 2011
Posts: 12

PostPosted: Tue 01 Mar 2011, 13:08    Post subject:  

Thanks for this tutorial, but I'm having a little trouble.

I created an image file as you outlined, but I was unable to restore it.

First, I formated the original partition with Gparted to a blank NTFS state.

Then, with your downloaded files inside the folder containing the target image file, I selected r (restore) from the rxvt console.

rxvt continues with "NTFS Partition:", and I entered sda2 (the partition I wish to restore to)

"Image Filename:" is displayed, and I entered <the name of my image file>

"Are you sure" = y

Next, the rxvt console asks "Are you transferring the image to a different drive?" Since I'm moving the image from an external drive, back to the original- but reformatted location, I selected y. The restored partition was missing boot files and wouldn't boot.

I again tried- selecting "n" for "... to a different drive?" Still no boot.

I performed a Repair install with the W7 disk, and on reboot the system had to perform a check disk. On the second boot, windows loaded, and all seams fine, but my custome icons (for drives and such) were missing. I tried resetting them by resetting the IconCache.db, but that was unsuccessful. I had to use an image I had created with Macrium Reflect to properly recover.

Your tutorial says "you must prepare the new drive by making an NTFS partition and setting the boot flag."

What do you mean by "setting the boot flag"? Since I don't know what this is, I'm assuming it is at least part of my trouble.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8551
Location: Stratford, Ontario

PostPosted: Tue 01 Mar 2011, 13:43    Post subject:  

You were restoring to the SAME drive from which the image was created. If you state that you want to restore to a DIFFERENT drive, gnost will make changes to the MBR. In the case of Win7, that may well make the drive unbootable.

The simpler test would be to make a backup, then immediately do a restore without running Gparted.
Back to top
View user's profile Send private message 
Fishak

Joined: 01 Mar 2011
Posts: 12

PostPosted: Tue 01 Mar 2011, 15:06    Post subject:  

Ok, I will try this again. I have just finished recovering the partition, and aligning all the partitions on the machine. For some reason, after I got the system running again, I found all my partitions were out of alignment. I didn't check them before starting, so it's possible they were already messed up, but I will know for sure this time.

For the second restore attempt above, I formatted, then chose to recover to the same drive, and the bootloader was still inop. My W7 install is all on one partition, because I didn't allow the install to make that 100Mb hidden system volume.

This time I will attempt to restore without formatting the partition, but this isn't a real world test, because if malware had corrupted the drive, or the original drive had failed, I would be placing the image on a freshly formatted partition, or securely erased, and reformatted partition.
Back to top
View user's profile Send private message 
Fishak

Joined: 01 Mar 2011
Posts: 12

PostPosted: Tue 01 Mar 2011, 16:43    Post subject:  

Alright, this time I didn't format the partition. Something still didn't copy right, because I get just a black screen during the Windows start-up section. The normal graphics appear only 1/2 second before the login page comes up- (where users enter their passwords). Everything else looks normal, but it bothers me that something isn't right with the start-up screen.

Alignment was retained on the system partition.

So what do I need to do to copy the image to a formatted partition? Apparently, when you tell it to install back to the same partition, the bootloader isn't touched, but when the bootloader is missing it can't replace it with the original?
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8551
Location: Stratford, Ontario

PostPosted: Tue 01 Mar 2011, 17:07    Post subject:  

In any Windows PC, the boot process involves two things - the boot code in the Master Boot Record at the root of the drive, and the boot sector at the start of the Windows partition.

Gnost does not back up the MBR, nor touch it if you restore to the same partition. Also, it does not alter the drive's partition structure in any way. It only backs up the content of the NTFS partition. So, in theory, the restored image should work exactly the same as the original. However, Windows is notorious for hiding stuff on a drive that might not be handled by Gnost.

After a restore, Gnost also does some basic disk integrity checks and schedules a Windows disk scan. It may be that your Win7 is reacting to those procedures.

I believe that if you wanted to blank your Win7 partition by reformatting it, Gnost would still restore it correctly, as long as the partition still had its boot flag (you will see it listed in Gparted) and the partition did not move or change size.

However, restoring to a physically different drive or partition is a whole different ball game. The data will be restored, but getting the Windows image to boot in a different location can be difficult. Gnost uses a few tricks that work in XP, but I don't know what happens with Win7.

What I would do is tell Gnost that I am restoring to the SAME location, then use the Windows repair functions to make it bootable.

Do you know for sure that Macrium can restore to a different drive?
Back to top
View user's profile Send private message 
N3ON.SAMURAI

Joined: 27 Feb 2011
Posts: 9

PostPosted: Tue 01 Mar 2011, 22:49    Post subject:  

To set the boot flag, after setting up your partitions and applying changes in gparted, right click on the partition that will host the windows system, then click on manage flags, and tick the boot box. after that close gparted and then image using gnost.
Back to top
View user's profile Send private message 
Fishak

Joined: 01 Mar 2011
Posts: 12

PostPosted: Wed 02 Mar 2011, 03:24    Post subject:  

Thank you, I am going to try this again, both with the image I made last night, and with a new image, to try and determine if this incorrect restore was a fluke. However, I would like some clarification.

rcrsn51 wrote:
Gnost does not back up the MBR...


Is the MBR generic enough that it should be recovered with the W7 Repair install? I use TrueCrypt on one machine, and plan to use it on another to encrypt the system partition. TC makes changes so that it loads before Windows, then it creates a recovery CD, and I'm assuming that CD would replace the MBR. I'm not currently using it on this machine, but does it sound like using TC, and using the TC rescue CD after Gnost recovery, would fix the MBR back to original?

rcrsn51 wrote:
Windows is notorious for hiding stuff on a drive that might not be handled by Gnost..


During the install, I forced W7 to stay inside the lines. I only back up and recover that single partition with Reflect, so I know all of Windows is contained within only it.

Yes, Reflect can recover to a different drive. During the restore process it asks if the new partition should be Active, Primary, or Logical. If the new partition is larger than the original, it asks the user how much of the new partition should be used. (the partition can be shrunk to the size of the original partition) The MBR section has radio buttons for "Do not replace", "Replace with the MBR from backup", and "Replace with the standard XP MBR". It also retains alignment if the original partition was aligned when backed up. MR is really a great program, and the only problem I have is that some machines don't have access to USB drives with the recovery CD, I haven't figured out how to mount a TrueCrypt volume and read an image file during recovery.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8551
Location: Stratford, Ontario

PostPosted: Wed 02 Mar 2011, 13:29    Post subject:  

You can manually backup an MBR with
Code:
dd if=/dev/sda of=mbr.bin bs=512 count=1

Be VERY careful when using the dd command. Bad things can happen if you make a mistake. However, if you are transferring the image to a new drive, there is no point in restoring an old MBR.

You can manually write a new XP MBR onto a drive with
Code:
ms-sys --mbr --write /dev/sda


Clearly, Gnost is not as sophisticated as Reflect, but it works fine for me with XP when doing backup/restores. I have only attempted cloning to a different drive/partition a few times, but it worked then too.

I have no experience with Win7, so I can't comment.

Could you explain what you mean by "alignment"?
Back to top
View user's profile Send private message 
Fishak

Joined: 01 Mar 2011
Posts: 12

PostPosted: Thu 03 Mar 2011, 07:05    Post subject:  

Gnost is a capable application, and if I simply wish to restore to a previous version of my OS because I'm not happy with the way a program installed itself, it works fine. However, if I need to overwrite a partition with zeroes to expunge malware that has infected the MBR, or if I need to swap out the drive, it doesn't work well for me. When restoring W7 to a zeroed out partition, I must use the W7 install disk to re-write the boot files. When I do this, I loose some my customizations. It's not like it's an unworkable solution, but it's quite a bit more legwork. It's easier for me to overwrite the partition and restore with Reflect than to redo my customizations that get messed up. I also don't know if I could teach this method to my wife, in the event I'm unable to perform a recovery.

I don't have any blank CDs handy here, so I can't test weather the TC rescue disk would restore the original boot files.

In a nutshell, alignment refers to arranging the systems storage LUN so it lines up with the OS file system. Modern disks use 4K sectors, while an OS assumes 512b sectors to allow for comparability with older drives. If the storage device isn't offset to match the file system, than when the OS requests information from one cluster (such as a small random read), the storage device must actually read two clusters to return the data. This is exacerbated on a stripped array, a virtual environment, or an SSD, significantly reducing performance.
Back to top
View user's profile Send private message 
shadower_sc

Joined: 21 Apr 2010
Posts: 111
Location: Texas

PostPosted: Tue 08 Mar 2011, 19:24    Post subject: Backup Ext2, Ext3, NTFS
Subject description: PING - Partimage is not ghost
 

Backup Ext2, Ext3, NTFS
I use PING http://ping.windowsdream.com/. It is an awesome free tool.

You can create a Restore Disk that restores your machine to it's original state. Just make sure you don't use that Restore Disk on any other machine, because it will not be useful for making backups. It seems to ignore your I want to back this up request and just restores the Image on the CD/DVD to the Hard Drive. I am sure there are other tools you could use as well, but PING seems to be the simplest for me. Unfortunately it does not support EXT4 at this time.

It probably works fine with FAT32 and DOS as well.

I would love to find a tool that is as simple and powerful as PING that works on Puppy. gnost-tools doesn't seem to fit for me.
Back to top
View user's profile Send private message 
DPUP5520

Joined: 16 Feb 2011
Posts: 798

PostPosted: Wed 09 Mar 2011, 08:56    Post subject:  

@shadower_sc
Partimage is in the PPM so you could effectively use that in Puppy without needing to go and burn PING (Partimage is Not Ghost) to a whole different CD. I've been using this and GParted together on Puppy for a while now and haven't had any problems at all.
Back to top
View user's profile Send private message 
shadower_sc

Joined: 21 Apr 2010
Posts: 111
Location: Texas

PostPosted: Thu 10 Mar 2011, 19:31    Post subject: Partimage in the PPM? Awesome! :-)  

Cool. Smile I'll have to give that a try. Smile
Back to top
View user's profile Send private message 
Antipodal

Joined: 26 Mar 2009
Posts: 124
Location: The other side of the world

PostPosted: Wed 28 Sep 2011, 23:35    Post subject: Re: How to Backup, Restore and Clone a Windows Partition
Subject description: Studying this thread.
 

On the first post of this thread
rcrsn51 wrote:
For the home user who just wants to back up Windows to an external USB drive, all the necessary tools are available through Puppy.

Do you think this statement includes Puppy 4.1.1 on a live CD?

_________________
Slacko 533 Live CD_P4 3Ghz_ASUS P5G41T-M LX3_2G RAM_DVD Write
No internal HDD
Never saved files related to Puppy's configuration
I sometimes save personal stuff on small flash stick or access via USB data on old big internal NTFS formated SATA HDD
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0790s ][ Queries: 12 (0.0042s) ][ GZIP on ]