Cloning a 512 bytes per sector HDD to a 4096 bytes per sector SSD

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

2 Answers

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

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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like