Mactoy v0.4.0 — Secure Boot toggle, MBR update repair, tarball cache, sidebar selection
Three issues from the tracker, plus a bootloader-corruption bug in Update Ventoy that turned up while investigating one of them. Thanks to @Bomret for #9, @poshpaws for #8 and @d6v5nhcvzs-afk for #7.
Do this if you've used Update Ventoy before
If you updated a Ventoy stick with Mactoy v0.3.0, v0.3.1 or v0.3.2, and that stick was originally created by Ventoy2Disk with its default MBR partition style, run Update Ventoy on it again with v0.4.0. The earlier versions damaged its legacy-BIOS bootloader (details below). Your ISOs are not affected, and the stick still boots on UEFI machines, so you may not have noticed.
Sticks that Mactoy itself installed are GPT and were never affected.
What's new
Secure Boot support toggle (#9)
Ventoy's EFI partition ships with BOOTX64.EFI being the UEFI shim, which then finds its way to the real GRUB (grubx64_real.efi). That's what lets a Ventoy stick boot on a PC with Secure Boot on. It's also one more thing that has to work on the firmware you're booting: the report in #9 is a 2011 iMac that freezes in the shim with nothing on screen, while the same stick boots fine if GRUB is started directly.
Ventoy2Disk has an option for this (-S, or Secure Boot Support unticked in the GUI) that rewrites the EFI partition so BOOTX64.EFI is GRUB and the shim, MokManager and enrolment certificate are gone. Mactoy had no equivalent. Now it does:
- Install Ventoy has a Secure Boot support switch. On by default, same as Ventoy2Disk. Turn it off for sticks meant for Macs, or for PCs that hang on a blank screen when starting the drive. A stick with it off won't boot on a PC while that PC's Secure Boot is enabled.
- Update Ventoy has the same switch, starting at whatever the drive currently has. Leave it alone and the update keeps the drive's layout. Flip it and the update converts the drive — so a stick that freezes on your Mac can be fixed without erasing its ISOs.
Mactoy does the conversion on the 32 MiB image in memory before writing it, rather than editing the partition on the stick afterwards, so there's no moment where the drive holds a half-converted EFI partition. The result matches what vtoycli partresize -s produces, file for file. Checked against the real Ventoy 1.1.17 image: fsck_msdos reports it clean, and BOOTX64.EFI read back through macOS's FAT driver is byte-identical to the original grubx64_real.efi.
Update Ventoy no longer damages MBR-style sticks
v0.3.0 treated two bytes on the disk (offsets 92 and 17908) as a "secure boot on/off" flag and rewrote them at the end of every update. They aren't a flag. They're GRUB's pointers from boot.img to core.img and from core.img's first sector to the rest of it, and Ventoy only patches them on GPT disks, where core.img lives at LBA 34 instead of LBA 1.
On a GPT stick Mactoy's misreading happened to produce the correct values. On an MBR stick it wrote 0x20 into boot.img's pointer — sending the BIOS bootloader to LBA 32 instead of LBA 1 — and 0x21 over a byte in the middle of core.img. UEFI boot uses neither, so the stick keeps working on UEFI machines and fails only on legacy-BIOS ones.
v0.4.0 writes those bytes on GPT only. Re-running Update repairs an affected stick, because boot.img and core.img are rewritten in full each time.
The same misreading is why the Update tab said "Secure boot is enabled" for every GPT stick. Detection now looks for grubx64_real.efi on the EFI partition, the way Ventoy2Disk does.
Ventoy is downloaded once, not every run (#8)
The downloader has had a SHA-256-verified cache since early on, but the app gave the helper a new randomly-named work folder on every run, so the cache never hit. Those folders were never deleted either — about 43 MB each, owned by root, sitting in your temp folder until macOS purged them.
The helper now keeps the tarball in /Library/Application Support/Mactoy/Cache/ (current version only, ~20 MB, still checked against Ventoy's published sha256.txt every time it's used), extracts to a private per-run folder, and deletes that folder when the run ends.
Sidebar: any part of a drive card is clickable (#7)
With two drives plugged in, the second one often couldn't be selected. The drive cards are SwiftUI .plain buttons, which only respond to clicks on their label's opaque content. A click-grid test on macOS 26 showed exactly that: the icon and the lines of text responded, and the rest of the card — most of it — did nothing, while still looking like one big button. The whole card is now the click target.
Also fixed while in there: clicking a drive didn't re-run Ventoy detection, so the Update tab could keep describing the previously-selected drive. (The helper re-checks the drive before writing, so this was misleading rather than dangerous.)
Smaller things
- The confirmation sheet now says whether Secure Boot support will be on or off, and that choice is locked in when you confirm — Retry after a failure uses it too, whatever the toggle shows by then.
- Mactoy checks the helper's version before sending it work. If another copy of Mactoy on your Mac owns the helper registration, you get a message saying so instead of an install done by the old helper's rules.
Install
# Download Mactoy-0.4.0.dmg from the release assets.
open Mactoy-0.4.0.dmg
# Drag Mactoy.app into /Applications.
Apple-notarized. Drop-in over v0.3.2 — no re-approval of the helper needed.
Verification
swift build clean on Mactoy and mactoyd.
- Test suite passes, with 28 new tests covering the EFI-partition conversion (against FAT16 fixtures built with
newfs_msdos), long-file-name parsing, corrupt-FAT rejection, the exact bytes Update writes on MBR vs GPT, cache and run-folder handling, sidebar selection, and confirmation capture.
- Independent code review of the diff before tagging.
- End-to-end in QEMU, using the real install/update code against disk images (harness in
scripts/e2e/): sticks written with Secure Boot support on and off boot to the Ventoy menu under UEFI (OVMF) and legacy BIOS (SeaBIOS); an on → off update keeps the ISOs and boots; and the MBR bug above was reproduced with the released v0.3.2 code (BIOS boot hangs at VT_) and repaired by a v0.4.0 update (first 1 MiB byte-identical to a pristine stick, boots again).
Known limitations
- Boot testing was done in an emulator, not on physical machines. QEMU's UEFI and BIOS are spec-compliant; a particular machine's firmware may not be. If a stick written with the switch off doesn't boot where an
-S stick from Ventoy2Disk does, please open an issue.
- Whether it fixes the 2011 iMac in #9 depends on that firmware, not on Mactoy: the reporter confirmed GRUB boots there when started directly, which is what the switch arranges.
- The cached tarball outlives the helper. "Uninstall the helper after this install" removes the daemon registration, not
/Library/Application Support/Mactoy/. Delete that folder by hand if you're removing Mactoy entirely.
SHA256 of Mactoy-0.4.0.dmg is published below the release assets.