feat(quickget): integrate OpenCore into macOS disk image by default#1811
Merged
flexiondotorg merged 4 commits intomasterfrom Jan 24, 2026
Merged
feat(quickget): integrate OpenCore into macOS disk image by default#1811flexiondotorg merged 4 commits intomasterfrom
flexiondotorg merged 4 commits intomasterfrom
Conversation
Create macOS VMs with OpenCore embedded in the EFI partition of disk.qcow2 instead of using a separate OpenCore.qcow2 file. This simplifies VM management by reducing from two disk images to one. Implementation: - Add create_macos_disk_with_opencore() using mtools/sgdisk for cross-platform EFI partition creation without mounting or root privileges - Add download_opencore() to extract OpenCore files from OSX-KVM image - Use LC_ALL='' with mcopy to prevent FAT directory name mangling - Adjust disk size threshold for macOS integrated mode (1GB vs 1.5MB) Backwards compatibility: - If OpenCore.qcow2 exists, use legacy two-disk boot method - If mtools/sgdisk unavailable, fall back to legacy method automatically New dependencies: mtools, gptfdisk (added to devshell.nix and package.nix) Closes #1720
Contributor
There was a problem hiding this comment.
3 issues found across 4 files
Confidence score: 3/5
- There is some regression risk:
quickget’s tool check only verifiesmcopy/sgdisk, but laterrequire_mtools()needsmformat/mmd, which can cause the script to exit instead of gracefully falling back. - Two
mcopyinvocations inquickgetare missing theLC_ALL=''prefix used elsewhere to prevent FAT directory name mangling, so filenames could be altered unexpectedly. - Pay close attention to
quickget- ensure all required mtools are checked up front andLC_ALLis set consistently formcopy.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="quickget">
<violation number="1" location="quickget:307">
P2: Missing `LC_ALL=''` prefix. The `download_opencore()` function uses `LC_ALL=''` with mcopy to prevent FAT directory name mangling (as noted in the comment at line 377), but this mcopy command lacks it. For consistency and to prevent potential name mangling issues, add `LC_ALL=''` here as well.</violation>
<violation number="2" location="quickget:314">
P2: Missing `LC_ALL=''` prefix on this mcopy command as well, for consistency with `download_opencore()` which uses it to prevent FAT directory name mangling.</violation>
<violation number="3" location="quickget:2303">
P1: Incomplete tool check breaks graceful fallback. This check only verifies `mcopy` and `sgdisk`, but `require_mtools()` (called later) also requires `mformat` and `mmd`. If those are missing, the script will exit instead of falling back to the legacy OpenCore.qcow2 method.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create macOS VMs with OpenCore embedded in the EFI partition of disk.qcow2 instead of using a separate OpenCore.qcow2 file. This simplifies VM management by reducing from two disk images to one.
Implementation:
Backwards compatibility:
New dependencies: mtools, gptfdisk (added to devshell.nix and package.nix)
Closes #1720
Type of change
Checklist: