git, python3, ProperTree, mountEFI, GenSMBIOS, brew, svn, (command-line) emacs, GUI emacs and so on.
Could not create Apple ID
This Mac has been used to create too many new Apple IDs. Please contact Apple Support to request another Apple ID to use with this Mac.
Tips: on Ubuntu gparted.
Create a ntfs partition for macOS in Ubuntu. MacOS installer somehow can not create a partition. It can format a partition as APFS if there is a partition.
Make a label "Win" for Windows partition. Then MacOS installer recognizes the label and see it as "Win".
To change partition number, use gdisk on Linux. ,
$ sudo gdisk /dev/sda
type x (expert mode)
then type t (transfer)
then number of the partition,
then new number which will be used for that partition,
then w (write), then answer yes to write changes to drive.
clone and expand apfs partition
make a partition by gparted as exfat or so
Note: it does not have an option of partition type of APFS.
clone the parttion by dd on Ubuntu.
Repair the partition type id by gdisk on Ubuntu.
$ sudo gdisk /dev/sda
t (type)
6 (/dev/sda6)
AF0A (APFS, note AF00: hfs+)
Repair the size of partition (set by dd).
boot from recovery.dmg
run terminal
$ diskutil # to show the commands.
$ diskutil list # to show all the partition.
$ diskutil apfs resizeContainer disk0s6 limits # to show the max size
It shows 251.7GB in my case.
$ diskutil apfs resizeContainer disk0s6 251.7GB
It successfully resize macOS data volume!
re-install MacOS; it takes 3 hours.
Boot into Recovery Mode
boot
push "space" at OS selection to show all options.
select "Recovery.dimg", push Enter and wait until recovery mode boots up; it takes time to start recovery mode.
select "diskUtility" at Main Menu and push "continue".
select "MacOS" partition and push "Erase"; select APFS to format.
back to the main menu; select reinstall MacOS; select the disk partition.