Skip to content

Instantly share code, notes, and snippets.

@phnahes
Created April 17, 2020 21:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phnahes/4b638ece78f53739b83c269ef149fff1 to your computer and use it in GitHub Desktop.
Save phnahes/4b638ece78f53739b83c269ef149fff1 to your computer and use it in GitHub Desktop.
Clone HDD to SSD and using SSD for Boot and System (UEFI)
# Boot a LiveCD linux and install clonezilla
apt update && apt install clonezilla -y
# Using Gparted, clone partitions in the same type, size and flags from source disk (sda) on target target(sdb)
# After, using clonezilla, clone part_to_part
# sda1 to sdb1
# sda2 to sdb2
# sda3 to sdb3
#
# Use option -K for not create partition table on target disk
# On clone finish, is needed boot using Windows recovery and open Command Prompt, and use this commands:
# 1- Open diskpart
diskpart
# 2- List installed disks (Result are disk 0 and disk 1)
list disk
# 3- Select the new disk (SSD - Disk 1)
sel disk 1
# 4- Show partitions (like Part 1 - System, Part 2 - Hidden, Part 3 - Windows)
list part
# or volume, but volume show all volumes (all disks, be careful)
list vol
# 5- Select UEFI Boot Partition to assing a letter
sel part 1
# or select vol (such as volume 5 is a Partition UEFI boot)
sel vol 5
assing letter=B:
exit
# Change the BCD to use Windows on SSD Disk, using commands bellow:
B:
cd B:\EFI\Microsoft\EFI
dir BCD
# Show how BCD is actually
bcdedit /store B:\EFI\Microsoft\EFI\BCD /enum
# Alter necessary configurations
bcdedit /store B:\EFI\Microsoft\EFI\BCD /set {bootmgr} device partition=C:
bcdedit /store B:\EFI\Microsoft\EFI\BCDD /set {default} device partition=C:
bcdedit /store B:\EFI\Microsoft\EFI\BCD /set {default} osdevice partition=C:
# Check if altered
bcdedit /store B:\EFI\Microsoft\EFI\BCD /enum
# exit and reboot
# Enter on BIOS and select Boot priority for SSD Disk.
# On windows logon, remove old Windows Partition or unassign the Letter
@FoxColdMetal
Copy link

Works like a charm! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment