2

I bought a new SSD to replace my traditional HDD on my Windows 10 laptop. However, it seems my HDD is 512 bytes per sector (from msinfo32) and I cannot format the SSD to anything less than 4096 bytes per sector. How do I clone the HDD to the SSD? Do I need to format the SSD with 512 bytes per sector and if yes, how? The Windows format action only seems to support 4096 and higher bytes per sector. It seems popular cloning software do not support cloning between disks that have different bytes per sector. Also, the original HDD is 1TB while the SSD is 500GB.

5
  • 1
    "The Windows format action" -- this sounds like you're confusing bytes per disk sector with bytes per filesystem cluster.
    – user1686
    Jun 1, 2020 at 7:51
  • Now that you mention it, yes most likely. msinfo32 shows the SSD to be 4096 bytes per sector. Jun 1, 2020 at 7:54
  • As you plan cloning your hard drive, no need to format the destination drive.
    – OuzoPower
    Aug 11, 2021 at 13:17
  • I would recommend to check the partition alignment of the HDD. If the partitions are proper aligned there is no reason to just clone the HDD to the SSD.
    – Robert
    Aug 11, 2021 at 13:44
  • @electrophile Windows natively supports this using Dism to capture a WIM of the partition(s) you want to move to the new drive, then apply the WIM to the new partition(s), as the vast majority of Windows users have no need for partition-level or disk-level images since NTFS has been the default filesystem since Windows XP.
    – JW0914
    Aug 11, 2021 at 13:48

2 Answers 2

0

See this very similar question : 512B to 4KiB (Advanced Format) HDD cloning with dd

...and especially Jamie Hanrahan' answer.

You will have to see if you destination SSD is AF (Advanced Format), having 512 bytes emulation (logical sector size of 512).

As for the cloning, you can use Linux's dd if you don't need a log file. Use ddrescue, or hddsuperclone if you need one.

3
  • I have the perspective it's unacceptable for a Windows user to receive advice to use Linux tools to image Windows, as that's inefficient, forcing the user to rely on not only a non-native boot environment, but also on an image format, unsupported by Windows, both of which over-complicate imaging. (Ever come across advice telling a BSD or Linux user to boot to Windows or use Wine to back up their data? Normally I'd downvote such advice, but I believe that would be unfair to your answer since I've also posted an answer)
    – JW0914
    Aug 13, 2021 at 21:19
  • @JW0914: No need to use an image format. Just use a live distro that you boot from the DVD bay or a USB key, and use either a dock, an enclosure or an available SATA cable for the second target drive. Really don't understand where is the problem. This is almost daily operation for me.
    – OuzoPower
    Aug 17, 2021 at 9:39
  • Because it's inefficient to use Linux to image/clone Windows partitions, both from a time, and data integrity, perspective, which I cover in this answer: a user must create a LiveCD, boot it, look up commands to issue, check parity w/ another program (automatically done during WIM/ESD capture), then once completed, if a system partition was cloned the user will likely need to boot to WinRE to run BootRec. To image from Windows takes less time, has parity, and doesn't require an incompatible boot environment or need for a partition/disk-level clone.
    – JW0914
    Aug 19, 2021 at 14:58
0

Partition-level/disk-level images [contain offset, alignment, block size, etc.] are simply inefficient as NTFS has been the default filesystem since XP:

  • Windows has always natively supported cloning/imaging partitions (Windows ≥8: Dism | Windows ≤7: ImageX), with the vast majority of Windows users having no need for partition-level/disk-level images


PreReqs:

To clone/image the partition(s) from the old HDD to the new drive's partition(s):

  • OS Partition:
    This can only be imaged from WinPE/WinRE → Boot to WinPE [install USB] or WinRE:
    • WinPE [Windows Preinstallation Environment]
      Once the Install USB's GUI loads, open a terminal via Ctrl+Shift+F10
    • WinRE [Windows Recovery Environment]
      • Windows 8/10:
        SettingsUpdate & SecurityRecoveryAdvanced StartupTroubleshootingAdvancedCommand Prompt
        - or -
        Login/Lock Screen Power Menu → Hold Shift while seleting RestartTroubleshootingAdvancedCommand Prompt
      • Windows 7: F8 at boot → Repair your computerCommand Prompt

  • Any other partition: WinKey+ROpen: PowershellCtrl+Shift+OK


Partitioning:

  1. Initialize the new drive:
    DiskPartLis DisSel Dis # [new drive] → Clean → UEFI: Convert Gpt

  2. Create and format new partition(s):
    (if configuring any OS partitions, use 2.2)
    1. Non-System Partition(s):
      • Whole drive as a single partition:
        # BIOS:
          Cre Par Pri Offset=1024
        
        # UEFI:
          Cre Par Pri Offset=1024 id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        
        Format Quick Fs=NTFS Label=Data
        Assign Letter=D
        Exit
        
      • Multiple partitions:
        # Multiply GB size wanted by 1024: 200*1024=204800
        
          # BIOS:
            Cre Par Pri Offset=1024 size=204800
        
          # UEFI:
            Cre Par Pri Offset=1024 size=204800 id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        
          Format Quick Fs=NTFS Label=Data
          Assign Letter=D
        
          # Next partition(s)...
            # Remove: Offset=1024
            # Modify: Label=Data, Letter=D
        
          Exit
        

    2. System Partitions:
      1. WinRE:
        (WinRE.wim is ~300MB in size and partition should have ~320MB free)
        # BIOS:
          Cre Par Pri Offset=1024 Size=665 Id=27
          Format Quick Fs=NTFS Label=WinRE
        
        # UEFI:
          Cre Par Pri Offset=1024 Size=665 Id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
          Format Quick Fs=NTFS Label=WinRE
          Gpt Attributes=0x8000000000000001
        
      2. Boot: (EFI | MSR)
        # BIOS:
          Cre Par Pri Size=100
          Format Quick Fs=NTFS Label=Boot
          Active
        
        # UEFI:
          Cre Par EFI Size=100
          Format Quick Fs=FAT32 Label=EFI
          Assign Letter=Y
          Cre Par Msr Size=16
        
      3. OS:
        # Multiply GB size wanted by 1024: 200*1024=204800
        
          # BIOS:
            Cre Par Pri size=204800
        
          # UEFI:
            Cre Par Pri Size=204800 Id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        
          Format Quick Fs=NTFS Label=System
        
      4. Data:
        # Multiply GB size wanted by 1024: 225*1024=230400
        
          # BIOS:
            Cre Par Pri size=230400
        
          # UEFI:
            Cre Par Pri size=230400 id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        
          Format Quick Fs=NTFS Label=Data
          Assign Letter=D
        
          # Next partition(s)...
            # Modify: Label=Data, Letter=D
        
          Exit
        


Imaging:

(PowerShell cmdlets)

  1. Capture a WIM of the HDD's partition(s):
    (Specify exclusions or exceptions by creating a WimScript.ini config file)
    # Windows ≥8: DISM
      Dism /Capture-Image /ImageFile:"Z:\Base.wim" /CaptureDir:"C:" /Name:"Transfer Image" /Description:"Base Image 2021.08.13 @ 09:00" /Compress:Max /CheckIntegrity /Verify /ScratchDir:"Z:"
    
    # Windows XP ≤ 7: ImageX
      ImageX /Capture "C:" "Z:\Base.esd" "Transfer Image" "Base Image 2021.08.13 @ 09:00" /Compress:Recovery /Check /Verify /ScratchDir:"Z:\"
    
    • Use /Compress:Fast if not saving captured image to an SSD (sacrifices size for speed)
    • Size Contstraints: split images into multiple read-only .swm files via /Split-Image

  2. Apply WIM:
    1. Ensure correct index [image] is being applied by getting Image Info:
      Dism /Get-ImageInfo /ImageFile:"Z:\Base.wim"
      
    2. # Windows ≥8: DISM
        Dism /Apply-Image /ImageFile:"Z:\Base.wim" /Index:1 /ApplyDir:"C:" /CheckIntegrity /Verify /ScratchDir:"Z:"
      
      # Windows XP ≤ 7: ImageX
        ImageX /Apply "Z:\Base.wim" 1 "C:" /Check /Verify /ScratchDir:"Z:\"
      
    3. If Applying an OS Image: (prior to exiting WinPE/WinRE)
      # BIOS:
        BootRec /FixMBR && BootRec /FixBoot && BootRec /RebuildBCD
      
      # UEFI:
        # With existing bootable EFI partition:
          BootRec /FixMBR && BootRec /RebuildBCD
      
        # Without existing bootable EFI partition:
          # Select and Mount EFI partition on new drive:
            DiskPart → Lis Dis → Sel Dis 2 → Sel Par 2 → Assign Letter=Y
      
          # Create EFI directories and enter:
            MkDir "Y:\EFI\Microsoft\Boot"
            Cd /d "Y:\EFI\Microsoft\Boot"
      
          # Create EFI boot structure:
            BootRec /FixBoot
      
            # If Access Denied error occurs (C: is applied OS image):
              BcdBoot C:\Windows /s C: /f UEFI
      
        # Resolve any other boot issues:
          BootRec /FixMBR && BootRec /RebuildBCD
      


Additional information:
What is the most efficient, native way to image a Windows partition?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.