Handling Windows 7 partitions?

Please ask questions here if you are not familiar with fsarchiver
Post Reply
feffer777
Posts: 21
Joined: Sun May 23, 2010 5:11 am

Handling Windows 7 partitions?

Post by feffer777 » Thu Mar 17, 2011 5:04 am

I have used fsarchiver nicely on multiboot linux machines, but now need to include some windows 7 machines. Linux is installed on each and they multi-boot. Windows 7 is installed with 2 partitions: a small (100-200 MB) boot/recovery one, and the main system "C" partition. With Ubuntu booted, I want to use fsarchiver to save them to a debian server mounted with CIFS. I have 3 questions.

1. Is it better to save each partition separately, combined or doesn't it matter. I'm thinking about ease of restoring either to the same hdd or to a new one.

2. Does it matter how the target server is formatted? Since Win7 is ntfs is it better to save the .fsa file to an ntfs partition or is an ext4 one OK. I only wonder because the .fsa file is not really a cloned image in the partimage block-level sense.

3. I intend to use SSDs for the OSes in the near future. Any particular issues between fsarchiver and solid state drives? Could I even restore my Win7.fsa made from a spinning hd to a new SSD?

Thx,
feffer777

dg12
Posts: 2
Joined: Sun Jan 16, 2011 8:21 pm

Re: Handling Windows 7 partitions?

Post by dg12 » Tue Mar 22, 2011 2:57 pm

1) Separate partitions vs disk: partitions are smaller and permit much more flexibility, recover-ability during save.
1a) consider the number of times you will be saving vs number of times you will be restoring.
1b1) how many saves will you be retaining?
1b2) at what frequency will you be doing saves?

3) have you carefully reviewed the performance of SSD. I believe that it is a little to soon, from a performance stand point, to start using them for OS volumes.

feffer777
Posts: 21
Joined: Sun May 23, 2010 5:11 am

Re: Handling Windows 7 partitions?

Post by feffer777 » Tue Mar 22, 2011 4:02 pm

thx for the response, dg12 -- very helpful. Following is what I have been doing with linux and plan to do w/win7 unless I learn otherwise.

1. My script runs nightly for data via rsync, but only triggers fsarchive once a week. Three saves are retained, after the forth, the oldest is deleted. I have tested restore satisfactorily, but haven't needed it for a failure yet. I have been saving partitions, on the linux side, so I guess I'll do that with win7 too and probably with the same frequency and number of saves kept.

2. Research since my first post seems to indicate that it's OK to save win7 partitions via .fsa to ext4. Unless, I learn something else, it seems easier to just format my entire storage server as ext4 rather than partition part as ntfs for the win7 saves.

3. I have been researching SSD as well, and agree with you, they are not quite there and prices are too high, however after watching them for a year, curiosity has gotten the best of me and I ordered 2 -- a 128 GB Crucial 300 for win7 and a 64 GB for 2+ linux OSes. So I will be using SSD. I may test restore win7 from my existing saved .fsa but have decided to do a clean install of win7 and bring linux over from my existing install either via fsarchiver (a good test). It should work fine, but if not then via dd.

Any comments about using SSD or anything else I've written here is appreciated.

feffer

tuipveus
Posts: 44
Joined: Thu May 14, 2009 7:02 pm

Re: Handling Windows 7 partitions?

Post by tuipveus » Sun Mar 27, 2011 10:44 am

Hi!

I bet cifs and/or network is causing most of the performance dropdown. To improve the performance save to local disk, usb3 if possible (if motherboard supports). If you want to save to the network, please use something else than cifs. Ftp, nbd or nfs.

Pay also attention to compression-level.

I bet underlying fs does not matter almost at all.

dg12
Posts: 2
Joined: Sun Jan 16, 2011 8:21 pm

Re: Handling Windows 7 partitions?

Post by dg12 » Sun Mar 27, 2011 6:51 pm

tuipveus: not sure what you are refering to "performance dropdown"

feffer777
Posts: 21
Joined: Sun May 23, 2010 5:11 am

Re: Handling Windows 7 partitions?

Post by feffer777 » Tue Mar 29, 2011 4:15 am

I think tuipveus meant to reply to another post, but actually I do use cifs and save the foo.fsa to a SheevaPlug (low wattage) server. I really don't worry about performance since fsarchiver runs as a scripted cron job at 2 AM. In any case, a 3.5GB to 5GB linux OS saves in 5 to 8 minutes -- not bad especially on a low-wattage device!

I did restore my linux OSes to the SSD via fsarchiver and it worked fine. I did not have time to "test" a win7 save & restore. I just did a fresh install on the SSD. When I have more time, I will test it.

thx,
feffer777

feffer777
Posts: 21
Joined: Sun May 23, 2010 5:11 am

Re: Handling Windows 7 partitions?

Post by feffer777 » Thu Apr 07, 2011 11:15 pm

Had a chance to test fsarchiver with win7. Here's my impressions. I saved win7.fsa files for each of the two win7 partitions. This worked w/o errors. I then installed my new SSD drives and did a clean install of win7 to the larger one. I don't use windows much and my original install wasn't much changed, so there was little reason to try to load the new SSD from win7.fsa. Additionally, SSD drives need to be "aligned" to work best and installing win7 does this automatically. I would have had to do this manually with fdisk otherwise. Win7 actually installed rather quickly and with little fuss -- a nice surprise.

Now after updating grub, I had 2 working win7 installs, a new one on the SSD and the old one on the hdd. Both were bootable. I also had 3 linux OSes working, but that's another story.

So now as a test, I wiped the hdd including the original win7 system and tried restoring win7 from win7.fsa. This seemed to work. I manually created 2 ntfs partitions and restored the boot and system parts of win7 on them and set the "boot" flag with gparted. I then updated grub, and was pleased that it saw both win7 systems. Also "both" seemed to boot, but it was an illusion.

Grub indeed saw both "boot" partitions, but each booted into the win7 system on the SSD (the freshly installed one). Looking at grub.cfg, I thought it was a UUID conflict -- the fresh install and fsa install had the same UUIDs. So I used dd to change the fsa ones, and updated grub again. It now showed no UUID conflict, but once again, I could only boot into the win7 system on the SSD.

After much reading and googling, I was left with 3 paths: use EasyBCD or the Windows install/repair disk to "fix" the situation, but exactly how I wasn't sure. The 3rd path involved some registry changes. I'm not experienced on windows, and didn't want to risk killing my bootable system, so I called it a day -- it was just a test after all. In the end, I'm not sure if I could have gotten win7 to boot from the SSD if I had restored it with fsarchiver.

If anyone could explain what I'm missing with win7, it would be appreciated. Also if anyone has successfully used fsarchiver to move a win7 install to a different disk, please explain how you did it. I think this would be helpful to a lot of people.

thx,
feffer

feffer777
Posts: 21
Joined: Sun May 23, 2010 5:11 am

Re: Handling Windows 7 partitions?

Post by feffer777 » Tue May 24, 2011 10:07 pm

Finally had time to get back to this issue, and successfully restored win7 to a new hdd. For others who might be having similar issues, this is what I did.

The original Win7 install was on an SSD. I saved .fsa backups for the boot (/dev/sda1) and system (dev/sda2) partitions. Then used gparted to partition a new hdd, and created similar partitions on it. Next restored the boot and sys .fsa backups to the new drive. I did it one at a time, but I'm sure saving and restoring as a single .fsa would work as well. I got some errors on the restore of the system partition.

Code: Select all

# fsarchiver restfs sys_w7/sys_w7_05-11-2011-00\:44.fsa id=0,dest=/dev/sda2
[errno=5, Input/output error]: oper_restore.c#255,extractar_restore_attr_windows(): winattr:lsetxattr(/Windows/winsxs/amd64_microsoft-windows-ie-ieproxy_31bf3856ad364e35_8.0.7601.17514_none_090f3105d8321f23/ieproxy.dll,system.ntfs_dos_name) failed
[errno=5, Input/output error]: oper_restore.c#255,extractar_restore_attr_windows(): winattr:lsetxattr(/Windows/winsxs/amd64_wvmbushid.inf_31bf3856ad364e35_6.1.7601.17514_none_4edc302bc3072c9f/vmbushid.sys,system.ntfs_dos_name) failed
Statistics for filesystem 0
* files successfully processed:....regfiles=81516, directories=21704, symlinks=50, hardlinks=24436, specials=1
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=2, specials=0
Don't know what these refer to. If anyone else does, please comment.

I made several unsuccessful attempts to boot the restored hdd via an eSata dock. In every case, it booted into the original install on my SSD. I even tried disabling the SSD in BIOS, but no joy. Finally, I opened the case and replaced the SSD with the new drive. Then a windows error screen came up and wanted to do a repair via my install disk. The repair log showed corrections to the partition names, UUID and paths -- part of the BCD store, I believe. After this, Win7 booted fine.

It may be possible to test a restore w/o opening the case and replacing the drive, but I'm not experienced enough with windows to do it. Various windows sites explain how to multiboot Win7 with Vista, XP etc, but most say having 2 copies of Win7 on the same machine is not doable.

In any case, except for the "hard link" errors reported above, I'm happy with using fsarchiver for linux and windows.

Regards,
feffer

NOTE: the "errors" mentioned above resulted from an earlier version of fsarchiver. The newest version, 0.6.12, does NOT show these errors. Also, it is possible to restore Win7 to another hdd and get it to boot by disabling the original Win7 drive in BIOS. After doing this, the "restored" Win7 system will boot.

danboid
Posts: 12
Joined: Sat Oct 03, 2009 2:42 pm

Re: Handling Windows 7 partitions?

Post by danboid » Fri Nov 18, 2011 5:15 pm

Has anyone worked out a reliable way to image a win7 boot partition using Linux yet? This is the problem that I'm having now. It seems you can reliably image one win7 install into another existing win7 install using fsarchiver IF there is an existing win7 boot partition on that machine already and you are only replacing the C: or other partitions. If I image and replace the boot partition and create a new 100MB boot partition on the target machine with cfdisk first, I get an error when trying to boot win7 that I have only been able to fix by booting off the win7 install DVD and running its repair tool.

Maybe I'm creating the boot partition incorrectly? I use cfdisk to create a 100MB, bootable NTFS (hex code 7) partition that is the first primary partition on the drive. Maybe if I use parted to create it with a 1MB offset at the start and a specific partition label or something then that will fix it an enable us to use fsarchiver to image it? Otherwise, maybe I will have to use partimage or ntfsclone or, God forbid, dd to image the boot partition instead of doing that with fsarchiver? I don't really have an prob with that if it means I can avoid having to boot the install DVD to repair the boot partition.

danboid
Posts: 12
Joined: Sat Oct 03, 2009 2:42 pm

Re: Handling Windows 7 partitions?

Post by danboid » Fri Dec 09, 2011 7:23 pm

Today I successfully imaged a Win 7 Pro machine using fsarchiver and I didn't have to use the W7 repair tool either. The sad truth is that I had to use sysprep on the install before creating the image and this seems to be mandatory now with Windows imaging which is sad as its a huge load of extra fuss for no real gain- on top of that the machine has to do a few reboots etc after its been imaged- MS really do like to reboot don't they? ;)

I should note that I installed w7 entirely to one partition so I don't know if this would've worked if I'd sysprep'd a regular w7 install that has the hidden boot partition too?

I have wrote a couple of small but very handy scripts to make imaging Windows machines as quick and easy as possible under Linux that I'm going to be releasing in the next 24hrs. I'll be sure to link them on these forums as soon as they're available.

Post Reply