Changing OpenCoreBoot's config.plist to allow to select the default boot disk via AllowSetDefault #47

Closed
opened 2025-12-28 23:22:33 +01:00 by adam · 5 comments
Owner

Originally created by @sck on GitHub (Jun 21, 2020).

I have been trying to enable AllowSetDefault in OpenCore-Catalina's config.plist. There is a script called opencore-image-ng.sh which builds a new OpenCore.qcow2 and also uses the config.plist. But the generated OpenCore.qcow2 never behaves like the original qcow2 (even when not changing the config.plist at all). It prints start pxe over ipv4 in the beginning and after pressing ESC it just starts the UEFI shell, and doesn't offer to boot into OSX at all

Originally created by @sck on GitHub (Jun 21, 2020). I have been trying to enable `AllowSetDefault` in `OpenCore-Catalina`'s `config.plist`. There is a script called `opencore-image-ng.sh` which builds a new `OpenCore.qcow2` and also uses the `config.plist`. But the generated `OpenCore.qcow2` never behaves like the original qcow2 (even when not changing the `config.plist` at all). It prints `start pxe over ipv4` in the beginning and after pressing ESC it just starts the UEFI shell, and doesn't offer to boot into OSX at all
adam closed this issue 2025-12-28 23:22:33 +01:00
Author
Owner

@sickcodes commented on GitHub (Jun 21, 2020):

You can try loop mounting the qcow image or just hexedit it and turn that value on.

@sickcodes commented on GitHub (Jun 21, 2020): You can try loop mounting the qcow image or just hexedit it and turn that value on.
Author
Owner

@sck commented on GitHub (Jun 24, 2020):

I've now been able to rebuilt OpenCoreBoot with a new config.plist:

For libguestfs/loop mounting I added these packages to my Dockerfile:

RUN sudo pacman -S --noconfirm linux cpio
RUN sudo pacman -S --noconfirm unzip

OpenCore is missing some files for the image to be rebuilt, so I reinstalled it under /home/arch/OSX-KVM/OpenCore-Catalina

F="OpenCore-0.5.9-DEBUG.zip"

test -f $F || (
  wget https://github.com/acidanthera/OpenCorePkg/releases/download/0.5.9/$F
  unzip -o $F
)

Now the image can be rebuilt without errors:

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

For enabling to boot automatically I removed -device ide-hd,bus=sata.3,drive=InstallMedia and -drive id=InstallMedia,if=none,file=$BASESYSTEM,format=raw from the qemu parameters and used this patch for config.plist:

                        <key>HideAuxiliary</key>
                        <false/>
                        <key>PickerAttributes</key>
-                       <integer>1</integer>
+                       <integer>0</integer>
                        <key>PickerAudioAssist</key>
                        <false/>
                        <key>PickerMode</key>
-                       <string>External</string>
+                       <string>Builtin</string>
                        <key>PollAppleHotKeys</key>
                        <true/>
                        <key>ShowPicker</key>
-                       <true/>
+                       <false/>
                        <key>TakeoffDelay</key>
                        <integer>0</integer>
                        <key>Timeout</key>
                        <key>Timeout</key>
-                       <integer>0</integer>
+                       <integer>5</integer>
                </dict>
                <key>Debug</key>
                <dict>

This will then boot from the first hdd which is where my macos installation resides.

@sck commented on GitHub (Jun 24, 2020): I've now been able to rebuilt OpenCoreBoot with a new config.plist: For libguestfs/loop mounting I added these packages to my Dockerfile: ``` RUN sudo pacman -S --noconfirm linux cpio RUN sudo pacman -S --noconfirm unzip ``` OpenCore is missing some files for the image to be rebuilt, so I reinstalled it under `/home/arch/OSX-KVM/OpenCore-Catalina` ``` F="OpenCore-0.5.9-DEBUG.zip" test -f $F || ( wget https://github.com/acidanthera/OpenCorePkg/releases/download/0.5.9/$F unzip -o $F ) ``` Now the image can be rebuilt without errors: ``` sudo rm -f OpenCore.qcow2; sudo ./opencore-image-ng.sh --cfg config.plist --img OpenCore.qcow2 ``` For enabling to boot automatically I removed `-device ide-hd,bus=sata.3,drive=InstallMedia` and `-drive id=InstallMedia,if=none,file=$BASESYSTEM,format=raw` from the qemu parameters and used this patch for config.plist: ``` <key>HideAuxiliary</key> <false/> <key>PickerAttributes</key> - <integer>1</integer> + <integer>0</integer> <key>PickerAudioAssist</key> <false/> <key>PickerMode</key> - <string>External</string> + <string>Builtin</string> <key>PollAppleHotKeys</key> <true/> <key>ShowPicker</key> - <true/> + <false/> <key>TakeoffDelay</key> <integer>0</integer> <key>Timeout</key> <key>Timeout</key> - <integer>0</integer> + <integer>5</integer> </dict> <key>Debug</key> <dict> ``` This will then boot from the first hdd which is where my macos installation resides.
Author
Owner

@sickcodes commented on GitHub (Jul 4, 2020):

You’re awesome dude, pull request or can I include this in the code for you?

@sickcodes commented on GitHub (Jul 4, 2020): You’re awesome dude, pull request or can I include this in the code for you?
Author
Owner

@sck commented on GitHub (Jul 4, 2020):

Feel free to use what I documented! I have a slightly different setup atm, so not easy to generate a pull request...

@sck commented on GitHub (Jul 4, 2020): Feel free to use what I documented! I have a slightly different setup atm, so not easy to generate a pull request...
Author
Owner

@daraul commented on GitHub (Jul 14, 2020):

Any way we can see the code, @sck? Even if it's not in a PR, it would still be useful.

@daraul commented on GitHub (Jul 14, 2020): Any way we can see the code, @sck? Even if it's not in a PR, it would still be useful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#47