corpnewt / gibMacOS

Py2/py3 script that can download macOS components direct from Apple
MIT License
5.92k stars 780 forks source link

No partitions located on disk #66

Open Venipa opened 4 years ago

Venipa commented 4 years ago

System Info


                                         ```...--://+oo`  Venipa@DESKTOP-SATVO1U
                           ```...--://+oooossyyyyyyyyyy`  OS: Windows 10 Enterprise
             ```...--:/+- .osssyyyyyyyyyyyyyyyyyyyyyyyy`  Version: 1909 (OS Build 18363.535)
   ..--:/++ooosssyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`  Manufacturer: Micro-Star International Co., Ltd. To be filled by O.E.M. MS-7A34
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`  Uptime: 1d 3h 35m
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`  Shell: C:\WINDOWS\system32\cmd.exe
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`  CPU: AMD Ryzen 7 1700X Eight-Core Processor         
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`

  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
  `yyyyyyyyyyyyyyyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
   ..--:/++ooosssyyyyyyy: -yyyyyyyyyyyyyyyyyyyyyyyyyyyy`
             ```...--:/+- .oossyyyyyyyyyyyyyyyyyyyyyyyy`
                           ```...--:/++ooosssyyyyyyyyyy`
                                         ```...--::/+oo`
  #######################################################
 #            Installing Clover - Latest               #
#######################################################

Gathering info...
 - Checking https://api.github.com/repos/dids/clover-builder/releases
 - Got CloverISO-5103.tar.lzma
Downloading...
Downloaded 2.54 MB of 2.54 MB (100.00%)
Extracting CloverISO-5103.tar.lzma...
Extracting CloverISO-5103.tar...
Extracting EFI from Clover-v2.5k-5103-X64.iso...
Extracting boot0af from Clover-v2.5k-5103-X64.iso...
Extracting boot1f32alt from Clover-v2.5k-5103-X64.iso...
Extracting boot6 from Clover-v2.5k-5103-X64.iso...
No partitions located on disk!

Press [enter] to return...
JanKost commented 4 years ago

This answer is pretty late, but maybe someone can still use it:

I ran into the "No partitions located on disk!" error too, with a brand spanking new Win 10 install, no meddling thrid party software and a bunch of different USB drives. It only happened in my case if I used the "g" option in the main menu. MBR worked fine, curiosly. Anyhow, I got hella frustrated about the lack of a solution & tinkered around a bit. It looks like Windows is naughty and sneaks in a system reserved partition whenever it can. This happened in my case specifically when running the DiskPart command "convert gpt" on an empty disk after cleaning it. It also happened when creating a new partition that was smaller than the available unallocated space. Now, if you look at "diskpart_erase" in MakeInstall.py, assuming "gpt" is true, it calls the DiskPart commands "clean" followed by "convert gpt" and then "create partition primary size=200". I assume corp expects this to create partition 1. There is, however, already a hidden MSR partition 1 (created when running "convert gpt"), so your BOOT partition is actually partition 2, and your empty HFS+ partition becomes partition 3. I didn't dig into the code deep enough to find out when and why this causes a failure, but I was able to work around the issue in my case by modifying the diskpart-skript for gpt disks in "diskpart_erase". I changed the contents of dp_script = "\n".join([...]) in MakeInstall.py from:

        "select disk {}".format(disk.get("index",-1)),
        "clean",
        "convert gpt",
        "create partition primary size=200",
        "format quick fs=fat32 label='BOOT'",
        "create partition primary id={}".format(self.hfs_id)

(as seen highlighted in the screenshot below) to:

        "select disk {}".format(disk.get("index",-1)),
        "clean",
        "convert gpt",
        "sel part 1",
        "del part override", #remove cheeky autogenerated MSR partition

        #workaround to prevent Windows from placing an MSR partition in front of our new BOOT partition
        "create partition primary", #hog all space
        "sel part 1",
        "shrink", #free all space
        "extend size=200", #extend to 200MB

        "create partition primary",
        "sel part 2",
        "set id={}".format(self.hfs_id),
        "sel part 1",
        "format quick fs=fat32 label='BOOT'",
        "assign"

I could then sucessfully run the remainder of MakeInstall for Catalina on two different USB drives that prevoiusly failed with the no partition error. Note that I used the openCore option instead of Clover.

gib

Mathis436 commented 4 years ago

This response is very late but i had used a similar edit to the script also. mine was not a clean as yours....any ways, there is still a failure when using disks that are identified as removable verses fixed. if i use a sata to usb adapter to connect a HDD and run the script, all goes well. if i use a usb flash drive or sdcard reader which are identified as removable the scrip fails with zero error.

just wanted to share my findings and hope this helps someone else.

p.s. still haven't found an accurate way to work around this.