Question Restore installation media

Feb 4, 2023
2
0
10
Here's the situation:
  1. I own an HP laptop that came with Windows 7 installed (OEM), for which I still have the product key
  2. I made a working installation media from it using a flash USB drive
  3. I installed Linux on that computer (endeavor OS)
  4. Using gnome-disk-utility, I cloned installation media on an external HDD (exFAT)→win-live.img
  5. I erased the USB drive
  6. I tried to restore win-live.img onto the USB drive, using gnome-disk-utility, but it's not mountable, and does not boot
My question is: what are my options to restore Windows on this laptop?

Other:
  1. About 4: I can mount win-live.img and what it contains does look as it's a viable installation media (bootmgr.efi, setup.exe, etc.)
  2. About 6: for restoring to the USB drive, I tried a) with and without the 'bootable' option b) with either of FAT and exFAT c) onto a partition for the whole drive (bigger than the source by about 17MB), and one whose size matches the source exactly, leaving free space to the right of 17MB.
  3. About 6: if I reboot and go into 'boot device options', the USB drive is recognized, but if I select it, the boot process switches to the default device (local drive)
File manager / source / mounted: https://ibb.co/b3Fpc8n
gnome-disk-utility / source / mounted: https://ibb.co/nrywYK9
gnome-disk-utility / source / mount options: https://ibb.co/7X90MMK
gnome-disk-utility / target: https://ibb.co/TPTZfpH
gnome-disk-utility / restore Disk Image in process: https://ibb.co/q1PFDZp
 
Last edited:

Aeacus

Titan
Ambassador
My question is: what are my options to restore Windows on this laptop?

Format the OS drive, install Win7 back, activate it with your OEM key.

I made a working installation media from it using a flash USB drive (the target).

Apparently not, since it doesn't work.

Using gnome-disk-utility, I created an image named win-live.img (the source), of the Windows installation media, on an external HDD (exFAT)

Why?

Easiest way to relocate OS, while still keeping it intact (bootable) is to clone the whole OS drive onto another drive. <- This is what i've done with my builds, to back up the Windows installation. In a rare chance my current OS drive happens to die, it is as easy as taking the backup OS drive from storage, hook it up and boot off from it. That simple with 0 issues. And this is what you should've done as well.

I installed Linux on that computer (endeavor OS)

Dual-boot would've been better choice, rather than wiping the Win.

using gnome-disk-utility, but it's not mountable, and does not boot

GNU/Linux uses different file system and partition table than Windows does, hence why it won't work. For Win, it has to be either MBR or GPT.
 

Aeacus

Titan
Ambassador
I can't install Win 7 Back on an OS drive

Why not? Don't have the installation media (e.g Win7 installation DVD)? Or *.iso file? Latter can be easily found in the net.

If you want Win back, you have 2 options:
  1. Install Win7 (finding installation media is your task), afterwards activate it with your OEM key.
  2. Install Win10 (installation media with guide here: https://www.microsoft.com/en-gb/software-download/windows10 ), afterwards buy the legit Win10 activation key and activate Win10.

It's unknown if you could activate Win10 with Win7 OEM key. But if you'd have installed and activated Win7 OEM, you can upgrade it to Win10 + activation. (That's how my builds are, they started out with Win7 Pro OEM.)
 
Other:
  1. About 4: I can mount win-live.img and what it contains does look as it's a viable installation media (bootmgr.efi, setup.exe, etc.)
Does the sources folder have a install.wim of several Gb?

You can just format and make a bootable partition on the usb and then copy paste all the files to the usb from the mounted .img.

If you have access to any working windows 7 system you can create a rescue media and then use dism to apply the install.wim to the hard drive.
 
The HP installation media has the unique property of being able to activate itself automatically using a preinstalled generic key and the SLIC table in the BIOS. If you use any other Win 7 install media then you will need to waste the cd-key on the sticker, which has never been used.

If you don't mind that and your end goal is Win 10, you could always try booting from Win 10 install media and entering your cd-key when asked. That part shows up pretty early in the installation process so it's not like you'd waste much time.

Otherwise I'd use a utility like rufus to create a "Standard Windows installation" USB from any Win 7 .iso (don't forget to specify MBR/BIOS or GPT/non-CSM UEFI). Then overwrite all the files on it with the contents of your .img since only the boot sector is needed. Unless you'd prefer playing with diskpart and bootsect

Once it's installed and running, you are going to have to let WindowsUpdate do its thing for a very long time before you can even think about installing Windows 10 from the desktop. When you do, it should activate itself.