Monday, December 26, 2011

Vista Home Premium Backup, or the backup that almost wasn't

I recently decided to upgrade my machine's hard drive because its running super slow, and it looks like it might be yearning to fail. Not wanting to take a chance, I decided to start backing up data using Windows Backup, in the hopes of simplifying my life. I'm doing this even though I regularly backup the user data using Backuppc (+ rsyncd), which has been working so far (only tested the backup part, not the restore. perhaps that'll be another adventure).

here's what i have so far:

I'm replacing a 2.5" SATA IDE 200GB Hitachi 5400 rpm drive with a 2.5" SATAII IDE 120GB Intel SSD 320. the drive is smaller, but the original had multiple partitions, and the main windows partition was around 120GB. So the plan is to backup up only the windows partition to this one (good-bye linux on the laptop... i've been primarily using my desktop for linux development pretty much anyways, and the laptop linux is rotting at Ubuntu 8.04, with not much data there, so ya).

Have to give kudos to Amazon for fast shipping and a fairly decent price on the Intel Drive. The drive itself so far seems super fast (windows rated it at 5.9, which currently is the highest rating it provides). However, the overall system base score is limited by the integrated graphics card, so while i don't see the reported base-score I definitely see a boost in disk performance. I'm hoping it translates to some power savings as well and longevity since i don't much have to worry about shocks destroying platters (and other physical issues).

Getting back on to the main track, getting the drive was the easy part. What I seemed to be lacking was any way of quickly transferring my existing / working installation to this drive so that I wouldn't have to fiddle with all settings and stuff. Alas, that didn't seem all that easy thanks to Windows Vista Home Premium.

This product has a Backup and Restore program that only backs up data (no programs, no settings etc.). There are several paid programs out there, but most seemed to have harsh invectives and umpteen frustrations directed at them. Anyhoo, I decided to backup my data before something else goes wrong anyway.

Windows Vista Backup and Restore has a bug that prevents it from backing the files up on a network location. Though it promises to support network based backups, it fails each time backup is started with the following error:

I found the following advise that promised to work:

Ok just read your forms. I have got a bit further than you guys but not fully solved.

When set up the network drive through Vista backup and it asks your for your username and password, I figured out this works:

Username: Everyone
Password: admin

Hope this helps
beauty in the air
  • Proposed As Answer byphreakingcrowTuesday, December 08, 2009 5:28 PM

I created a new scratch path with "public" access (this is a temporary thing since it is a security concern!) in my smb.conf.master file

[m-e-scratch]
path = /mnt/media-e/scratch
available = yes
# valid users = alpha beta
read only = no
browsable = yes
public = yes
writeable = yes
security = share

created the true smb.conf using

root@smbhost> testparm -s smb.conf.master >smb.conf
root@smbhost> restart smbd

Restarted Backup and Restore and set user name to "Everyone" and password "admin" as advised above, and so far, it seems to be working.

Update: backup failed several times backing up to this shared location. I gave up after 4 attempts.

So I'm now going to try and clone my Windows Vista partition using Linux.

Here's what I've managed to do so far:

1. remove all absolutely essential stuff off the main windows partition. This included my temp directory where I typically like to store installers for any programs I download. I do this so that each time I have to reinstall / re-image something, I have the exact version of stuff I've been using / testing. I copied over these files manually to my networked scratch space.
2. Removed any large files that Windows creates using the built in disk clean up. I cleaned up almost 20GiB of queued up crash reports and shadow copies.
3. Removed prior restore points (this was little tricky to convince myself to do)
4. Disabled hibernation. Reboot, and delete hiberfile.sys. Freed up about 3GiB
5. Disabled page file usage. Restarted machine and deleted pagefile.sys. Freed up about 3 GiB.
6. Next, I defragmented my drive using the built in Windows Defragmenter. To start this, right click on the C:\ select Properties. In the basic properties tab, click on Tools
7. I tried to shrink my partition using the built in Windows Vista partition shrinker. However, here I ran into an issue since it wouldn't let me reduce the size. Apparently, other folks have faced this issue as well. No worries. Linux to the rescue.
8. Downloaded Ubuntu 11.10 LiveCD
9. Tried to use wodim to burn the iso, but failed (not sure why?)
10. Booted into Ubuntu 8.04 and used Brasero to burn the disk
11. Reboot machine, go into bios to change boot order with DVD as primary, Insert Ubuntu live CD and continue boot
12. Used Ubuntu's G-Parted to reduce the size of the drive (WOW! Ubuntu 11.10 looks freaking awesome! I'll consider upgrading my workstation to this as well. "Consider" being the keyword since I have way too many tools on it. Maybe will do with the laptop once i'm done getting windows up and running. Perhaps will use G-Parted again to monkey with the partitions!). For G-Parted, I took care to shrink the Windows Partition (on my old hard-disk) to under the size of the SSD. Since the SSD was about 120GiB, I set the Windows partition to be smaller, around 95 GiB. I ensured that G-Parted rounded to MiB, and not to cylinder (since this would have caused it to re-write a lot of the data).
13. About 30 mins later, G-parted was done. I removed the Ubuntu CD and rebooted into windows.
14. Let windows check-disk continue undisturbed. It found several empty links etc. that it took care of and finally, I got into Vista desktop. Yay! (so far).
15. Shutdown machine and rebooted twice, to see it works ok.
16. Reformat SSD drive (currently in Kingwin SSD Sata2 to USB 2.0 enclosure from Fry's).
17. Boot using Ubuntu live CD
18. clone partition using dd

dd if=/dev/sda2 of=/dev/sdb2

And here is where the fun (or rather pain) started. After several hours, dd was done, and when i replaced the drive back, I got the following ominous message:

"Operating system not found"

Crap. What went wrong? I figured that the drive I was copying to was smaller than the source drive, so that must be the issue. Simple enough fix:

1. Use the Toshiba recovery DVDs to restore back to factory condition
2. copy over only the windows partition once the restore was done.

Before I did this, I Live booted Ubuntu and checked the hard-drive. I was surprised to see all the files there. sudo fdisk -l also showed the partitions. I was scratching my head. Anyway, I started the Toshiba recovery (which meant I lost all the time I'd spent copying and all the data I had already copied over).

Things seemed to be going fine till I saw the ominous error just as the second DVD was getting done. "Recovery check sum failed.

ERROR 10-FC12-0570

So I started searching the net for what could be causing this. Several websites came up indicating that the memory had failed, or the hard disk, or the recovery DVDs and the like. In between, I tried several times and each time it would fail.

http://forums.toshiba.com/t5/System-Recovery-and-Recovery/ERROR-10-FC12-0570/td-p/209662

A few times I saw the error

ERROR 10-FC12-0241

and then I also saw a blue screen with MEMORY_FAIL (or something like that).

So I made DVD copies, and I watched the process closely. Didn't see any complaints about scratched disks or copy failed etc. So I figured there must be something wrong with the drive. I could always see the files stored there, but each time I tried to boot from it, after the BIOS prompt, I would get the "Operating system not found".

So I went ahead and bought a new SATA drive (not SSD, just the regular cylinder drive). 500GB.

Did the same dd magic. Booted with fingers crossed. "Operating system not found"

Crap. Deja vu.

At this point I simply decided to install Windows the new drive. I figured there must be something wrong in dd -ing the raw bytes on the drive, so if I let the thing install cleanly, I'd know what was going on.

Start Toshiba recovery. Disk 2. Error 10-FC12-0214. crap!

So I decided to simply install Ubuntu now. Install Ubuntu. "Installation success. Remove bootable media and press ENTER to reboot." Reboot, fingers crossed. "Operating system not found".


I put back in my old working Vista drive. Reboot: "Operating system not found"

Now I was sure it couldn't be the drive or the installation process. It had to be something in my laptop. So I remove the drive from the laptop, but it in the KINGWIN external USB drive, and reboot.

F2 to enter BIOS, change boot order to include USB, remove DVD, reboot

Welcome to Ubuntu! I had just managed to boot into Ubuntu from the USB drive. This clearly meant that Ubuntu had installed correctly, and the hard-drive was OK, but for some reason the laptop wasn't able to see the drive when it was hooked in.

This was supremely weird because the laptop WAS able to see it: Ubuntu clearly was able to install, as was Windows (I remembered seeing the files). So what else had happened?

My suspicion went to the BIOS: if for some reason the BIOS didn't know there was a hard drive attached, it wouldn't attempt to boot from it.

Reboot, F2

BIOS listed hardrive as "NONE"! VIOLA!

Next, more head scratching on how to get BIOS recognize the drive. Some more net searching led to blurbs about BIOS updates. So went to Toshiba's website and realized there was a BIOS update for v 2.30. Mine was 1.80. Easily done.

Download self extracting executable to Ubuntu.
Unzip to extract .iso,
burn with Brasero
Insert CD in laptop drive
REBOOT
Lots of beeping as the BIOS CD took hold and updated BIOS (I dared not touch any key till it said it was done).
REBOOT
f2 to enter BIOS: version reported as 2.8!
HDD: detected correctly!
remove CD before
REBOOT
Welcome to Ubuntu!

Success!

Shutdown Laptop, insert SSD
Use Toshiba recovery DVD, success!
remove DVD
Reboot into Live UBUNTU
Attach KINGWIN USB containing old laptop Vista drive. Insert BOTH USB dongles to the laptop

dd if=/dev/sdb2 of=/dev/sda2

i.e. I just copied over the Vista partition from the old drive over the Vista partition in the newly recovered SSD.

(20.37MB/s transfer speed! because of more USB power??)

REMOVE Ubuntu DVD, reboot : Windows Error "Insert recovery disk, select startup recovery"

This was expected. Put in Toshiba recovery DVD, reboot, F2 change BIOS to boot from DVD, REBOOT

Select System Recovery Options
Start up recovery
Disk automatically found Vista partition
and rebooted 30 seconds later
Welcome to Vista!

So Weeks worth of consternation because BIOS stopped recognizing hard-drive. How? No idea.
But glad it's working now.

UPDATE: it's been several weeks and the SSD + LAPTOP has been running like a CHAMP! Also downloaded the Intel SSD Drive toolkit that is scheduled to now run on a weekly basis and can issue the TRIM command and keep the hard-drive at optimal efficiency. Great thing about the tool is it allows turn-key disabling of PreFetch and SuperFetch services without any need to muck around in the Control Panel. Highly recommended! Found here http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=18455


No comments: