Is it possible to copy all Windows 7 files from one HD to another and boot from the new HD?

15

7

Well, the hard-drive on my laptop died (it was displaying "SMART failure prediction -- Hard-disk Drive dailure might be imminant).

So I took it out and hooked it up to an external enclosure and copied all the files (system files and personal files, hidden and visible) off of it to another computer.

After that, I went and bought a new hard-drive. My previous hard-drive was a 250-GB 5400-RPM Western Digital. The new hard-drive is a 500-GB 7200-RPM Western Digital.

So I placed the new harddrive in the external enclosure and copied all the files I had copied off my dying harddrive on to it (my new harddrive). I placed it back into my laptop and booted it up.

I was expecting it to work when it said, "operating system not found". I rebooted again and brought up the Bootable-Devices menu and sure enough my new harddrive isn't even listed on there. Although, it doesn't detect it as a bootable device, the BIOS does detect the new harddrive (as I am running the BIOS' drive-diagnostics-program on it now which is almost complete). So I'm not sure what is going on.

I should mention that while backing up my files, I had no trouble getting all the files off my dying harddrive with the exception of a few (non-system) files associated with a Virtual Machine I had.

So I suppose my question is: Is it possible to boot from the new Harddrive? Or will I have to reinstall Windows 7 all over again?

Too long; Didn't Read...

I copied all my system-files (hidden and visible) from my old, dying hard-drive (250-GB 5400-RPM ) to a new harddrive (500-GB 7200-RPM). Is it possible to get Windows 7 to boot from the new harddrive?

Anotation 1

I copied the contents of the old drive over to the new harddrive using CloneZilla and CloneZilla inidcated a successful process. I plugged the new hardrive into my laptop and I am still getting the "Operating System not found" error. Did I forget to do something? Do I have to fix the Master Boot Record or Boot Sector?

Gratitude

I have to thank everyone's answer to this question as they were all prompt, courteous, and informative. Thank you! I have solved this seemingly huge problem of mine and I will know how to do it in the future should it ever happen again! Not only is my operating system completely intact but because of your contributions and time, I did not have to resort to buying a copy of Windows 7 to reinstall it. Thank you very much! I am very grateful.

Kairu

Posted 2011-04-13T18:20:19.867

Reputation: 153

Answers

9

There is a lot more to booting an operating system than simply having a bunch of files on the disk. There's a reserved bunch of blocks at the start of the disk that contain some special boot instructions which tell the computer how to boot.

If your old hard drive isn't dead yet... I would highly recommend you look at a tool like clonezilla or Symantec Ghost to clone your hard drive. It will correctly copy the special bits of the drive that are needed to boot, as well as resizing the volume to fill the entire disk.

TheCompWiz

Posted 2011-04-13T18:20:19.867

Reputation: 9 161

Ahh of course! I should have known better than that. I'll definitely try CloneZilla then. – Kairu – 2011-04-13T18:32:10.480

9

It's possible, but like the others have said, it involves more work. You need to set up a master boot record (MBR) to boot the disk, and set up the Windows boot loader to boot from that disk, using BCDEdit. It's by no means difficult, but you need to know what you're doing.


If you want to try it, follow these steps:

  1. Set up the partition scheme you want. (Edit: Don't forget to mark the boot partition as active!)

  2. Run BootSect.exe on the new hard disk. I think the program can be found in C:\Boot\BootSect.exe. Let's say your new drive (as an external drive at the moment) shows up as E: on your computer; type this into the command prompt:

    C:\Boot\BootSect.exe /nt60 /mbr E:
    

    Be especially careful to not accidentally do this to other drives!

  3. Now copy all the files over to the new drive (E:), ensuring that you also copy hidden and system files.

  4. Now use BCDEdit to fix the device and osdevice members of the E:\Boot\BCD file. You need to type in something like:

    BCDEdit /store E:\Boot\BCD
    Echo  Your boot entries are now printed. Copy the correct GUID.
    BCDEdit /store E:\Boot\BCD /set {YOUR-GUID}   device partition=E:
    BCDEdit /store E:\Boot\BCD /set {YOUR-GUID} osdevice partition=E:
    

Your volume should now be bootable.

user541686

Posted 2011-04-13T18:20:19.867

Reputation: 21 330

I do have a slight idea of what I'm doing but if I don't, I at least have the conscience to query Google for my problem. Right now, it would be more work for me to go out and buy or download Windows 7 with a valid Product-Key and then reinstall it and then copy all of my files over. Of course, that would be my last resort. If I can transfer my old Harddrive over to my new one and preserve it, I definitely will. – Kairu – 2011-04-13T19:27:58.907

@Kairu: I added an edit; hope it's helpful. – user541686 – 2011-04-13T20:10:52.363

I tried this method, but I can't find the BootSect.exe program. Inside the %systemroot%\boot directory are several directories named using language-abbreviations such as "en-US", "fr-FR", "ru-RU", and "zh-HK", and so on. Inside each directory are two files: "bootmgr.exe.mui" and "memtest.exe.mui". Am I missing something? – Kairu – 2011-04-14T04:44:08.383

Ah sorry, my bad. I think I had copied it there from my installation DVD's Boot folder; take a look there. – user541686 – 2011-04-14T04:57:24.253

3

There is an awful lot more to booting a disk than just having some files on it.

The disk must be prepared properly. It requires certain data to exist in certain places of the drive. Namely, the boot sector and boot loader.

The computer by itself is incapable of loading windows. All it is capable of loading is 512 bytes from the very beginning (block 0) of the hard drive.

This is called the "boot sector". This data is read and then executed as a small program. It is then up to this program to then load the "boot loader" - more advanced than the boot sector, but still along way from windows.

It is then the job of this boot loader to start booting windows.

When you install windows all these things are put in place automatically. They do not get copied over with the files when you copy them from one disk to another.

You will need to reinstall windows afresh on the new drive, and then copy your data across from the old drive. Just copy the data - not windows or your programs (they will need reinstalling from scratch again).

Majenko

Posted 2011-04-13T18:20:19.867

Reputation: 29 007

I should have known it wouldn't be that easy. Well either way, I'm going to give CloneZilla a try. Hopefully it will work but if not, I'll have to go and purchase Windows 7 since Windows 7 was preinstalled on this laptop and I have neither the Product-Key nor an OEM installation disc of it. – Kairu – 2011-04-13T19:24:12.030

The product key should be on a label on the underside of the laptop. – Majenko – 2011-04-13T19:53:50.903

Funny thing about that, Lenovo said that too. I even checked myself before calling them. There never was a sticker anywhere on the laptop with the Windows 7 Product key printed on it. So I don't know what that was all about but it sure made things a lot more difficult for me. if I had the Product Key I could have just gotten an OEM version of Windows7 from a friend and reinstalled it using my Product Key but unfortunately that's not that case. I can't retrieve the Product Key either like you can with Windows XP using a program like RockXP since the key can only be decrypted when booting from – Kairu – 2011-04-13T20:48:00.977

@Kairu You may also want to check that the HDD partition itself has the boot flag set. – Hydaral – 2011-04-14T01:30:28.823

1

You are best to "clone" the old hard drive to the new one, then all you may need to do once the new Drive is installed is to do a startup repair to get it booting again.

Use this Free Software to clone the Western Digital drive

Moab

Posted 2011-04-13T18:20:19.867

Reputation: 54 203

Ha ha! I didn't even think to look on the Western Digital site for a utility like this. If for whatever reason, CloneZilla doesn't work satisfactorily for me, I'll give this option a try. Although, I speculate using this utility would yield better results. Although, I cannot boot into my Windows 7 installation at all. So, can this only be run from inside windows? Or can you use this utlity as a boot-device (like CloneZilla)? – Kairu – 2011-04-13T19:53:35.500

It needs to be installed on a Windows PC, once installed you can make a Boot CD, but the boot CD is not as powerful as using it in Windows. – Moab – 2011-04-13T19:59:26.040

It's not as powerful? A little counter-intuitive to me but I am also ignorant to computer-hardware maintenance. I'm merely a computer software programmer. I would use it on the Windows machine I'm trying to recover but unfortunately, I can't get past the Error screen. It does give me an option stating, "To continue booting, press F1" which of course does absolutely nothing. I'll add this to my arsenal for future reference.

Just out of curiosity, is this utility optimized for Western Digital drivers or will this generally work for any brand of harddrive? – Kairu – 2011-04-13T20:52:13.700

The boot Cd has some limitations, not sure what all of them are but does not have all the features that it does when running in windows, and I think cloning is one of them. The software must see at least 1 WD branded drive in the system or it will not allow you to use it. – Moab – 2011-04-13T22:24:16.103

1

would this help, is vista and 7 based on the same? asuming your drive is setup correctly boot secter. heres how to tie in the bootloader.
neosmart easy bcd says

http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD

Step Four: Nuclear Holocaust

jose

Posted 2011-04-13T18:20:19.867

Reputation: 11

0

You can use a Linux liveCD and use the dd command (or ddrescue) and make a bit-for-bit copy. Not terribly complex, just be sure you don't mix your drives up. :)

Ben Preston

Posted 2011-04-13T18:20:19.867

Reputation: 1

0

if you want to find the product key of your windows 7 installation you can install the everest software and in the operating system section it will tell you product key and product id both.

if you can boot from your old hard drive only once and able to install everest then you can get your product key.

kaykay

Posted 2011-04-13T18:20:19.867

Reputation: 881

0

You can't find the licence on a label on the bottom of the laptop... Because it's hidden under the Battery!

It's not uncommon for Lenovo's to have the licence there, i've also seen licences under the hard drive enclosure (requiring taking the HDD out to view) but that wasn't a Lenovo :)

HaydnWVN

Posted 2011-04-13T18:20:19.867

Reputation: 3 192