Migrate to 2TB

Migrate EFI, Windows10 and MacOS partitions.

  1. background
  2. I have a 1TB SSD with EFI, windows10 and MacOS partitions. I thought I should use a larger disk, because windows partition now has only <30GB free space. Also sleep does not work after upgrading memory from 8GB to 16Gb. So I thought I should enlarge a disk size i.e. 2TB.

    This is the screenshot of gparted of the original disk (1TB).

  3. Windows installation
    1. change the disk
    2. Remove the original 1TB disk and insert a new ssd disk of 2TB.
    3. Preparations: convert MBR to GPT with Ubuntu
    4. Windows Installation disk complained that MBR is not appropriate for Windows 11 installation, but you need a GPT disk.
      1. $ sudo parted /dev/sda
      2. (parted) mklabel gpt # which destroys all disk contents!!
      3. (parted) print
      4. (parted) quit
    5. Prep: made partitions
    6. First I made two partitions on Ubuntu: 2TB FAT32 for EFI and 1.4TB NTFS for Windows11. Also I made a free space available for MacOS at the end of disk; i.e. 400GB or so.
    7. Windows Installation
    8. boot from windows insatll media (with TPU off) and install windows 11. Then Windows11 has been successfully installed.

      This is the screenshot of gparted of the new disk (2TB) after windows11 installation.

      (I made a partition for macOS after win11 installation.)

      Windows installation made a couple of additional partitions other than win11 partition itself; Namely 1. Recovery partition, 2. EFI partition and 3. Reserved partitions.

      an additional EFI partition has been made even though I made a partiotion for EFI at the beginning of the disk. Hackintosh needs a EFI partition with more than 200mb. Windows made just a 100mb EFI partition, which is not sufficient if you would like to install MacOS.
  4. Adjstment for Win11
    1. migrate EFI partition; flags, uuid, etc
    2. A content copy of EFi partition is not enough due to UUID and boot flags which are stored outside of content space of the partitoin. So I made dd of /dev/sda4 to /dev/sda1. check the win11 bootable and it is bootable.
    3. delete /dev/sda4.
    4. First delete the contents of /dev/sda4. check it bootable. Then delete /dev/sda4 partition careflly. it is still bootable.
  5. /dev/sda1: which is EFI partition.
    1. copy the content of /dev/sdc1(original disk) to /dev/sda1.
    2. /dev/sdc1 has 500mb conetents. when copied, the ubuntu complained that disk space is not enough. dd from /dev/sda4 to /dev/sda1 limits the /dev/sda1 size only 100mb, which is the size of /dev/sda4. I tried to find the method of resizing /dev/sda1 because it acutally has 2GB. I only find it is not possible to resize fat32 partitions.
    3. recreate /dev/sda1
    4. I made a copy of EFI folder of /dev/sda1 and then deleted /dev/sda1 partition first and re-create it with 2GB size. the EFI folder was moved back to the newly made /dev/sda1. /dev/sda1/EFI/Microsoft is a boot loader for win10.
    5. a copy of OpenCore EFI to /dev/sda1
    6. change name of EFI on /dev/sda1 to EFI.win11. then make a copy of EFI and tool folder on /dev/sdc1 to EFI of /dev/sda1. Then remove Microsoft folder /EFI/Microsoft of /dev/sda1, which is for win10. Then make a copy of /EFI.win11/Microsoft to /EFI/ on /dev/sda1. check it still bootable via OC boot manager. Bootable.
  6. MacOS
    1. Made a partition for MacOS
    2. Made a partition for MacOS with gparted on Ubuntu. Unfortunately it does not support afs, but it only supports hfs+. So I made hfs+ partition for MacOS.
    3. dd from /dev/sdc5 to /dev/sda6.
    4. check /dev/sda6 bootable via oc boot manager. It failed.
    5. partition number adjustment.
    6. I thought partition number for MacOS should be 5, not 6, because the original macOS partiion is /dev/sdc5. I googled.
      1. $ sudo gdisk /dev/sda
      2. s # for sort the partitions.
      3. p # print the partition info. check the numbers.
      4. w # write partitions.
      This is the final partitions. 101mb unallocated space is originally for EFI partition created by win11 installer, which has been deleted because it is not necessary since we have a bigger EFI partition for win11 and macOS at the very beginning of the disk /dev/sda.

    7. AFS partitions.
    8. It failed to boot. I tried to boot from the recovery disk of MacOS. disk manager of MacOS recovery showed /dev/sda5 is MacOS extended not AFS. Now I remember that I formated the partition as hfs+ by gparted on Ubuntu. I thought I should re-create /dev/sda5 as AFS format. I did it. then I made dd from /dev/sdc5 to /dev/sda5 (not 6 anymore). Now macOS is bootable.

    Done!

    This is just a reminder for LX3. I will use the old 1TB SSD for LX3, which has only 256GB SSD. it is short in disk space.


Go back to Top: Doctor's Web Page

20240516