disk exchanges: LX3 256gb to 1000gb


Before: /dev/sda
After: /dev/sdc
To Do:
  1. Ubuntu
    1. sudo parted -l
      Partition Table: gpt
    2. dd if=/dev/sda of=/dev/sdc bs=256M status=progress # whole disk copy
  2. remove the old disk and insert the new disk.
  3. check the boots both windows and macos.
  4. NTFS expansion on Windows
    1. minipartition wizard in windows.
      1. delete the macOS parttion.
      2. move the windows recoverty partition by 300gb.
      3. extend the windows partition by 300gb.
  5. APFS expansion on Ubuntu
    1. gparted: new partition /dev/sda5 as ext4
    2. gdisk /dev/sda
    3. (gdisk) set 5 type 7C3457EF-0000-11AA-AA11-00306543ECAC # APFS type for sda5 (gdisk) print # check the code as FFFF (/dev/sdc5 is also set FFFF)
    4. dd if=/dev/sdc5 of=/dev/sda5 bs=256M status=progress # apfs copy
    5. boot macOS. It is bootable but partition size has been now expanded but its container size is stil small.
  6. APFS container expansion on macOS
    1. boot from recovery disk.
    2. See below, if it is a hackintosh and you need to modify EFI of the recovery disk.
      Find the identifier of your EFI with "diskutil list" and mount it with "sudo diskutil mount disk0s1". After mounting,it will show up in finder as a new drive. (see this )
    3. utilities -> terminal # disk utility is not that reliable.
    4. $ diskutil apfs resizeContainer disk0s5 0 # The 0 argument tells the system to use all available free space. Command line $diskutil is more reliable.
    5. boot macOS. now the container is expanded!

That is it!




Go back to Top: Doctor's Web Page

Since 20260329