XP Backup/Restore from Linux failed - Help please!!!
hda is 40GB disc
hda1 = 10GB XP NTFS
hda2 = 1GB spare FAT32
hda3 = 1GB spare FAT32
hda4 = extended partition
hda5 = 5GB ext3 /root
hda6 = 500MB swap
hda7 = 10GB ext3 /home
hdb is 4GB disc
hdb1 = 4GB ext3
Linux is ubuntu and I'm on ubuntu live DVD now.
used dd to copy boot sector to file on hdb1
used ntfsclone to copy hda1 image to hdb1
used dd to wipe boot sector on hda
used dd to rewrite boot sector on hda
used ntfsclone to restore hda1
system starts, goes through POST
grub does not appear to start (?)
invalid boot.ini file
booting from c:\windows\
reboots goes thorugh POST etc, etc.
live DVD will not allow me to mount hdb... not sure why.
Partition tool of ubuntu install shows hda to be blank.
Any ideas on how to restore my system?
I could rebuild it in a couple of days but would like a smarter solution.
ANY suggestions would be appreciated.
Im not sure how helpful this is, but it seems that Windows overwrote the MBR (Invalid boot.ini file... .ini is a Windows file extension).
About the size of the disk appearing to be blank, I think its because of the tool and not the disk. At a terminal, type:
ls /dev | grep hda
Hopefully you will see hda1, hda2, etc. Not that this will help anything, but it should at least remind you that your data is intact.
I'm a newbie and don't know much (if anything), but I do recall reading about setting up boot.ini for a multiple boot system. If you want to run Linux in multi-boot, the advice was to keep W OS on the first drive or partition, and to boot to Linux from there. It was easy, too.
Specific lines to put into the boot.ini were included in that post (I believe it was on LinuxForums.org). Of course, you cannot get W OS to recognize the Linux partitions, nor will it obligingly update boot.ini for you, but it's apparently very easy for you to edit boot.ini to fix the problem. If you can't find the post to which I refer with a search for something like 'dual boot,' holler back here and I'll see if I can find it. I'm fairly sure I saw this information more than once (in more than one post), so I expect it's correct. :)
By doing 'dd if=/dev/zero of=/dev/hda bs=512 count=1' will erase the boot sector. Before using dd, I recommend using sfdisk to make a backup of the partition table on /dev/hdb and /dev/hda. Then save the output to one of the hda partitions or just save to a floppy or any removable mediums. If I not mistaken nftsclone can only do the same capacity. Since hdb1 is not the same, you are screwd. I think you actually hosed both hard drives when using dd. In order to get the data back, you need to send it to a data recovery service and have them detect the old magnetic field before zeroing the entire drive.
I suggest using Norton Ghost. It makes it a lot easier to clone a disk or a partition. I do not think Ghost for Linux can do it. Next time be careful using dd while including /dev/zero device and double check the syntax before hitting enter. I recommend plan what you are going to do. Planning always takes less time than fixing a mess.
Use the Live CD at http://www.e-fense.com/helix/.
Good luck if you do not have any backups.
Thanks for all the suggestions guys.
All is well again.
Used testdisk from UBCD4WIN to scan /dev/hda and identify my partitions, rewrote the MBR so Windows would boot.
Then used ubuntu Live DVD and reinstated grub.
The problem was a very simple one, my script copied the "MBR" from /dev/hda1 instead of /dev/hda and then wrote the bogus MBR to /dev/hda...
My scripts have been fixed and tested again and my virgin XP with all my apps is secure.
ntfsclone piped to gzip allowed me to take 3GB of used space from my 10GB partition and compress it down to 1.8GB
I recently ruined my partition table using diskdrake with an old kernel and had to send my machine to a recovery service, they couldn't get anything back after 3 days so I took it back, paid $70 for a package called iRecover which returned 3,300 out of 3,500 files.
My plan was good, the execution was poor.
I now have less fear and more knowledge!
Congratualtions - bugger all people test their backup regimes.
Better to find out now.
I have never been convinced of the efficacy of backing up the MBR.
sfdisk maybe, dd forget it.
For an "instant" backup-restore it works o.k, else basically useless.
But at least you now know how to work around a failure.
|All times are GMT -5. The time now is 01:41 PM.|