Skip to main content

Boot problem after restoring Win 7 RC

Thread needs solution

My comp normally has XP and Vista available as Grub4DOS boot options. For a time I had Win 7 RC in the XP partition (first primary), and after playing with it for a while I imaged it with TI 11 and restored XP.

Today I decided to restore Win 7 again, but TI couldn't identify the original mount point and I had to tell it to use XP's mount point. Bad idea. It won't boot, "a required device is not available". This is because the partition offset differs from XP's I guess.

Is there a way around this problem?

0 Users found this helpful

Earthling:

Can you still boot the PC into Vista? If so, start an elevated command prompt in Vista and enter the command bcdedit. Post the output here. You can fix this very easily from the command prompt in Vista.

Mark:

Yes, Vista boots OK after the Win 7 boot error, but the data partitions behind it all get their drive letters changed. Bit of a nuisance, but easily fixed.

Mark:

Apologies, got called away before I could finish. atm I've got XP reinstated and will have to leave it like that for the time being. Here's the BCD as it stands atm, so is it possible to manually create the Win 7 entries, or do I have to restore Win 7 first, try to boot it, reboot to Vista and then edit it?

Attachment Size
7988-85810.JPG 56.36 KB

Bernard:

I forgot; you may be dual-booting the "correct" way with each OS hidden from the other. Is this correct?

Could you describe the disk layout when the Win 7 image is installed? For example; boot manager Grub4Dos is on Primary 1, Win 7 and its BCD and bootmgr files are on Primary 2, Vista and its BCD and bootmgr are on Primary 3, etc??

That's correct Mark, the two bootable partitions are hidden from each other.

I've attached a pic of the disk layout. The first primary is where XP normally resides, and is where I would like to restore the Win 7 RC backup. (Win 7 RC was there previously for a while). 2nd primary is Vista, and the 3rd (Boot) has Grub4DOS boot files grldr, menu.lst etc, and a folder of bootable ISOs. Other partitions are just data.

When I restore Win 7 it doesn't remember where it came from, so I have to point it to the first primary. Then I get the boot error.

Attachment Size
8006-85813.JPG 38.59 KB

Bernard:

I saw that you have EasyBCD, which is great when the OS is running but not helpful when the OS won't start. There are two ways to proceed:

A. Restore the Win 7 image and then boot to Vista with the Win 7 partition not hidden. Use EasyBCD to examine and correct the Win 7 BCD on the first primary partition (if it will let you do this; I don't have any experience using it). When done, go back to hiding the Win 7 partition when booting Vista.

B. Do it all manually:
1. Restore the Win 7 image
2. Boot the PC from the Win 7 DVD and enter the startup repair section of the recovery environment. Do NOT choose automatic repair; instead go to a command prompt.
3. Determine which drive letter belongs to the Win 7 partition as seen by the recovery environment. This letter may not be C: in the recovery environment, but will be C: when booted to Win 7.
4. Type bcdedit to display the Win 7 BCD contents. You should see some of the entries listed as unknown. These are the ones that need to be corrected manually. Usually there would be 4 unknown entries which would be corrected by the following commands. You may only see 3 since the one for the memory diagnostic will not show up in the list unless you display the entire BCD with bcdedit /enum all.
5. In these commands, substitute for X: the correct drive letter as determined in step 4.
bcdedit /set {bootmgr} device partition=X: 
bcdedit /set {default} device partition=X: 
bcdedit /set {default} osdevice partition=X: 
bcdedit /set {memdiag} device partition=X:

You should now be able to boot Win 7.

Mark:

The system actually suggested I use my Win 7 CD to repair the BCD, but having stored an image I didn't see that I would need it again and used it for something else. Are you touched by my faith in Acronis? ;-)

If the situation is such that I can't simply restore my Win 7 image, modify menu.lst, and boot to it then I probably won't persist, but thanks for the input.

Bernard

Do you have a Vista DVD? Try booting with that and follow procedure B). I forgot to include one additional requirement - when you boot with the DVD, make sure that the Vista partition is hidden and the Win 7 partition is unhidden.

When doing the boot repairs, the Windows 7 partition should also be the Active partition.

Paul:

Since Earthling's boot manager is installed to the MBR, none of the partitions really need to be active. Are you concerned about how Win 7 will assign drive letters on first boot?

Not ignoring you guys, just need to be sure I've got 2 hours free before trying again. Reason is that the first time, after Win 7 failed to boot, when I rebooted to Vista all my drive letters were mussed up. The third primary, Boot, normally D, got bumped up to G, and the old E, F, and G logicals all dropped down one. I guess the reason for that was that after the failed boot the first primary was still visible for some reason when Vista was next rebooted. Any thoughts on how I might prevent that before I try again?

K0LO wrote:
Paul:

Since Earthling's boot manager is installed to the MBR, none of the partitions really need to be active. Are you concerned about how Win 7 will assign drive letters on first boot?

Mark,

Windows 7 may be smart enough to detect the correct partition (I think you've run some repair tests and have read more on this than I have, but I assume Windows 7 still expects the booting partition to be set Active. When doing any boot repairs using the Windows DVD, my choice would be to have the system configured as correctly as it could be before running the repair.

Earthling,

With all the drive letters being reassigned in Vista, it sounds like the Disk Signature may have changed. Do you know if this happened?

Usually, if you "add" a previously hidden partition to a working system, Windows will just add a drive letter for that partition. The others will retain their assigned letters.

MudCrab wrote:
Earthling,

With all the drive letters being reassigned in Vista, it sounds like the Disk Signature may have changed. Do you know if this happened?

I don't Paul, and I don't know how I find out either.

MudCrab wrote:
Mark,

Windows 7 may be smart enough to detect the correct partition (I think you've run some repair tests and have read more on this than I have, but I assume Windows 7 still expects the booting partition to be set Active. When doing any boot repairs using the Windows DVD, my choice would be to have the system configured as correctly as it could be before running the repair.

I agree if you are going to attempt an automatic repair. But in Bernard's installation, Win 7 is completely self-contained in primary #1 (no separate 100 MB boot partition), the Vista partition in primary #2 is hidden, and the BCD repair is being done manually. On first boot (assuming that Grub4Dos is still set up to unhide primary #1 and hide primary #2), Win 7 will have no choice but to assign C: to its own partition. The active flag would be consulted to determine which partition has first dibs on the C: drive letter if there are no reservations in the registry, but as we know in Vista and Win 7, the system partition gets first dibs on the C: drive letter.

Mark:

Just wanted you to know that your B instructions worked perfectly and I'm posting this from Win 7 RC :)

Haven't attempted a reboot to Vista yet, but not expecting anything more than maybe having to swap a few disk letters.

Thank you!

Bernard

Bernard:

Good to know! Now that you have the Win 7 BCD fixed, don't forget to create another image of the W7 partition. The new image will restore without issue.

Already done Mark, but why would you expect it to be any different from the last time bootwise? When the previous image was taken both Win 7 and Vista were booting without problems.

EDIT - just to expand on that, it was restoring XP to the Win 7 partition, and then restoring Win 7 to it again that upset the applecart.

Bernard:

I suspect that when you installed Win 7 originally, you let the installer create the partition. Was that the case? If so, there's a simple explanation for what happened.

OK, then here's what probably happened. Win 7 and Vista create partitions with 2048-sector offset and TI restores partitions with 63-sector offset (the established standard for partition layouts). When you restored the Win 7 image, the location of its starting sector was changed from sector 2048 to sector 63 by TI. When the starting sector is moved, all of the pointers in the BCD and all of the drive IDs in the registry are now incorrect. So the result is that Win 7 will not boot. Repairing the BCD corrected all of the pointers to make it boot again. On first boot, the registry entries were updated to point to the C: drive in its new location.

Now that you have Win 7 in a partition with 63-sector offset, you need a new TI image, which will contain all of the corrected BCD entries. When this new image is restored, the offset will remain at 63-sectors and the pointers will all be correct, so it will restore without issue.

The reason that XP worked following a TI restore that realigned the partition's starting sector from 2048 to 63 is that XP boots using a different technique. The XP boot manager, ntldr, looks up the file ntldr by file name, so the fact that its sectors were moved is irrelevant.