sickcodes / osx-serial-generator

Mac Serial Generator - Generate complete sets of Serial Numbers for OSX-KVM, Docker-OSX and of course, OpenCore.
GNU General Public License v3.0
1.6k stars 159 forks source link

"--create-bootdisks" doesn't work as expected #15

Open ivankoma opened 3 years ago

ivankoma commented 3 years ago

If I run ./generate-unique-machine-values.sh -c 1 --model iMacPro1,1 --custom-plist=./config-custom.plist --create-bootdisks file ./bootdisks/AAAAAAAAAAAA.OpenCore-nopicker.qcow2 with a size of 5.9MiB is created however /osx-serial-generator/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 is 16.1MiB.

  1. What does -nopicker argument do?
  2. Why is generated OpenCore.qcow2 smaller in size compared to /OSX-KVM/OpenCore-Catalina/OpenCore.qcow2?

When I run these commands:

rm ./OSX-KVM/OpenCore-Catalina/OpenCore.qcow2
rm ./OSX-KVM/OpenCore-Catalina/config.plist
cp ./bootdisks/AAAAAAAAAAAA.OpenCore-nopicker.qcow2 ./OSX-KVM/OpenCore-Catalina/OpenCore.qcow2
cp ./plists/AAAAAAAAAAAA.config.plist ./OSX-KVM/OpenCore-Catalina/config.plist

And try to run:

cd OSX-KVM/
./OpenCore-Boot.sh

I get these messages:

,0x0) /Sata (Ox2,OxFFFF .0x0)
BdsDxe: starting Boot0001 “UEFI QEMU HARDDISK QM00017 ” from PciRoot (0x0) /Pci (Ox
3,0x0) /Sata (Ox2,OxFFFF,0x0)
BS: Starting OpenCore application...
BS: Booter path - \EFI\BOOT\BOOTX64.EFI
OCFS: Trying to locate filesystem on 7E77DA98 7E88AF98
OCFS: Filesystem DP - \EFI\BOOT\BOOTX64.EFI
BS: Trying to load OpenCore image...
BS: Relative path - EFI
BS: Startup path - EFINOpenCore.efi (0)
BS: Fallback to absolute path - EFI\OC\OpenCore.efi
BS: Read OpenCore image of 892928 bytes
OCM: Loaded image has DeviceHandle 7E77DA98 FilePath 7DB24F98 ours DevicePath 7D
B2A018
OC: Starting OpenCore. . .
OC: Booter path - EFI\OC\OpenCore-efi
OCFS: Trying to locate filesystem on 7E77DA98 7DB24F98
OCFS: Filesystem DP - EFI\OC\OpenCore.efi
OC: Absolute booter path - EFI\OC\OpenCore.efi
OC: Storage root EFI\OC\OpenCore .efi
OCST: Missing vault data, ignoring...
OC: OcMiscEarlyInit...
OC: Failed to load configuration!

It says here in order to generate a valid OpenCore.qcow2 file from config.plist to execute:

cd OpenCore-Catalina
rm -f OpenCore.qcow2
sudo ./opencore-image-ng.sh --cfg config.plist --img OpenCore.qcow2

Now file OpenCore.qcow2 is 16.1MiB and

cd ..
./OpenCore-Boot.sh
  1. It seems to me that argument --create-bootdisks doesn't work as expected.
ivankoma commented 3 years ago

It seems to me that there is something wrong with https://github.com/kholia/OSX-KVM. I cannot generate valid OpenCore.qcow2 from my custom config.plist because I get the same mentioned error: OC: Failed to load configuration!

git clone https://github.com/kholia/OSX-KVM.git
git clone https://github.com/sickcodes/osx-serial-generator.git
cd OSX-KVM/OpenCore-Catalina/
rm OpenCore.qcow2; sudo ./opencore-image-ng.sh --cfg config.plist --img OpenCore.qcow2
cd ../../osx-serial-generator/
./generate-unique-machine-values.sh --bootdisks
cd OSX-KVM/OpenCore-Catalina
rm OpenCore.qcow2; sudo ./opencore-image-ng.sh --cfg config.plist --img OpenCore.qcow2

Notice that OSX-KVM repo produces bad OpenCore.qcow2 file with a size of 5.9MiB instead od 16.1MiB like osx-serial-generator does.

When I place same files:

BaseSystem.img
mac_hdd_ng.img`

and run ./OpenCore-Boot.sh only the one in osx-serial-generator/OSX-KVM repo works.

sickcodes commented 3 years ago

@ivankoma in my config.plist for OS X serial generator, there are placeholders, which need to be manually changed.

That's why I made the generator :)

sickcodes commented 3 years ago

Warning this is broken on 5.14 Kernel.

takov751 commented 2 years ago

I was able to create a boot image. Just run into a boot loop after finishing fresh install of osx . Recovery baseimg working. I'm still investigating if it's related.