0

I have a 750GB drive that is failing, but still functional (I already backed up what can't simply be reinstalled), and I would like to reinstall Win10 on the SSD (I assume my key should still be valid, but this is not the problem here), probably in the 500GB gap, but I could add another HD if that's better.

  • I know there were many problems installing Windows after Linux and I would like to avoid scrapping everything on the SSD, even if I could theoretically do it, as I have backups and the Z2 array, which I assume won't be touched; OTOH, I seem to understand these problems are (almost?) gone with modern UEFI boot.

I have a rather modern PC with:

  • 1TB SSD containing Linux Mint 20.2 "Ulyssa", with ~500GB of free space for sda2/sda3, and another ~350Gb of free space at end
    /dev/sda1       2048     264191    262144   128M EFI System
    /dev/sda4  975587328  983400447   7813120   3,7G Linux swap
    /dev/sda5  983400448 1283399679 299999232 143,1G Linux filesystem
    
  • 4x identical 3TB drives in a ZFS Z2 array, providing space for /home and other data
  • 750GB disk where Win10 is installed with its normal partitioning:
    /dev/sdb1     2048    1023999    1021952  499M Windows recovery environment
    /dev/sdb2  1024000    1228799     204800  100M EFI System
    /dev/sdb3  1228800    1261567      32768   16M Microsoft reserved
    /dev/sdb4  1261568 1465145343 1463883776  698G Microsoft basic data
    

What steps should I follow to maximize my success chances?

  • A full guide would be best, but a list of possible pitfalls and how to steer clear would also be welcome; I am aware of this answer, but I'm unsure if it applies to Win10

WIP: I will update this section to reflect my attempts.

Following @JW0914 input I tried to create an "image" on my NAS (syno0).

I opened a PowerShell as Administrator and then:

PS C:\WINDOWS\system32> New-SmbMapping -LocalPath 'X:' -RemotePath '\\syno0\Store'

Status Local Path Remote Path
------ ---------- -----------
OK     X:         \\syno0\Store


PS C:\WINDOWS\system32> Dism /Capture-Image /ImageFile:"X:\recover\Base.wim" /CaptureDir:"C:" /Name:"Windows Backup" /Description:"Base Image 2021.03.20 @ 16:20" /Compress:Max /CheckIntegrity /Verify /ScratchDir:"X:"

Strumento Gestione e manutenzione immagini distribuzione
Versione: 10.0.19041.1


Errore: 32

Impossibile accedere al file. Il file è utilizzato da un altro processo.

Il file di registro di Gestione e manutenzione immagini
distribuzione è disponibile in C:\WINDOWS\Logs\DISM\dism.log
PS C:\WINDOWS\system32>

Sorry for the Italian text, it essentially says:

Error: 32
Impossible to access file. File is in use by another process. 

I assume I should try to issue this command either from "Safe mode" or from "Preboot Environment", but I don't know how (I'm a Linux guy). Any pointer welcome.

Another problem I see with "instructions" is I assume I will have to make (at least) two images: one for my setup and one for WinPE, right?

If so I have no idea how to access WinPE partition from Win Dism.

Another problem is I would like to add the partitons to my SSD, so I think using Diskpart ... clean could be trouble; also here I would need some guidance, if possible.

ZioByte
  • 491
  • 1
  • 6
  • 20
  • Don't reinstall Windows, simply capture an image of the Windows OS and WinRE partitions via [this](https://superuser.com/a/1581804/529800) answer, using Steps 1 - 6 in the last section of the answer to create the required partitions, applying the captured WIMs to their respective partitions. _(**Do not** use `bootrec` to fix any Windows boot issues (part of Step 5), instead use [this](https://superuser.com/a/1624974/529800) answer to fix them from Linux, as `BootRec` will destroy GRUB boot)_ – JW0914 Mar 20 '21 at 12:49
  • @JW0914: thanks, but I'm not very familiar with curent windows best practices. I used win till some time ago (xp) then switched to Linux (mostly). I updated OP reflecting what I tried (and failed). A bit more detail would be needed, if possible. – ZioByte Mar 20 '21 at 17:11
  • Second bullet in the answer explains why you're having issues, as you cannot image the system partition while booted to it - boot to WinRE. You technically don't have to WIM the WinRE partition, as you can set it back up via `ReAgentC`, however since it only takes ~10s to capture a WIM of it, it's more efficient since you're already doing the OS partition. You don't need to issue `clean`, simply create the required partitions from the free space available [WinRE, EFI, MSR, and OS] – JW0914 Mar 20 '21 at 20:47

0 Answers0