Avatar of nobus
nobus
Flag for Belgium asked on

restore boot partition windows 7 after formatting

a client formatted his windows 7 boot partition by accident.
what is the best - FREE - way to restore it?
will a repair from win7 cd  work?
Windows OSWindows 7

Avatar of undefined
Last Comment
nobus

8/22/2022 - Mon
Tom Cieslik

You have 3 Methods of repairing:

FIRST
1. Start Windows 7 installation from DVD or bootable USB drive go to repair
 
2. Open a cmd prompt
 
3. Navigate to DVD drive letter
 
4. <dvd letter>:\boot\bootsect.exe /nt60 <vhd system drive letter>: /force
 

5. Reboot your computer, with DVD inside and try again but this time select Boot repair.
Windows should repair your boot partition.


SECOND

1. Start computer from installation DVD/USB, go into the repair mode (recovery console/DOS prompt).
2. Type C: to go to the C (boot) drive of your Windows 7
3. Simply type the following command at the recovery console DOS prompt:
 
bootsect.exe /nt60 all /force
 
4. type EXIT and then reboot the machine.

THIRD

1. Start computer from DVD/USB go to repair / command prompt
2. Run Diskpart
List disk
Select Disk 0
List Partition
- Windows will list all partitions, check number for small partition, this should be your boot partition
Activate 1st partition using Diskpart

Select partition 1
Active

3. Restart computer and start from DVD/USB again go to Repair / command prompt
4. use this commands:

Assign drive letter to Boot (System)Partition
Run Diskpart
Select Disk 0
Select Partition 1
Assign N:
Exit

format N: /FS:FAT32
Now copy boot files to new boot partition

in Command Prompt run commands:

bcdboot C:\windows /l en-us /s N: /f UEFI

bootrec /rebuildbcd
bootrec /fixmbr
bootrec /fixboot

Exit

Now you can boot computer and all should be OK
nobus

ASKER
maybe i did not explain very well
originally the deleted boot partition was E:, not C:
does this change much ?
Tom Cieslik

Because windows enumerated it itself
Boot partition should NOT have any drive letter, should be hidden
GO to step 3
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
nobus

ASKER
Tom, tx for your support, but what do you mean with "Because windows enumerated it itself" ?
>>  Boot partition should NOT have any drive letter, should be hidden  <<  right - but it was not, it even showed in explorer as a separate drive with drive letter ( or should i say volume?)

i have some questions for you :
1- your suggestions above - they restore the bootsector - but not the boot partition - right?
2- is there  anyway to restore the boot partiton you know ?
Tom Cieslik

Because you've said "Client formatted boot partition" so he did NOT delete it.
Boot partition was only formatted so windows naturally assigned a drive letter to it.

If you'll fallow instruction then all will work OK
nobus

ASKER
no it is NOT deleted it is there, but quick formatted and shows with the name New E: (when connected to a working system which has drive C: and DVD drive D: )
The windows partition shows as F:
i have a question for your commands :https://www.experts-exchange.com/questions/29169490/restore-boot-partition-windows-7-after-formatting.html#
in FIRST you say " <vhd system drive letter>:   is that the Boot drive letter  - or the windows drive letter ?
in Second :  "<vhd system drive letter>: ""  - same Q
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Tom Cieslik

Sorry nobus, I have copied this resolution from my previous comment in other topic about restoring boot partition on VHDX drive an I did forget to delete comment about VHD :)
It's just about to copy all files to your boot partition whatever drive letter has now
nobus

ASKER
could you post the exact command plse for first ? now you see the partition letter, assuming 200MB partition = D: and  windows partition is C:
sorry to ask, but i want to have it correct
tx for supporting me on this
right now i'm in the command prompt in the BOOT partition of the USB stick
ASKER CERTIFIED SOLUTION
Tom Cieslik

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
nobus

ASKER
you posted : "bcdboot C:\windows /l en-us /s D: /f UEFI"  is that for an ENGLISH windows version?  i'm using a Dutch one, sorry
and what is the /s D:/UEFI for?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Tom Cieslik

OH yes, if you have Dutch version then you have to use your country code, :)
/s <volume letter> Specifies the volume letter of the system partition. In your case D:
/f <firmware type> Specifies the firmware type. Valid values include UEFI, BIOS, and ALL

You can use ALL instead UEFI
nobus

ASKER
it looks much like the making of a bootable usb stick  -but i must say i never had to use the /s option - is that really needed?
Tom Cieslik

No. BCDBOOT looking for active partition so if your D partition is still default/ active you don't have to use it /s option but if you are not sure then you should use it to point to right partition.

In other hand if your D partition is not active you must activate it using let say diskpart
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
nobus

ASKER
i assume this works for all windows 7 versions ?  this is an ULTIMATE
Tom Cieslik

This works for all Windows 7 and above versions
nobus

ASKER
well that was my idea also -but i ask because i used the windows install cd - repair function - startup repair
that seemed to work ok - but after a reboot it said windows not genuine - so i was thinking it recognised another version maybe…this leads to a licence cost...
very strange

FYI - i first made a disk copy to another similar SSD -  to test on, so i still have the Original untouched
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Tom Cieslik

Boot partition repair has nothing to do with Genuine of Windows.
If you got this message it's mean that Windows detected hardware changes (HDD or Motherboard)
nobus

ASKER
well it was withthe ssd copy  -  can that be the cause?
Tom Cieslik

Probably, because Windows is checking Disk ID/Serial

When installing Windows 10, the digital license associates itself with your device's hardware. If you make significant hardware changes on your device, such as replacing your motherboard or Hard Drive, Windows will no longer find a license that matches your device, and you’ll need to reactivate Windows to get it up and running

Reactivate Windows 10 after a hardware change
When you're ready to reactivate, make sure that your device is connected to the internet and then follow the steps for either a digital license or product key.

Show all
If you have a digital license, run the Activation troubleshooter.
If you don't have a digital license, enter your product key.
If you don't have a digital license or product key
If you don't have a product key or digital license, you can purchase a Windows 10 digital license after installation finishes. Follow these steps to make a purchase:

Select the Start  button, then select Settings  > Update & Security  > Activation . Then select Go to Store to go to the Microsoft Store app where you can purchase a Windows 10 digital license.

Source
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
nobus

ASKER
i know it does that for different mobo - but for a different SSD? never had a problem with such a change.
NOte also i'm in Europe, where you can install windows on 2 or 3 different mobo's with 1 licence - eg when the old boar is dead
Tom Cieslik

nobus,, I came from Europe to, now I'm living in USA.
I had some issue with Windows activation after MOBO replace so I feel your pain. You can try Phone activation and all should be OK.
Your question was about repairing boot partition so Probably we did it.
I think you should close this topic and open new one if you have issue with Windows activation.
nobus

ASKER
closing out
Your help has saved me hundreds of hours of internet surfing.
fblack61