Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-09-2006, 08:22 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2006
Location: Sydney
Distribution: ubuntu
Posts: 4
Rep:
|
XP Backup/Restore from Linux failed - Help please!!!
In summary:
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.
Clint
|
|
|
|
08-09-2006, 10:50 AM
|
#2
|
|
Member
Registered: Apr 2005
Distribution: Debian
Posts: 154
Rep:
|
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.
|
|
|
|
08-10-2006, 01:29 AM
|
#3
|
|
Member
Registered: Aug 2006
Distribution: MEPIS
Posts: 73
Rep:
|
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. 
|
|
|
|
08-10-2006, 03:45 AM
|
#4
|
|
Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
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.
|
|
|
|
08-10-2006, 08:21 AM
|
#5
|
|
LQ Newbie
Registered: Jan 2006
Location: Sydney
Distribution: ubuntu
Posts: 4
Original Poster
Rep:
|
Thanks guys!
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.
Cheers.
clint.
|
|
|
|
08-10-2006, 08:33 AM
|
#6
|
|
LQ Newbie
Registered: Jan 2006
Location: Sydney
Distribution: ubuntu
Posts: 4
Original Poster
Rep:
|
Thanks Electro.
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!
Cheers,
Clint.
|
|
|
|
08-10-2006, 09:08 AM
|
#7
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,288
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:00 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|