Unable to create a bootable USB on MacOS

Started by jellyfish, April 03, 2024, 10:34:02 AM

Previous topic - Next topic
Good morning / afternoon / evening to all,
I've tried to ask my issue on Reddit before, but so far with no solution. I also believe I'm not the first one as I tried (hopefully) everything I was able to find - yet, I'm still unable to create a bootable USB Flash Drive.

I'm running on MacOS Sonoma (14.3) with Apple Silicon (M1).

I've followed official Docs for Installation process:

- downloaded VGA distribution of 24.1 from releases webpage (together with checksum, signature,..files)
- checksum from Terminal matches checksum in file
- image decompressed using bzip, without errors
- verification of image finished with expected "Verified OK" message

I've moved  on to write the image on USB. The disk got wiped out, after ~250 seconds I'verecieved an information about bytes written, etc. There also was no error in regard to trailing garbage (as described on Docs).

On a station (Intel 64bit based CPU), I've got into a Boot Menu, selected the drive, and... Nothing. BIOS showed me the main menu instead.

I tried to create a bootable USB with a balenaEtcher. With this, I've got an information that BIOS "could not authenticate the USB" (?, can't recall specific wording).

I tried to create a bootable USB with a DVD distribution using both, `dd` command, as well as balenaEtcher. Same error (with no reference number or any other information) or got back to BIOS'es Main Menu.

I looked up some information. It seems that there might be a problem related to GPT (GUID Partition Table) while BIOS UEFI expects MBR (?). It seems I'm unable to do anything about it using MacOS itself, so I followed the guide on https://www.tonymacx86.com/threads/converting-guid-gpt-partition-to-mbr-in-mac.55352/ forum. Downloaded gdisk using Homebrew, performed the change as described.. I even saw a "full" flash drive with MBR in MacOS Disk Utility. - Nope, back to main menu, did not solve the issue.

During my tries:

- I tried different `bs` number for `dd` command (64k from OPNSense Docs, 4m from pfSense Docs,..)
- on station, BIOS is up to date, UEFI allowed (cannot be turned off)
- I've tried different USB Flash Disks (both are >8 GB, both went with-out errors).
- both USBs were used in past as bootable disks for Linux/Windows/Proxmox,.. Last times 1-2 and 3-4 weeks ago.

I'm really running out of ideas - taking into consideration I was unable to find anything else to try, but what described above.

Is there something I might be missing in BIOS itself? 
Is there something else I could try to create a bootable USB?
Is there a way to create the USB with MBR directly?
Could Apple Silicon be the issue?
- for Windows, I've had to use alternative SW (to balenaEtcher) that is specifically made to create Win bootable disks on Apple Silicon.


Thanks - A LOT - in advance for any ideas.

On Mac OS you can write the image with dd in a Terminal. 100% reliable and no extra software needed.

1. Insert USB drive, start Disk Utility, select USB drive, Cmd-i for info, memorize disk unit (disk2, disk3, or similar), click on "deactivate" in the tool bar (not "eject"!)

2. Open a terminal

3. cd to the directory with the downloaded compressed image, I assume you verified the checksum.

4. Type:

bzip2 -dc OPNsense-24.1-vga-amd64.img.bz2 | sudo dd of=/dev/disk<unit from step 1> bs=1m

5. Wait until finished

6. Start Disk Utility, eject
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Sounds more like an issue with the machine trying to boot from the USB flash drive. Is that in UEFI or legacy BIOS mode? If UEFI, did you disable Secure Boot?

Cheers
Maurice
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

April 03, 2024, 05:48:05 PM #3 Last Edit: April 03, 2024, 06:28:52 PM by jellyfish
Quote from: Patrick M. Hausen on April 03, 2024, 10:59:01 AM
On Mac OS you can write the image with dd in a Terminal. 100% reliable and no extra software needed.

1. Insert USB drive, start Disk Utility, select USB drive, Cmd-i for info, memorize disk unit (disk2, disk3, or similar), click on "deactivate" in the tool bar (not "eject"!)

...

This is exactly what is described in an official docs and I started off with. Anyway, I will give it one more try with a fresh download.


jakub@Jakubs-MacBook-Air Downloads % diskutil unmountdisk disk4                                             
Unmount of all volumes on disk4 was successful

jakub@Jakubs-MacBook-Air Downloads % bzip2 -dc OPNsense-24.1-vga-amd64.img.bz2 | sudo dd of=/dev/disk4 bs=1m
0+123213 records in
2283+1 records out
2394402816 bytes transferred in 601.180059 secs (3982838 bytes/sec)


No change on station's side, BIOS = cannot authenticate.




Quote from: Maurice on April 03, 2024, 01:55:24 PM
Sounds more like an issue with the machine trying to boot from the USB flash drive. Is that in UEFI or legacy BIOS mode? If UEFI, did you disable Secure Boot?

Cheers
Maurice

UEFI -- Secure Boot -- OMG, that was it, thanks!

Out of curiosity, I've tried installation of pfSense. According to their Docs, they recommend balenaEtcher for creation of bootable USB, so I followed that (`dd` command is offered as an alternative too). I left BIOS with previous configuration - Secure Boot Enabled - and it resulted in same message.

I was unable to find information about this on both, the OPNsense as well as pfSense Docs - isn't it something worth mentioning, perhaps as a warning callout? Or is it such a common knowledge, I did not know about? :)