Today I had a SATA hard drive go bad on me. Was a bit upset but it was on one of my spare computers and I do keep really good backups so there’s that.
With that said, this drive had my only 64 Bit version of XP. The OS is very clean and had all the updates till M$ stop there support. I use nothing but Linux all the time and don’t use Windows but do have licensed copies on different machines. I do repairs on computers and need different versions of Windows so I can play on them for fixing bad box’s. Since I keep very good backups I like to infect them and see different methods of fixing them.
With all that said, I was updating other software on the XP box when the hard drive went bad. Had a lot of time into it so I decided to try ddrescue to recover my drive.
Here is what I did. With a distro called Parted Magic (or any live CD) I opened a terminal window and typed in:
Don’t forget to change (sda) to your drive
My /data is on sdb so that is where the image file is being stored!
d tells ddrescue to use direct disk access and ignore the kernel’s cache
-r1 tells ddrescue to retry bad sectors 1 times before giving up. I would not go any higher, in fact may want to remove this option so your not wasting time. Chances are you won’t get that data back anyway!
2. Restoring the Image you just made.
dd if=/data/test.img of=/dev/sda Don’t forget to change (sda) to your drive
The of=/dev/sda statement is going to write the image file you created to the sda hard drive so make sure this is the drive you want to write to.
Linux: If your system will not boot after this, it may be that your MBR (master boot record) or Grub is bad so boot up with a distro called System Rescue. http://www.sysresccd.org/SystemRescueCd_Homepage
Boots you into your Linux distro even if your Grub or MBR are bad. Will boot a 32 or 64 bit box.
Once into your OS open a terminal and update your Grub and MBR by typing in the following commands.
sudo grub-install /dev/sda Don’t forget to change (sda) to your drive your using to boot into.
then
sudo update-grub
Now restart your system and you should be able to boot into your OS
Windows: If your system will not boot after this, it may be that your MBR (master boot record) is bad so boot up with a distro called boot-repair at http://sourceforge.net/p/boot-repair/home/Home/ Here you can repair your Windows boot problems for XP and Vista/Win7. If you still can’t boot after this, for Windows Vista/Win-7 and Win-8 you will have to use the Windows Boot disk and chose the repair option.
Good Luck. If you have any questions email me and I see if I can help.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRejectRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Here is good article on how to partition a hard drive for new installs
http://www.linuxbsdos.com/2014/07/02/manual-disk-partitioning-guide-for-linux-mint-17-kde/
Today I had a SATA hard drive go bad on me. Was a bit upset but it was on one of my spare computers and I do keep really good backups so there’s that.
With that said, this drive had my only 64 Bit version of XP. The OS is very clean and had all the updates till M$ stop there support. I use nothing but Linux all the time and don’t use Windows but do have licensed copies on different machines. I do repairs on computers and need different versions of Windows so I can play on them for fixing bad box’s. Since I keep very good backups I like to infect them and see different methods of fixing them.
With all that said, I was updating other software on the XP box when the hard drive went bad. Had a lot of time into it so I decided to try ddrescue to recover my drive.
Here is what I did. With a distro called Parted Magic (or any live CD) I opened a terminal window and typed in:
1. ddrescue -d -r1 /dev/sda /data/test.img test.logfile
Don’t forget to change (sda) to your drive
My /data is on sdb so that is where the image file is being stored!
d tells ddrescue to use direct disk access and ignore the kernel’s cache
-r1 tells ddrescue to retry bad sectors 1 times before giving up. I would not go any higher, in fact may want to remove this option so your not wasting time. Chances are you won’t get that data back anyway!
2. Restoring the Image you just made.
dd if=/data/test.img of=/dev/sda Don’t forget to change (sda) to your drive
The of=/dev/sda statement is going to write the image file you created to the sda hard drive so make sure this is the drive you want to write to.
Linux: If your system will not boot after this, it may be that your MBR (master boot record) or Grub is bad so boot up with a distro called System Rescue. http://www.sysresccd.org/SystemRescueCd_Homepage
Boots you into your Linux distro even if your Grub or MBR are bad. Will boot a 32 or 64 bit box.
Once into your OS open a terminal and update your Grub and MBR by typing in the following commands.
sudo grub-install /dev/sda Don’t forget to change (sda) to your drive your using to boot into.
then
sudo update-grub
Now restart your system and you should be able to boot into your OS
Windows: If your system will not boot after this, it may be that your MBR (master boot record) is bad so boot up with a distro called boot-repair at http://sourceforge.net/p/boot-repair/home/Home/ Here you can repair your Windows boot problems for XP and Vista/Win7. If you still can’t boot after this, for Windows Vista/Win-7 and Win-8 you will have to use the Windows Boot disk and chose the repair option.
Good Luck. If you have any questions email me and I see if I can help.
Sorry the boot-repair link should be http://sourceforge.net/projects/boot-repair-cd/files/?source=navbar