Advice wanted on moving dying Windows XP box to dual boot
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Advice wanted on moving dying Windows XP box to dual boot
Sorry for the lengthy prose, but bear with me.
I have an older 1.2 GHz HP Pavilion 750n with Windows XP SP and one 70GB ATA disk. The disk is going bad, I think. There is some place on the drive, I do not know where exactly, that when read, causes the system to spontaneously reboot. Occasionally when I save a file, which just happens to use this location, my backups start to fail with reboots. By deleting the suspect file I am back in business. Running the pitiful XP diagnostics does not seem to locate or help the problem. Time to get a new disk (unless someone can suggest an alternative).
The problem is this system does not come with an XP install disk. Instead, you are expected to recover from an image in a reserved disk partition. So buying a new disk does me no good unless I can copy the original bit for bit (partition by partition) to the new drive.
I have been wanting to go dual boot with his box for sometime. So I was thinking of getting 2 new disks. One to copy my XP bit for bit to. The other to install Fedora 9 onto for the dual boot. I'd have the fedora disk as the master and the XP as the slave. Grub would allow me to boot to either.
I am look for advice or pointers to recipes to do this.
I was thinking of installing the new XP disk as a slave. Then using the fedora live DVD to boot to fedora and then use something like gparted (never used it actually) to do the bit-for-bit, partition for partition copy of XP. Then I would replace the original XP disk with the new blank fedora disk in the master slot. I would then install fedora on the blank disk, expecting that it would see the new XP disk, and configure grub to allow booting from either.
Any good hard drive cloning software (like Norton Ghost) should be able to clone an exact copy of your old disk to the new one. If there are bad sectors on your drive, it seems like they are not being marked as such. The inbuilt tools in winblows are pathetic, I use Paragon Hard Disk Manager to perform drive maintainence. There plenty of other good hard disk managers (even freeware) that are miles better than what winblows provides.
You can clone your XP parition, and then copy it to the new drive.
Here are two links to help you ... if still confused, post back and
I'll help more. I cloned a Vista partition to test another version
of the software yesterday. What I did was mount a 40G USB drive,
then clone Vista with dcfldd (a version of dd), using this command:
If you do that, substituting the appropriated devices, then you
will have a duplicate of your Win XP system that you can then
copy to your new hard drive. It will boot, and you will not
have lost anything from it.
Read those articles ... dd is better than Ghost, and free.
Well I bought a couple of IDE disks. I set one up with an IDE to USB adapter. I then booted up the XP box with F9 Live CD and tried to dd copy the XP disk to the new drive using the full disk copy:
Code:
dd if=/dev/sda of=/dev/sdb bs=32256
Something is really wrong with this box. Despite several tries the system froze in the middle of the dd copy. I rebooted each time and got the same result. I tried booting with XP and doing a chkdsk with all the repair options, but it says the disk is OK.
I did try several dd incantations. I understood that dd would duplicate the source partitions on the destination device if it was not partitioned, which it did, but the dd stopped (the system locked up actually) in the middle of copying the second partition.
Dropping the bs=32256 caused dd to stop (without lock up) when an error occurred. The system log file had the following errors:
Code:
Nov 4 16:33:06 localhost kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
Nov 4 16:33:06 localhost kernel: ata1.00: BMDMA stat 0x25
Nov 4 16:33:06 localhost kernel: ata1.00: cmd c8/00:08:e0:76:52/00:00:00:00:00/e1 tag 0 dma 4096 in
Nov 4 16:33:06 localhost kernel: res 51/40:03:e5:76:52/00:00:00:00:00/e1 Emask 0x9 (media error)
Nov 4 16:33:06 localhost kernel: ata1.00: status: { DRDY ERR }
Nov 4 16:33:06 localhost kernel: ata1.00: error: { UNC }
Nov 4 16:33:06 localhost kernel: ata1.00: configured for UDMA/100
Nov 4 16:33:06 localhost kernel: sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
Nov 4 16:33:06 localhost kernel: sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
Nov 4 16:33:06 localhost kernel: Descriptor sense data with sense descriptors (in hex):
Nov 4 16:33:06 localhost kernel: 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Nov 4 16:33:06 localhost kernel: 01 52 76 e5
Nov 4 16:33:06 localhost kernel: sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
Nov 4 16:33:06 localhost kernel: end_request: I/O error, dev sda, sector 22181605
Nov 4 16:33:06 localhost kernel: printk: 2 messages suppressed.
Nov 4 16:33:06 localhost kernel: Buffer I/O error on device sda2, logical block 1551760
Nov 4 16:33:06 localhost kernel: ata1: EH complete
I have now downloaded the diagnostics tool for the Samsung SV8004H disk that was OEM'ed into the Pavilion 750n. This tool runs in DOS mode from a DOS boot floppy. The surface scan reports one LBA error and then somewhat later into the scan it locks up! I try it again and this time I get two sequential LBA errors, the first in the same place, but the scan completes and reports two unrecoverable errors.
Is there a way to have dd skip the bad LBA when doing the copy? I suspect they are in the free space as the disk is only 20% full. I just want copy/rescue this XP partition.
The previous dd's created two partitions on the new disk, and successfully copied the first smaller partition (sda1). So I have been trying to just copy the remaining much larger sda2 at this point.
I just tried:
Code:
dd if=/dev/sda2 of=/dev/sdb2 conv=notrunc,noerror
I dropped the bs option as the large bs values seem to aggravate the lock ups. I added the noerror option to see if it would skip the error.
No luck. I did get dd to report an error that 6GB was copied, so many blocks read and written. Then the system locked up.
Would anyone think that moving this disc to a slave position or off the the IDE-to-USB adapter might stop the lock ups and let me complete the copy?
The best tool for the job you are facing (and I do mean the BEST tool) is spinrite. This is not a free utility, IIRC it is $89. However it will recover your old drive, perhaps indefinitely but more likely for long enough, and you will be able to then use dd to make your clone copy.
Moving the drive to another point on the cable is a waste of time.
I have no experience with spinrite which may well be more appropriate for your problem.
None of these tools do what spinrite does. I don't know of anything else available that does do what spinrite does. These other tools will rescue data from a corrupted disk, but won't help with a disk that is in the process of failing.
Spinrite will adjust head position back and forth on the track, will vary the R/W head currents, and will try over and over to read the bad sector as it does this, collecting statistics on what it reads and doing a statistical analysis to attempt recovery of data on the bad block.
I have seen it succeed many times to recover content on a drive that other products wouldn't touch. It often manages to restore the functionality of the bad block too. It really is an incredible product. ddrescue and other products based on dd just are not in the same league at all.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,581
Rep:
Hi, jiml8
Quote:
Originally Posted by pwalden
...Is there a way to have dd skip the bad LBA when doing the copy? I suspect they are in the free space as the disk is only 20% full. I just want copy/rescue this XP partition.
That's why I suggested dd_rescue.
What you describe of spinrite sure sounds impressive. I'll keep that in mind.
I did not try to rescue the data on the current disk. Thanks for the advice on this. I'll keep this in my pocket for future emergencies. Instead, as dd did copy the first partition rescue image onto the new disk and since I kept all my application install disks and also use NASBackup religously, I went for a fresh rebuild.
I swapped the new disk in and invoked the HP Pavilion rescue restore to rebuild the XP instance from the rescue partition into the second partition. As an added bonus, the rescue logic rebuilt the instance using all of the disk, so I got 150GB, instead of the original 60GB. I then restored from my backups and reinstalled the applications I still wanted. The downside was that I had to remove all the junk that the original came with (ie AOL instant start, adware, etc).
I then moved the Windows disk to the slave position and put the second new disk in the primary position.
I then installed F9 from the install CD disks onto this new primary.
F9 booted up right away. I then edited the grub.conf. The Windows boot was already listed under Other (thank you Fedora installer), but I had to add
Code:
map (hd0) (hd1)
map (hd1) (hd0)
lines to get the Windows boot to work.
Finally, I ran into the clock discrepencies. Linux set the ayatem clock to UTC, Windows likes it on local time. I found that adding a RealTimeIsUnversal=1 entry to the TimeZoneInformation registry key fixed this problem.
Everything is booting up fine right now, although I have not played too much with either installation yet. So I may run across other problems, but I am happy now. I have my original Windows environment working on a good disk and I can dual boot to Linux.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,581
Rep:
Reasonable.
You might want to put the broken disk on the second IDE channel and read it from your linux installation (without the hassle of an entire system stalled). When you get a read error you'll have the name of the file and can get around that one -- if it is of any interest for you anymore...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.